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_isnone

lua_isnone[-0, +0, –] int lua_isnone (lua_State *L, int index); Returns 1 if the given index is not valid

2017-02-21 04:13:27
lua_call

lua_call[-(nargs+1), +nresults, e] void lua_call (lua_State *L, int nargs, int nresults); Calls

2017-02-21 04:12:50
lua_rawequal

lua_rawequal[-0, +0, –] int lua_rawequal (lua_State *L, int index1, int index2); Returns 1 if the two values

2017-02-21 04:14:05
lua_createtable

lua_createtable[-0, +1, m] void lua_createtable (lua_State *L, int narr, int nrec); Creates a

2017-02-21 04:12:58
lua_isnoneornil

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

2017-02-21 04:13:29
lua_isyieldable

lua_isyieldable[-0, +0, –] int lua_isyieldable (lua_State *L); Returns 1 if the given coroutine can yield

2017-02-21 04:13:34
lua_Number

lua_Number typedef ... lua_Number; The type of floats in Lua. By default this type is double, but that can be changed to

2017-02-21 04:13:46
lua_pushthread

lua_pushthread[-0, +1, –] int lua_pushthread (lua_State *L); Pushes the thread represented by L

2017-02-21 04:14:02
lua_upvalueindex

lua_upvalueindex[-0, +0, –] int lua_upvalueindex (int i); Returns the pseudo-index that represents the

2017-02-21 04:14:52
lua_xmove

lua_xmove[-?, +?, –] void lua_xmove (lua_State *from, lua_State *to, int n); Exchange values between different

2017-02-21 04:14:55