luaL_dostring

luaL_dostring[-0, +?, –] int luaL_dostring (lua_State *L, const char *str); Loads and runs the given string. It is defined as the following macro: (luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0)) It returns false if there are no errors or true in case of errors.

luaL_dofile

luaL_dofile[-0, +?, e] int luaL_dofile (lua_State *L, const char *filename); Loads and runs the given file. It is defined as the following macro: (luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0)) It returns false if there are no errors or true in case of errors.

luaL_checkversion

luaL_checkversion[-0, +0, v] void luaL_checkversion (lua_State *L); Checks whether the core running the call, the core that created the Lua state, and the code making the call are all using the same version of Lua. Also checks whether the core running the call and the core that created the Lua state are using the same address space.

luaL_checkudata

luaL_checkudata[-0, +0, v] void *luaL_checkudata (lua_State *L, int arg, const char *tname); Checks whether the function argument arg is a userdata of the type tname (see luaL_newmetatable) and returns the userdata address (see lua_touserdata).

luaL_checktype

luaL_checktype[-0, +0, v] void luaL_checktype (lua_State *L, int arg, int t); Checks whether the function argument arg has type t. See lua_type for the encoding of types for t.

luaL_checkstring

luaL_checkstring[-0, +0, v] const char *luaL_checkstring (lua_State *L, int arg); Checks whether the function argument arg is a string and returns this string. This function uses lua_tolstring to get its result, so all conversions and caveats of that function apply here.

luaL_checkstack

luaL_checkstack[-0, +0, v] void luaL_checkstack (lua_State *L, int sz, const char *msg); Grows the stack size to top + sz elements, raising an error if the stack cannot grow to that size. msg is an additional text to go into the error message (or NULL for no additional text).

luaL_checkoption

luaL_checkoption[-0, +0, v] int luaL_checkoption (lua_State *L, int arg, const char *def, const char *const lst[]); Checks whether the function argument arg is a string and searches for this string in the array lst (which must be NULL-terminated). Returns the index in the array where the string was found. Raises an error if the argument is not a string or if the string cannot be found. If def is not NULL, the function uses d

luaL_checknumber

luaL_checknumber[-0, +0, v] lua_Number luaL_checknumber (lua_State *L, int arg); Checks whether the function argument arg is a number and returns this number.

luaL_checklstring

luaL_checklstring[-0, +0, v] const char *luaL_checklstring (lua_State *L, int arg, size_t *l); Checks whether the function argument arg is a string and returns this string; if l is not NULL fills *l with the string's length. This function uses lua_tolstring to get its result, so all conversions and caveats of that function apply here.