lua_error

lua_error[-1, +0, v] int lua_error (lua_State *L); Generates a Lua error, using the value at the top of the stack as the error object. This function does a long jump, and therefore never returns (see luaL_error).

lua_gc

lua_gc[-0, +0, m] int lua_gc (lua_State *L, int what, int data); Controls the garbage collector. This function performs several tasks, according to the value of the parameter what: LUA_GCSTOP: stops the garbage collector. LUA_GCRESTART: restarts the garbage collector. LUA_GCCOLLECT: performs a full garbage-collection cycle. LUA_GCCOUNT: returns the current amount of memory (in Kbytes) in use by Lua. LUA_GCCOUNTB: returns the remainder of dividing the current amount of bytes

lua_getallocf

lua_getallocf[-0, +0, –] lua_Alloc lua_getallocf (lua_State *L, void **ud); Returns the memory-allocation function of a given state. If ud is not NULL, Lua stores in *ud the opaque pointer given when the memory-allocator function was set.

lua_getextraspace

lua_getextraspace[-0, +0, –] void *lua_getextraspace (lua_State *L); Returns a pointer to a raw memory area associated with the given Lua state. The application can use this area for any purpose; Lua does not use it for anything. Each new thread has this area initialized with a copy of the area of the main thread. By default, this area has the size of a pointer to void, but you can recompile Lua with a different size for this area. (See LUA_EXTRASPACE in luaconf.h.)

lua_getfield

lua_getfield[-0, +1, e] int lua_getfield (lua_State *L, int index, const char *k); Pushes onto the stack the value t[k], where t is the value at the given index. As in Lua, this function may trigger a metamethod for the "index" event (see §2.4). Returns the type of the pushed value.

lua_getglobal

lua_getglobal[-0, +1, e] int lua_getglobal (lua_State *L, const char *name); Pushes onto the stack the value of the global name. Returns the type of that value.

lua_gethook

lua_gethook[-0, +0, –] lua_Hook lua_gethook (lua_State *L); Returns the current hook function.

lua_gethookcount

lua_gethookcount[-0, +0, –] int lua_gethookcount (lua_State *L); Returns the current hook count.

lua_gethookmask

lua_gethookmask[-0, +0, –] int lua_gethookmask (lua_State *L); Returns the current hook mask.

lua_geti

lua_geti[-0, +1, e] int lua_geti (lua_State *L, int index, lua_Integer i); Pushes onto the stack the value t[i], where t is the value at the given index. As in Lua, this function may trigger a metamethod for the "index" event (see §2.4). Returns the type of the pushed value.