luaL_pushresultsize

luaL_pushresultsize[-?, +1, m] void luaL_pushresultsize (luaL_Buffer *B, size_t sz); Equivalent to the sequence luaL_addsize, luaL_pushresult.

luaL_pushresult

luaL_pushresult[-?, +1, m] void luaL_pushresult (luaL_Buffer *B); Finishes the use of buffer B leaving the final string on the top of the stack.

luaL_prepbuffsize

luaL_prepbuffsize[-?, +?, m] char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz); Returns an address to a space of size sz where you can copy a string to be added to buffer B (see luaL_Buffer). After copying the string into this space you must call luaL_addsize with the size of the string to actually add it to the buffer.

luaL_prepbuffer

luaL_prepbuffer[-?, +?, m] char *luaL_prepbuffer (luaL_Buffer *B); Equivalent to luaL_prepbuffsize with the predefined size LUAL_BUFFERSIZE.

luaL_optstring

luaL_optstring[-0, +0, v] const char *luaL_optstring (lua_State *L, int arg, const char *d); If the function argument arg is a string, returns this string. If this argument is absent or is nil, returns d. Otherwise, raises an error.

luaL_optnumber

luaL_optnumber[-0, +0, v] lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number d); If the function argument arg is a number, returns this number. If this argument is absent or is nil, returns d. Otherwise, raises an error.

luaL_optlstring

luaL_optlstring[-0, +0, v] const char *luaL_optlstring (lua_State *L, int arg, const char *d, size_t *l); If the function argument arg is a string, returns this string. If this argument is absent or is nil, returns d. Otherwise, raises an error. If l is not NULL, fills the position *l with the result's length. If the result is NULL (only possible when returning d and d == NULL), its length is considered

luaL_optinteger

luaL_optinteger[-0, +0, v] lua_Integer luaL_optinteger (lua_State *L, int arg, lua_Integer d); If the function argument arg is an integer (or convertible to an integer), returns this integer. If this argument is absent or is nil, returns d. Otherwise, raises an error.

luaL_opt

luaL_opt[-0, +0, e] T luaL_opt (L, func, arg, dflt); This macro is defined as follows: (lua_isnoneornil(L,(arg)) ? (dflt) : func(L,(arg))) In words, if the argument arg is nil or absent, the macro results in the default dflt. Otherwise, it results in the result of calling func with the state L and the argument index arg as parameters. Note that it evaluates the expression dflt only if needed.

luaL_openlibs

luaL_openlibs[-0, +0, e] void luaL_openlibs (lua_State *L); Opens all standard Lua libraries into the given state.