luaL_testudata

luaL_testudata[-0, +0, m] void *luaL_testudata (lua_State *L, int arg, const char *tname); This function works like luaL_checkudata, except that, when the test fails, it returns NULL instead of raising an error.

luaL_argerror

luaL_argerror[-0, +0, v] int luaL_argerror (lua_State *L, int arg, const char *extramsg); Raises an error reporting a problem with argument arg of the C function that called it, using a standard message that includes extramsg as a comment: bad argument #arg to 'funcname' (extramsg) This function never returns.

collectgarbage()

collectgarbage ([opt [, arg]]) This function is a generic interface to the garbage collector. It performs different functions according to its first argument, opt: "collect": performs a full garbage-collection cycle. This is the default option. "stop": stops automatic execution of the garbage collector. The collector will run only when explicitly invoked, until a call to restart it. "restart": restarts automatic execution of the garbage collector. "count": returns the total memory

lua_isfunction

lua_isfunction[-0, +0, –] int lua_isfunction (lua_State *L, int index); Returns 1 if the value at the given index is a function (either C or Lua), and 0 otherwise.

dofile()

dofile ([filename])dofilestdindofiledofile

lua_rawlen

lua_rawlen[-0, +0, –] size_t lua_rawlen (lua_State *L, int index); Returns the raw "length" of the value at the given index: for strings, this is the string length; for tables, this is the result of the length operator ('#') with no metamethods; for userdata, this is the size of the block of memory allocated for the userdata; for other values, it is 0.

string.match()

string.match (s, pattern [, init])matchpattern§6.4.1smatchnilpatterninit

io.tmpfile()

io.tmpfile () In case of success, returns a handle for a temporary file. This file is opened in update mode and it is automatically removed when the program ends.

Function Calls as Statements

3.3.6 – Function Calls as Statements To allow possible side-effects, function calls can be executed as statements: stat ::= functioncall In this case, all returned values are thrown away. Function calls are explained in §3.4.10.

debug.setuservalue()

debug.setuservalue (udata, value) Sets the given value as the Lua value associated to the given udata. udata must be a full userdata. Returns udata.