lua_pop

lua_pop[-n, +0, โ€“] void lua_pop (lua_State *L, int n); Pops n elements from the stack.

lua_isnoneornil

lua_isnoneornil[-0, +0, โ€“] int lua_isnoneornil (lua_State *L, int index); Returns 1 if the given index is not valid or if the value at this index is nil, and 0 otherwise.

lua_numbertointeger

lua_numbertointeger int lua_numbertointeger (lua_Number n, lua_Integer *p); Converts a Lua float to a Lua integer. This macro assumes that n has an integral value. If that value is within the range of Lua integers, it is converted to an integer and assigned to *p. The macro results in a boolean indicating whether the conversion was successful. (Note that this range test can be tricky to do correctly without this macro, due to roundings.) This macro may evaluate its arguments more than once.

io.type()

io.type (obj) Checks whether obj is a valid file handle. Returns the string "file" if obj is an open file handle, "closed file" if obj is a closed file handle, or nil if obj is not a file handle.

lua_State

lua_State typedef struct lua_State lua_State; An opaque structure that points to a thread and indirectly (through the thread) to the whole state of a Lua interpreter. The Lua library is fully reentrant: it has no global variables. All information about a state is accessible through this structure. A pointer to this structure must be passed as the first argument to every function in the library, except to lua_newstate, which creates a Lua state from scratch.

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.

utf8.charpattern

utf8.charpattern[\0-\x7F\xC2-\xF4][\x80-\xBF]*ยง6.4.1

luaL_requiref

luaL_requiref[-0, +1, e] void luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int glb); If modname is not already present in package.loaded, calls function openf with string modname as an argument and sets the call result in package.loaded[modname], as if that function has been called through require. If glb is true, also stores the module into global modname. Leaves a copy of the module on the stack.

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.