lua_KFunction

lua_KFunction typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx); Type for continuation functions (see §4.7).

os.exit()

os.exit ([code [, close]]) Calls the ISO C function exit to terminate the host program. If code is true, the returned status is EXIT_SUCCESS; if code is false, the returned status is EXIT_FAILURE; if code is a number, the returned status is this number. The default value for code is true. If the optional second argument close is true, closes the Lua state before exiting.

lua_pushboolean

lua_pushboolean[-0, +1, –] void lua_pushboolean (lua_State *L, int b); Pushes a boolean value with value b onto the stack.

lua_atpanic

lua_atpanic[-0, +0, –] lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf); Sets a new panic function and returns the old one (see §4.6).

math.rad()

math.rad (x) Converts the angle x from degrees to radians.

rawget()

rawget (table, index)table[index]__indextableindex

lua_tocfunction

lua_tocfunction[-0, +0, –] lua_CFunction lua_tocfunction (lua_State *L, int index); Converts a value at the given index to a C function. That value must be a C function; otherwise, returns NULL.

math.log()

math.log (x [, base]) Returns the logarithm of x in the given base. The default for base is e (so that the function returns the natural logarithm of x).

lua_pcallk

lua_pcallk[-(nargs + 1), +(nresults|1), –] int lua_pcallk (lua_State *L, int nargs, int nresults, int msgh, lua_KContext ctx, lua_KFunction k); This function behaves exactly like lua_pcall, but allows the called function to yield (see §4.7).

lua_setupvalue

lua_setupvalue[-(0|1), +0, –] const char *lua_setupvalue (lua_State *L, int funcindex, int n); Sets the value of a closure's upvalue. It assigns the value at the top of the stack to the upvalue and returns its name. It also pops the value from the stack. Returns NULL (and pops nothing) when the index n is greater than the number of upvalues. Parameters funcindex and n are as in function lua_getupvalue.