lua_Unsigned

lua_Unsigned typedef ... lua_Unsigned; The unsigned version of lua_Integer.

lua_typename

lua_typename[-0, +0, –] const char *lua_typename (lua_State *L, int tp); Returns the name of the type encoded by the value tp, which must be one the values returned by lua_type.

lua_type

lua_type[-0, +0, –] int lua_type (lua_State *L, int index); Returns the type of the value in the given valid index, or LUA_TNONE for a non-valid (but acceptable) index. The types returned by lua_type are coded by the following constants defined in lua.h: LUA_TNIL (0), LUA_TNUMBER, LUA_TBOOLEAN, LUA_TSTRING, LUA_TTABLE, LUA_TFUNCTION, LUA_TUSERDATA, LUA_TTHREAD, and LUA_TLIGHTUSERDATA.

lua_touserdata

lua_touserdata[-0, +0, –] void *lua_touserdata (lua_State *L, int index); If the value at the given index is a full userdata, returns its block address. If the value is a light userdata, returns its pointer. Otherwise, returns NULL.

lua_tothread

lua_tothread[-0, +0, –] lua_State *lua_tothread (lua_State *L, int index); Converts the value at the given index to a Lua thread (represented as lua_State*). This value must be a thread; otherwise, the function returns NULL.

lua_tostring

lua_tostring[-0, +0, m] const char *lua_tostring (lua_State *L, int index); Equivalent to lua_tolstring with len equal to NULL.

lua_topointer

lua_topointer[-0, +0, –] const void *lua_topointer (lua_State *L, int index); Converts the value at the given index to a generic C pointer (void*). The value can be a userdata, a table, a thread, or a function; otherwise, lua_topointer returns NULL. Different objects will give different pointers. There is no way to convert the pointer back to its original value. Typically this function is used only for hashing and debug information.

lua_tonumberx

lua_tonumberx[-0, +0, –] lua_Number lua_tonumberx (lua_State *L, int index, int *isnum); Converts the Lua value at the given index to the C type lua_Number (see lua_Number). The Lua value must be a number or a string convertible to a number (see §3.4.3); otherwise, lua_tonumberx returns 0. If isnum is not NULL, its referent is assigned a boolean value that indicates whether the operation succeeded.

lua_tonumber

lua_tonumber[-0, +0, –] lua_Number lua_tonumber (lua_State *L, int index); Equivalent to lua_tonumberx with isnum equal to NULL.

lua_tolstring

lua_tolstring[-0, +0, m] const char *lua_tolstring (lua_State *L, int index, size_t *len); Converts the Lua value at the given index to a C string. If len is not NULL, it sets *len with the string length. The Lua value must be a string or a number; otherwise, the function returns NULL. If the value is a number, then lua_tolstring also changes the actual value in the stack to a string. (This change confuses lua_next when lua_tolstring is applied to keys during a table traversal.) lua_tolstr