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_newuserdata

lua_newuserdata[-0, +1, m] void *lua_newuserdata (lua_State *L, size_t size); This function allocates

2017-02-21 04:13:43
lua_islightuserdata

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

2017-02-21 04:13:25
lua_pcallk

lua_pcallk[-(nargs + 1), +(nresults|1), –] int lua_pcallk (lua_State *L, int nargs,

2017-02-21 04:13:49
lua_pushlightuserdata

lua_pushlightuserdata[-0, +1, –] void lua_pushlightuserdata (lua_State *L, void *p); Pushes a light userdata

2017-02-21 04:13:57
lua_newstate

lua_newstate[-0, +0, –] lua_State *lua_newstate (lua_Alloc f, void *ud); Creates a new thread running in

2017-02-21 04:13:40
lua_pushnumber

lua_pushnumber[-0, +1, –] void lua_pushnumber (lua_State *L, lua_Number n); Pushes a float with value n

2017-02-21 04:14:01
lua_rawseti

lua_rawseti[-1, +0, m] void lua_rawseti (lua_State *L, int index, lua_Integer i); Does the equivalent

2017-02-21 04:14:11
lua_istable

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

2017-02-21 04:13:31
lua_pushvalue

lua_pushvalue[-0, +1, –] void lua_pushvalue (lua_State *L, int index); Pushes a copy of the element at

2017-02-21 04:14:03
lua_Writer

lua_Writer typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz,

2017-02-21 04:14:54