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_load

lua_load[-0, +1, –] int lua_load (lua_State *L, lua_Reader reader, void *data,

2017-02-21 04:13:39
lua_close

lua_close[-0, +0, –] void lua_close (lua_State *L); Destroys all objects in the given Lua state (calling

2017-02-21 04:12:54
lua_newtable

lua_newtable[-0, +1, m] void lua_newtable (lua_State *L); Creates a new empty table and pushes

2017-02-21 04:13:41
lua_stringtonumber

lua_stringtonumber[-0, +1, –] size_t lua_stringtonumber (lua_State *L, const char *s); Converts the zero-terminated

2017-02-21 04:14:34
lua_pushboolean

lua_pushboolean[-0, +1, –] void lua_pushboolean (lua_State *L, int b); Pushes a boolean value with value

2017-02-21 04:13:51
lua_getallocf

lua_getallocf[-0, +0, –] lua_Alloc lua_getallocf (lua_State *L, void **ud); Returns the memory-allocation

2017-02-21 04:13:03
lua_pushinteger

lua_pushinteger[-0, +1, –] void lua_pushinteger (lua_State *L, lua_Integer n); Pushes an integer with value

2017-02-21 04:13:56
lua_rawlen

lua_rawlen[-0, +0, –] size_t lua_rawlen (lua_State *L, int index); Returns the raw "length" of the value

2017-02-21 04:14:09
lua_tocfunction

lua_tocfunction[-0, +0, –] lua_CFunction lua_tocfunction (lua_State *L, int index); Converts a value at

2017-02-21 04:14:36
lua_isinteger

lua_isinteger[-0, +0, –] int lua_isinteger (lua_State *L, int index); Returns 1 if the value at the given

2017-02-21 04:13:25