lua_isstring

lua_isstring[-0, +0, –] int lua_isstring (lua_State *L, int index); Returns 1 if the value at the given index is a string or a number (which is always convertible to a string), and 0 otherwise.

lua_istable

lua_istable[-0, +0, –] int lua_istable (lua_State *L, int index); Returns 1 if the value at the given index is a table, and 0 otherwise.

lua_isthread

lua_isthread[-0, +0, –] int lua_isthread (lua_State *L, int index); Returns 1 if the value at the given index is a thread, and 0 otherwise.

lua_isuserdata

lua_isuserdata[-0, +0, –] int lua_isuserdata (lua_State *L, int index); Returns 1 if the value at the given index is a userdata (either full or light), and 0 otherwise.

lua_isyieldable

lua_isyieldable[-0, +0, –] int lua_isyieldable (lua_State *L); Returns 1 if the given coroutine can yield, and 0 otherwise.

lua_KContext

lua_KContext typedef ... lua_KContext; The type for continuation-function contexts. It must be a numeric type. This type is defined as intptr_t when intptr_t is available, so that it can store pointers too. Otherwise, it is defined as ptrdiff_t.

lua_KFunction

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

lua_len

lua_len[-0, +1, e] void lua_len (lua_State *L, int index); Returns the length of the value at the given index. It is equivalent to the '#' operator in Lua (see §3.4.7) and may trigger a metamethod for the "length" event (see §2.4). The result is pushed on the stack.

lua_load

lua_load[-0, +1, –] int lua_load (lua_State *L, lua_Reader reader, void *data, const char *chunkname, const char *mode); Loads a Lua chunk without running it. If there are no errors, lua_load pushes the compiled chunk as a Lua function on top of the stack. Otherwise, it pushes an error message. The return values of lua_load are: LUA_OK: no errors; LUA_ERRSYNTAX: syntax error during precompilation; LUA_ERRMEM: memory allocation

lua_newstate

lua_newstate[-0, +0, –] lua_State *lua_newstate (lua_Alloc f, void *ud); Creates a new thread running in a new, independent state. Returns NULL if it cannot create the thread or the state (due to lack of memory). The argument f is the allocator function; Lua does all memory allocation for this state through this function (see lua_Alloc). The second argument, ud, is an opaque pointer that Lua passes to the allocator in every call.