[-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.
--------------------------------------------------------------------------------
luaL_checkstring
[-0, +0, v]
const char *luaL_checkstring (lua_State *L, int narg);
Checks whether the function argument narg 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_checktype
[-0, +0, v]
void luaL_checktype (lua_State *L, int narg, int t);
Checks whether the function argument narg has type t. See lua_type for the encoding of types for t.
--------------------------------------------------------------------------------
luaL_checkudata
[-0, +0, v]
void *luaL_checkudata (lua_State *L, int narg, const char *tname);
Checks whether the function argument narg is a userdata of the type tname (see luaL_newmetatable).
--------------------------------------------------------------------------------
luaL_dofile
[-0, +?, m]
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 0 if there are no errors or 1 in case of errors.
--------------------------------------------------------------------------------
luaL_dostring
[-0, +?, m]
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 0 if there are no errors or 1 in case of errors.
--------------------------------------------------------------------------------
luaL_error
[-0, +0, v]
int luaL_error (lua_State *L, const char *fmt, ...);
Raises an error. The error message format is given by fmt plus any extra arguments, following the same rules of lua_pushfstring. It also adds at the beginning of the message the file name and the line number where the error occurred, if this information is available.
This function never returns, but it is an idiom to use it in C functions as return luaL_error(args).
--------------------------------------------------------------------------------
4. The auxiliary library
Start from the beginning
