Functions that take a boolean argument now properly type-check for it.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-08-14 22:56:20 -03:00
parent fea9f82cfa
commit fee157b6b9
21 changed files with 50 additions and 42 deletions
+2 -2
View File
@@ -235,7 +235,7 @@ int w_Source_getCone(lua_State *L)
int w_Source_setRelative(lua_State *L)
{
Source *t = luax_checksource(L, 1);
luax_catchexcept(L, [&](){ t->setRelative(luax_toboolean(L, 2)); });
luax_catchexcept(L, [&](){ t->setRelative(luax_checkboolean(L, 2)); });
return 0;
}
@@ -249,7 +249,7 @@ int w_Source_isRelative(lua_State *L)
int w_Source_setLooping(lua_State *L)
{
Source *t = luax_checksource(L, 1);
luax_catchexcept(L, [&](){ t->setLooping(luax_toboolean(L, 2)); });
luax_catchexcept(L, [&](){ t->setLooping(luax_checkboolean(L, 2)); });
return 0;
}