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_len

lua_len[-0, +1, e] void lua_len (lua_State *L, int index); Returns the length of the value at

2017-02-21 04:13:37
lua_yieldk

lua_yieldk[-?, +?, e] int lua_yieldk (lua_State *L, int nresults, lua_KContext

2017-02-21 04:14:57
lua_typename

lua_typename[-0, +0, –] const char *lua_typename (lua_State *L, int tp); Returns the name of the type encoded

2017-02-21 04:14:47
lua_resume

lua_resume[-?, +?, –] int lua_resume (lua_State *L, lua_State *from, int nargs); Starts and resumes a coroutine

2017-02-21 04:14:18
lua_rawgetp

lua_rawgetp[-0, +1, –] int lua_rawgetp (lua_State *L, int index, const void *p); Pushes onto the stack

2017-02-21 04:14:08
lua_State

lua_State typedef struct lua_State lua_State; An opaque structure that points to a thread and indirectly (through the thread) to the

2017-02-21 04:14:32
lua_isstring

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

2017-02-21 04:13:30
lua_isboolean

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

2017-02-21 04:13:21
lua_getuservalue

lua_getuservalue[-0, +1, –] int lua_getuservalue (lua_State *L, int index); Pushes onto the stack the Lua

2017-02-21 04:13:17
lua_numbertointeger

lua_numbertointeger int lua_numbertointeger (lua_Number n, lua_Integer *p); Converts a Lua float to a Lua integer. This macro assumes

2017-02-21 04:13:47