luaL_getmetatable

luaL_getmetatable[-0, +1, m] int luaL_getmetatable (lua_State *L, const char *tname); Pushes onto the stack the metatable associated with name tname in the registry (see luaL_newmetatable) (nil if there is no metatable associated with that name). Returns the type of the pushed value.

luaL_getsubtable

luaL_getsubtable[-0, +1, e] int luaL_getsubtable (lua_State *L, int idx, const char *fname); Ensures that the value t[fname], where t is the value at index idx, is a table, and pushes that table onto the stack. Returns true if it finds a previous table there and false if it creates a new table.

luaL_gsub

luaL_gsub[-0, +1, m] const char *luaL_gsub (lua_State *L, const char *s, const char *p, const char *r); Creates a copy of string s by replacing any occurrence of the string p with the string r. Pushes the resulting string on the stack and returns it.

luaL_len

luaL_len[-0, +0, e] lua_Integer luaL_len (lua_State *L, int index); Returns the "length" of the value at the given index as a number; it is equivalent to the '#' operator in Lua (see §3.4.7). Raises an error if the result of the operation is not an integer. (This case only can happen through metamethods.)

luaL_loadbuffer

luaL_loadbuffer[-0, +1, –] int luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, const char *name); Equivalent to luaL_loadbufferx with mode equal to NULL.

luaL_loadbufferx

luaL_loadbufferx[-0, +1, –] int luaL_loadbufferx (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode); Loads a buffer as a Lua chunk. This function uses lua_load to load the chunk in the buffer pointed to by buff with size sz. This function returns the same results as lua_load. name is the chunk name, used for debug information and error messages. The string mode works as in f

luaL_loadfile

luaL_loadfile[-0, +1, m] int luaL_loadfile (lua_State *L, const char *filename); Equivalent to luaL_loadfilex with mode equal to NULL.

luaL_loadfilex

luaL_loadfilex[-0, +1, m] int luaL_loadfilex (lua_State *L, const char *filename, const char *mode); Loads a file as a Lua chunk. This function uses lua_load to load the chunk in the file named filename. If filename is NULL, then it loads from the standard input. The first line in the file is ignored if it starts with a #. The string mode works as in function lua_load. This function returns the same results as lua_load, but it has an extra erro

luaL_loadstring

luaL_loadstring[-0, +1, –] int luaL_loadstring (lua_State *L, const char *s); Loads a string as a Lua chunk. This function uses lua_load to load the chunk in the zero-terminated string s. This function returns the same results as lua_load. Also as lua_load, this function only loads the chunk; it does not run it.

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.