4.8 – Functions and Types[-o, +p, x]

Here we list all functions and types from the C API in alphabetical order. Each function has an indicator like this:

The first field, o, is how many elements the function pops from the stack. The second field, p, is how many elements the function pushes onto the stack. (Any function always pushes its results after popping its arguments.) A field in the form x|y means the function can push (or pop) x or y elements, depending on the situation; an interrogation mark '?' means that we cannot know how many elements the function pops/pushes by looking only at its arguments (e.g., they may depend on what is on the stack). The third field, x, tells whether the function may raise errors: '-' means the function never raises any error; 'm' means the function may raise out-of-memory errors and errors running a __gc metamethod; 'e' means the function may raise any errors (it can run arbitrary Lua code, either directly or through metamethods); 'v' means the function may raise an error on purpose.

lua_pushnil

lua_pushnil[-0, +1, –] void lua_pushnil (lua_State *L); Pushes a nil value onto the stack.

2017-02-21 04:14:00
lua_setallocf

lua_setallocf[-0, +0, –] void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); Changes the allocator

2017-02-21 04:14:20
lua_KFunction

lua_KFunction typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx); Type for continuation functions (see

2017-02-21 04:13:36
lua_toboolean

lua_toboolean[-0, +0, –] int lua_toboolean (lua_State *L, int index); Converts the Lua value at the given

2017-02-21 04:14:36
lua_pushlstring

lua_pushlstring[-0, +1, m] const char *lua_pushlstring (lua_State *L, const char *s, size_t len);

2017-02-21 04:13:59