#include <stddef.h>#include <stdio.h>#include "lua.h"Go to the source code of this file.
Classes | |
| struct | luaL_Reg |
| struct | luaL_Buffer |
Defines | |
| #define | luaL_getn(L, i) ((int)lua_objlen(L, i)) |
| #define | luaL_setn(L, i, j) ((void)0) |
| #define | luaI_openlib luaL_openlib |
| #define | LUA_ERRFILE (LUA_ERRERR+1) |
| #define | luaL_argcheck(L, cond, numarg, extramsg) ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) |
| #define | luaL_checkstring(L, n) (luaL_checklstring(L, (n), NULL)) |
| #define | luaL_optstring(L, n, d) (luaL_optlstring(L, (n), (d), NULL)) |
| #define | luaL_checkint(L, n) ((int)luaL_checkinteger(L, (n))) |
| #define | luaL_optint(L, n, d) ((int)luaL_optinteger(L, (n), (d))) |
| #define | luaL_checklong(L, n) ((long)luaL_checkinteger(L, (n))) |
| #define | luaL_optlong(L, n, d) ((long)luaL_optinteger(L, (n), (d))) |
| #define | luaL_typename(L, i) lua_typename(L, lua_type(L,(i))) |
| #define | luaL_dofile(L, fn) (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define | luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define | luaL_getmetatable(L, n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) |
| #define | luaL_opt(L, f, n, d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) |
| #define | luaL_addchar(B, c) |
| #define | luaL_putchar(B, c) luaL_addchar(B,c) |
| #define | luaL_addsize(B, n) ((B)->p += (n)) |
| #define | LUA_NOREF (-2) |
| #define | LUA_REFNIL (-1) |
| #define | lua_ref(L, lock) |
| #define | lua_unref(L, ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) |
| #define | lua_getref(L, ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref)) |
| #define | luaL_reg luaL_Reg |
Functions | |
| LUALIB_API void() | luaI_openlib (lua_State *L, const char *libname, const luaL_Reg *l, int nup) |
| LUALIB_API void() | luaL_register (lua_State *L, const char *libname, const luaL_Reg *l) |
| LUALIB_API int() | luaL_getmetafield (lua_State *L, int obj, const char *e) |
| LUALIB_API int() | luaL_callmeta (lua_State *L, int obj, const char *e) |
| LUALIB_API int() | luaL_typerror (lua_State *L, int narg, const char *tname) |
| LUALIB_API int() | luaL_argerror (lua_State *L, int numarg, const char *extramsg) |
| LUALIB_API const char *() | luaL_checklstring (lua_State *L, int numArg, size_t *l) |
| LUALIB_API const char *() | luaL_optlstring (lua_State *L, int numArg, const char *def, size_t *l) |
| LUALIB_API lua_Number() | luaL_checknumber (lua_State *L, int numArg) |
| LUALIB_API lua_Number() | luaL_optnumber (lua_State *L, int nArg, lua_Number def) |
| LUALIB_API lua_Integer() | luaL_checkinteger (lua_State *L, int numArg) |
| LUALIB_API lua_Integer() | luaL_optinteger (lua_State *L, int nArg, lua_Integer def) |
| LUALIB_API void() | luaL_checkstack (lua_State *L, int sz, const char *msg) |
| LUALIB_API void() | luaL_checktype (lua_State *L, int narg, int t) |
| LUALIB_API void() | luaL_checkany (lua_State *L, int narg) |
| LUALIB_API int() | luaL_newmetatable (lua_State *L, const char *tname) |
| LUALIB_API void *() | luaL_checkudata (lua_State *L, int ud, const char *tname) |
| LUALIB_API void() | luaL_where (lua_State *L, int lvl) |
| LUALIB_API int() | luaL_error (lua_State *L, const char *fmt,...) |
| LUALIB_API int() | luaL_checkoption (lua_State *L, int narg, const char *def, const char *const lst[]) |
| LUALIB_API int() | luaL_ref (lua_State *L, int t) |
| LUALIB_API void() | luaL_unref (lua_State *L, int t, int ref) |
| LUALIB_API int() | luaL_loadfile (lua_State *L, const char *filename) |
| LUALIB_API int() | luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, const char *name) |
| LUALIB_API int() | luaL_loadstring (lua_State *L, const char *s) |
| LUALIB_API lua_State *() | luaL_newstate (void) |
| LUALIB_API const char *() | luaL_gsub (lua_State *L, const char *s, const char *p, const char *r) |
| LUALIB_API const char *() | luaL_findtable (lua_State *L, int idx, const char *fname, int szhint) |
| LUALIB_API void() | luaL_buffinit (lua_State *L, luaL_Buffer *B) |
| LUALIB_API char *() | luaL_prepbuffer (luaL_Buffer *B) |
| LUALIB_API void() | luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) |
| LUALIB_API void() | luaL_addstring (luaL_Buffer *B, const char *s) |
| LUALIB_API void() | luaL_addvalue (luaL_Buffer *B) |
| LUALIB_API void() | luaL_pushresult (luaL_Buffer *B) |
| #define LUA_ERRFILE (LUA_ERRERR+1) |
| #define lua_ref | ( | L, | |||
| lock | ) |
Value:
((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0))
| #define LUA_REFNIL (-1) |
| #define luaI_openlib luaL_openlib |
| #define luaL_addchar | ( | B, | |||
| c | ) |
Value:
((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ (*(B)->p++ = (char)(c)))
Definition at line 136 of file lauxlib.h.
Referenced by add_s(), addquoted(), luaL_addlstring(), os_date(), str_char(), str_format(), str_gsub(), str_lower(), str_reverse(), and str_upper().
| #define luaL_argcheck | ( | L, | |||
| cond, | |||||
| numarg, | |||||
| extramsg | ) | ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) |
Definition at line 100 of file lauxlib.h.
Referenced by db_setmetatable(), g_read(), getfunc(), luaB_cocreate(), luaB_coresume(), luaB_costatus(), luaB_newproxy(), luaB_select(), luaB_setmetatable(), luaB_tonumber(), str_char(), and tconcat().
Definition at line 104 of file lauxlib.h.
Referenced by auxupvalue(), db_getlocal(), db_setlocal(), getfunc(), ipairsaux(), luaB_select(), luaB_unpack(), setn(), str_char(), str_rep(), tconcat(), and tinsert().
Definition at line 102 of file lauxlib.h.
Referenced by db_sethook(), gmatch(), io_lines(), io_open(), io_popen(), ll_loadlib(), ll_module(), ll_require(), loader_C(), loader_Croot(), loader_Lua(), loader_preload(), luaB_tonumber(), luaL_checkoption(), os_getenv(), os_remove(), os_rename(), s3d_fire_weapon(), s3d_get_option(), and str_gsub().
| #define luaL_dofile | ( | L, | |||
| fn | ) | (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define luaL_getn | ( | L, | |||
| i | ) | ((int)lua_objlen(L, i)) |
Definition at line 119 of file lauxlib.h.
Referenced by luaB_unpack(), luaL_optinteger(), luaL_optnumber(), os_date(), and tconcat().
Definition at line 105 of file lauxlib.h.
Referenced by db_sethook(), getfunc(), luaB_collectgarbage(), luaB_error(), luaB_tonumber(), luaB_unpack(), os_exit(), str_gsub(), tconcat(), and tremove().
Definition at line 103 of file lauxlib.h.
Referenced by db_getinfo(), io_open(), io_popen(), luaB_assert(), luaB_dofile(), luaB_load(), luaB_loadfile(), luaB_loadstring(), luaL_checkoption(), os_date(), os_execute(), and os_setlocale().
| #define luaL_setn | ( | L, | |||
| i, | |||||
| j | ) | ((void)0) |
| #define luaL_typename | ( | L, | |||
| i | ) | lua_typename(L, lua_type(L,(i))) |
Definition at line 109 of file lauxlib.h.
Referenced by add_value(), luaB_tostring(), luaB_type(), and luaL_typerror().
Definition at line 242 of file lauxlib.cpp.
References luaL_Reg::func, libsize(), lua_getfield(), LUA_GLOBALSINDEX, lua_insert(), lua_istable, lua_pop, lua_pushcclosure(), lua_pushvalue(), LUA_QS, LUA_REGISTRYINDEX, lua_remove(), lua_setfield(), luaL_error(), luaL_findtable(), luaL_Reg::name, and NULL.
| LUALIB_API void() luaL_addlstring | ( | luaL_Buffer * | B, | |
| const char * | s, | |||
| size_t | l | |||
| ) |
| LUALIB_API void() luaL_addstring | ( | luaL_Buffer * | B, | |
| const char * | s | |||
| ) |
Definition at line 442 of file lauxlib.cpp.
References luaL_addlstring(), and LangStringUtil::strlen().
| LUALIB_API void() luaL_addvalue | ( | luaL_Buffer * | B | ) |
Definition at line 454 of file lauxlib.cpp.
References adjuststack(), bufffree, emptybuffer(), luaL_Buffer::L, lua_insert(), lua_pop, lua_tolstring(), luaL_Buffer::lvl, and luaL_Buffer::p.
| LUALIB_API int() luaL_argerror | ( | lua_State * | L, | |
| int | numarg, | |||
| const char * | extramsg | |||
| ) |
Definition at line 43 of file lauxlib.cpp.
References lua_getinfo(), lua_getstack(), LUA_QS, luaL_error(), lua_Debug::name, lua_Debug::namewhat, NULL, and LangStringUtil::strcmp().
| LUALIB_API void() luaL_buffinit | ( | lua_State * | L, | |
| luaL_Buffer * | B | |||
| ) |
Definition at line 472 of file lauxlib.cpp.
References luaL_Buffer::buffer, luaL_Buffer::L, luaL_Buffer::lvl, and luaL_Buffer::p.
| LUALIB_API int() luaL_callmeta | ( | lua_State * | L, | |
| int | obj, | |||
| const char * | e | |||
| ) |
Definition at line 219 of file lauxlib.cpp.
References abs_index, lua_call(), lua_pushvalue(), and luaL_getmetafield().
| LUALIB_API void() luaL_checkany | ( | lua_State * | L, | |
| int | narg | |||
| ) |
| LUALIB_API lua_Integer() luaL_checkinteger | ( | lua_State * | L, | |
| int | numArg | |||
| ) |
Definition at line 189 of file lauxlib.cpp.
References lua_isnumber(), LUA_TNUMBER, lua_tointeger(), and tag_error().
| LUALIB_API const char*() luaL_checklstring | ( | lua_State * | L, | |
| int | numArg, | |||
| size_t * | l | |||
| ) |
Definition at line 158 of file lauxlib.cpp.
References lua_tolstring(), LUA_TSTRING, and tag_error().
| LUALIB_API lua_Number() luaL_checknumber | ( | lua_State * | L, | |
| int | numArg | |||
| ) |
Definition at line 176 of file lauxlib.cpp.
References lua_isnumber(), LUA_TNUMBER, lua_tonumber(), and tag_error().
| LUALIB_API int() luaL_checkoption | ( | lua_State * | L, | |
| int | narg, | |||
| const char * | def, | |||
| const char *const | lst[] | |||
| ) |
Definition at line 99 of file lauxlib.cpp.
References lua_pushfstring(), LUA_QS, luaL_argerror(), luaL_checkstring, luaL_optstring, and LangStringUtil::strcmp().
| LUALIB_API void() luaL_checkstack | ( | lua_State * | L, | |
| int | sz, | |||
| const char * | msg | |||
| ) |
| LUALIB_API void() luaL_checktype | ( | lua_State * | L, | |
| int | narg, | |||
| int | t | |||
| ) |
| LUALIB_API void*() luaL_checkudata | ( | lua_State * | L, | |
| int | ud, | |||
| const char * | tname | |||
| ) |
Definition at line 124 of file lauxlib.cpp.
References lua_getfield(), lua_getmetatable(), lua_pop, lua_rawequal(), LUA_REGISTRYINDEX, lua_touserdata(), luaL_typerror(), and NULL.
| LUALIB_API int() luaL_error | ( | lua_State * | L, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Definition at line 86 of file lauxlib.cpp.
References lua_concat(), lua_error(), lua_pushvfstring(), and luaL_where().
| LUALIB_API const char*() luaL_findtable | ( | lua_State * | L, | |
| int | idx, | |||
| const char * | fname, | |||
| int | szhint | |||
| ) |
Definition at line 357 of file lauxlib.cpp.
References lua_createtable(), lua_isnil, lua_istable, lua_pop, lua_pushlstring(), lua_pushvalue(), lua_rawget(), lua_remove(), lua_settable(), NULL, and LangStringUtil::strlen().
| LUALIB_API int() luaL_getmetafield | ( | lua_State * | L, | |
| int | obj, | |||
| const char * | e | |||
| ) |
Definition at line 203 of file lauxlib.cpp.
References lua_getmetatable(), lua_isnil, lua_pop, lua_pushstring(), lua_rawget(), and lua_remove().
| LUALIB_API const char*() luaL_gsub | ( | lua_State * | L, | |
| const char * | s, | |||
| const char * | p, | |||
| const char * | r | |||
| ) |
Definition at line 340 of file lauxlib.cpp.
References lua_tostring, luaL_addlstring(), luaL_addstring(), luaL_buffinit(), luaL_pushresult(), NULL, LangStringUtil::strlen(), and LangStringUtil::strstr().
| LUALIB_API int() luaL_loadbuffer | ( | lua_State * | L, | |
| const char * | buff, | |||
| size_t | sz, | |||
| const char * | name | |||
| ) |
Definition at line 610 of file lauxlib.cpp.
References getS(), lua_load(), LoadS::s, and LoadS::size.
| LUALIB_API int() luaL_loadfile | ( | lua_State * | L, | |
| const char * | filename | |||
| ) |
Definition at line 552 of file lauxlib.cpp.
References errfile(), LoadF::extraline, LoadF::f, getF(), lua_gettop(), lua_load(), lua_pushfstring(), lua_pushliteral, lua_remove(), lua_settop(), LUA_SIGNATURE, lua_tostring, and NULL.
| LUALIB_API int() luaL_loadstring | ( | lua_State * | L, | |
| const char * | s | |||
| ) |
Definition at line 619 of file lauxlib.cpp.
References luaL_loadbuffer(), and LangStringUtil::strlen().
| LUALIB_API int() luaL_newmetatable | ( | lua_State * | L, | |
| const char * | tname | |||
| ) |
Definition at line 112 of file lauxlib.cpp.
References lua_getfield(), lua_isnil, lua_newtable, lua_pop, lua_pushvalue(), LUA_REGISTRYINDEX, and lua_setfield().
| LUALIB_API lua_State*() luaL_newstate | ( | void | ) |
Definition at line 648 of file lauxlib.cpp.
References l_alloc(), lua_atpanic(), lua_newstate(), NULL, and panic().
| LUALIB_API lua_Integer() luaL_optinteger | ( | lua_State * | L, | |
| int | nArg, | |||
| lua_Integer | def | |||
| ) |
| LUALIB_API const char*() luaL_optlstring | ( | lua_State * | L, | |
| int | numArg, | |||
| const char * | def, | |||
| size_t * | l | |||
| ) |
Definition at line 165 of file lauxlib.cpp.
References lua_isnoneornil, luaL_checklstring(), and LangStringUtil::strlen().
| LUALIB_API lua_Number() luaL_optnumber | ( | lua_State * | L, | |
| int | nArg, | |||
| lua_Number | def | |||
| ) |
| LUALIB_API char*() luaL_prepbuffer | ( | luaL_Buffer * | B | ) |
Definition at line 429 of file lauxlib.cpp.
References adjuststack(), luaL_Buffer::buffer, and emptybuffer().
| LUALIB_API void() luaL_pushresult | ( | luaL_Buffer * | B | ) |
Definition at line 447 of file lauxlib.cpp.
References emptybuffer(), luaL_Buffer::L, lua_concat(), and luaL_Buffer::lvl.
| LUALIB_API int() luaL_ref | ( | lua_State * | L, | |
| int | t | |||
| ) |
Definition at line 481 of file lauxlib.cpp.
References abs_index, FREELIST_REF, int(), lua_isnil, lua_objlen(), lua_pop, lua_rawgeti(), lua_rawseti(), LUA_REFNIL, and lua_tointeger().
| LUALIB_API int() luaL_typerror | ( | lua_State * | L, | |
| int | narg, | |||
| const char * | tname | |||
| ) |
Definition at line 61 of file lauxlib.cpp.
References lua_pushfstring(), luaL_argerror(), and luaL_typename.
| LUALIB_API void() luaL_unref | ( | lua_State * | L, | |
| int | t, | |||
| int | ref | |||
| ) |
Definition at line 504 of file lauxlib.cpp.
References abs_index, FREELIST_REF, lua_pushinteger(), lua_rawgeti(), and lua_rawseti().
| LUALIB_API void() luaL_where | ( | lua_State * | L, | |
| int | lvl | |||
| ) |
Definition at line 73 of file lauxlib.cpp.
References lua_Debug::currentline, lua_getinfo(), lua_getstack(), lua_pushfstring(), lua_pushliteral, and lua_Debug::short_src.
1.5.3