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_KContext

lua_KContext typedef ... lua_KContext; The type for continuation-function contexts. It must be a numeric type. This type is defined

2017-02-21 04:13:35
lua_settable

lua_settable[-2, +0, e] void lua_settable (lua_State *L, int index); Does the equivalent to t[k]

2017-02-21 04:14:28
lua_geti

lua_geti[-0, +1, e] int lua_geti (lua_State *L, int index, lua_Integer i); Pushes onto the stack

2017-02-21 04:13:09
lua_version

lua_version[-0, +0, –] const lua_Number *lua_version (lua_State *L); Returns the address of the version

2017-02-21 04:14:53
lua_replace

lua_replace[-1, +0, –] void lua_replace (lua_State *L, int index); Moves the top element into the given

2017-02-21 04:14:16
lua_arith

lua_arith[-(2|1), +1, e] void lua_arith (lua_State *L, int op); Performs an arithmetic or bitwise

2017-02-21 04:12:48
lua_isnil

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

2017-02-21 04:13:26
lua_dump

lua_dump[-0, +0, –] int lua_dump (lua_State *L, lua_Writer writer,

2017-02-21 04:13:00
lua_pushcclosure

lua_pushcclosure[-n, +1, m] void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); Pushes

2017-02-21 04:13:52
lua_iscfunction

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

2017-02-21 04:13:22