lua_rawsetp

lua_rawsetp[-1, +0, m] void lua_rawsetp (lua_State *L, int index, const void *p); Does the equivalent of t[p] = v, where t is the table at the given index, p is encoded as a light userdata, and v is the value at the top of the stack. This function pops the value from the stack. The assignment is raw, that is, it does not invoke __newindex metamethod.

luaL_Reg

luaL_Reg typedef struct luaL_Reg { const char *name; lua_CFunction func; } luaL_Reg; Type for arrays of functions to be registered by luaL_setfuncs. name is the function name and func is a pointer to the function. Any array of luaL_Reg must end with a sentinel entry in which both name and func are NULL.

luaL_newlib

luaL_newlib[-0, +1, m] void luaL_newlib (lua_State *L, const luaL_Reg l[]); Creates a new table and registers there the functions in list l. It is implemented as the following macro: (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) The array l must be the actual array, not a pointer to it.

table.move()

table.move (a1, f, e, t [,a2]) Moves elements from table a1 to table a2, performing the equivalent to the following multiple assignment: a2[t],··· = a1[f],···,a1[e]. The default for a2 is a1. The destination range can overlap with the source range. The number of elements to be moved must fit in a Lua integer. Returns the destination table a2.

lua_tointeger

lua_tointeger[-0, +0, –] lua_Integer lua_tointeger (lua_State *L, int index); Equivalent to lua_tointegerx with isnum equal to NULL.

luaL_checkstack

luaL_checkstack[-0, +0, v] void luaL_checkstack (lua_State *L, int sz, const char *msg); Grows the stack size to top + sz elements, raising an error if the stack cannot grow to that size. msg is an additional text to go into the error message (or NULL for no additional text).

os.remove()

os.remove (filename) Deletes the file (or empty directory, on POSIX systems) with the given name. If this function fails, it returns nil, plus a string describing the error and the error code. Otherwise, it returns true.

string.find()

string.find (s, pattern [, init [, plain]]) Looks for the first match of pattern (see §6.4.1) in the string s. If it finds a match, then find returns the indices of s where this occurrence starts and ends; otherwise, it returns nil. A third, optional numeric argument init specifies where to start the search; its default value is 1 and can be negative. A value of true as a fourth, optional argument plain turns off the pattern matching facilities, so the function does a plain "find substring" o

luaL_newstate

luaL_newstate[-0, +0, –] lua_State *luaL_newstate (void); Creates a new Lua state. It calls lua_newstate with an allocator based on the standard C realloc function and then sets a panic function (see §4.6) that prints an error message to the standard error output in case of fatal errors. Returns the new state, or NULL if there is a memory allocation error.

lua_KFunction

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