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_pushliteral

lua_pushliteral[-0, +1, m] const char *lua_pushliteral (lua_State *L, const char *s); This macro

2017-02-21 04:13:58
lua_rawget

lua_rawget[-1, +1, –] int lua_rawget (lua_State *L, int index); Similar to

2017-02-21 04:14:06
lua_tointeger

lua_tointeger[-0, +0, –] lua_Integer lua_tointeger (lua_State *L, int index); Equivalent to

2017-02-21 04:14:37
lua_yield

lua_yield[-?, +?, e] int lua_yield (lua_State *L, int nresults); This function is equivalent to

2017-02-21 04:14:56
lua_setuservalue

lua_setuservalue[-1, +0, –] void lua_setuservalue (lua_State *L, int index); Pops a value from the stack

2017-02-21 04:14:31
lua_setmetatable

lua_setmetatable[-1, +0, –] void lua_setmetatable (lua_State *L, int index); Pops a table from the stack

2017-02-21 04:14:27
lua_gettable

lua_gettable[-1, +1, e] int lua_gettable (lua_State *L, int index); Pushes onto the stack the

2017-02-21 04:13:14
lua_concat

lua_concat[-n, +1, e] void lua_concat (lua_State *L, int n); Concatenates the n values

2017-02-21 04:12:56
lua_checkstack

lua_checkstack[-0, +0, –] int lua_checkstack (lua_State *L, int n); Ensures that the stack has space for

2017-02-21 04:12:53
lua_Integer

lua_Integer typedef ... lua_Integer; The type of integers in Lua. By default this type is long long, (usually

2017-02-21 04:13:20