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
+6
View File
@@ -125,6 +125,12 @@ bool luax_isarrayoftables(lua_State *L, int idx);
**/
bool luax_toboolean(lua_State *L, int idx);
/**
* Returns the boolean value at idx. Causes a Lua error if the value is not
* a boolean.
**/
bool luax_checkboolean(lua_State *L, int idx);
/**
* Pushes a bool onto the stack. It's the same as lua_pushboolean,
* but with bool instead of int.