const char *extramsg);
Checks whether cond is true. If not, raises an error with the following message, where func is retrieved from the call stack:
bad argument #<narg> to <func> (<extramsg>)
--------------------------------------------------------------------------------
luaL_argerror
[-0, +0, v]
int luaL_argerror (lua_State *L, int narg, const char *extramsg);
Raises an error with the following message, where func is retrieved from the call stack:
bad argument #<narg> to <func> (<extramsg>)
This function never returns, but it is an idiom to use it in C functions as return luaL_argerror(args).
--------------------------------------------------------------------------------
luaL_Buffer
typedef struct luaL_Buffer luaL_Buffer;
Type for a string buffer.
A string buffer allows C code to build Lua strings piecemeal. Its pattern of use is as follows:
First you declare a variable b of type luaL_Buffer.
Then you initialize it with a call luaL_buffinit(L, &b).
Then you add string pieces to the buffer calling any of the luaL_add* functions.
You finish by calling luaL_pushresult(&b). This call leaves the final string on the top of the stack.
During its normal operation, a string buffer uses a variable number of stack slots. So, while using a buffer, you cannot assume that you know where the top of the stack is. You can use the stack between successive calls to buffer operations as long as that use is balanced; that is, when you call a buffer operation, the stack is at the same level it was immediately after the previous buffer operation. (The only exception to this rule is luaL_addvalue.) After calling luaL_pushresult the stack is back to its level when the buffer was initialized, plus the final string on its top.
--------------------------------------------------------------------------------
luaL_buffinit
[-0, +0, -]
void luaL_buffinit (lua_State *L, luaL_Buffer *B);
Initializes a buffer B. This function does not allocate any space; the buffer must be declared as a variable (see luaL_Buffer).
--------------------------------------------------------------------------------
luaL_callmeta
[-0, +(0|1), e]
int luaL_callmeta (lua_State *L, int obj, const char *e);
Calls a metamethod.
If the object at index obj has a metatable and this metatable has a field e, this function calls this field and passes the object as its only argument. In this case this function returns 1 and pushes onto the stack the value returned by the call. If there is no metatable or no metamethod, this function returns 0 (without pushing any value on the stack).
--------------------------------------------------------------------------------
luaL_checkany
[-0, +0, v]
4. The auxiliary library
Start from the beginning
