#include <stdarg.h>#include <stddef.h>#include "luaconf.h"

Go to the source code of this file.
Classes | |
| struct | lua_Debug |
Defines | |
| #define | LUA_VERSION_MAJOR "5" |
| #define | LUA_VERSION_MINOR "2" |
| #define | LUA_VERSION_NUM 502 |
| #define | LUA_VERSION_RELEASE "0" |
| #define | LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR |
| #define | LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE |
| #define | LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2011 Lua.org, PUC-Rio" |
| #define | LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" |
| #define | LUA_SIGNATURE "\033Lua" |
| #define | LUA_MULTRET (-1) |
| #define | LUA_REGISTRYINDEX LUAI_FIRSTPSEUDOIDX |
| #define | lua_upvalueindex(i) (LUA_REGISTRYINDEX - (i)) |
| #define | LUA_OK 0 |
| #define | LUA_YIELD 1 |
| #define | LUA_ERRRUN 2 |
| #define | LUA_ERRSYNTAX 3 |
| #define | LUA_ERRMEM 4 |
| #define | LUA_ERRGCMM 5 |
| #define | LUA_ERRERR 6 |
| #define | LUA_TNONE (-1) |
| #define | LUA_TNIL 0 |
| #define | LUA_TBOOLEAN 1 |
| #define | LUA_TLIGHTUSERDATA 2 |
| #define | LUA_TNUMBER 3 |
| #define | LUA_TSTRING 4 |
| #define | LUA_TTABLE 5 |
| #define | LUA_TFUNCTION 6 |
| #define | LUA_TUSERDATA 7 |
| #define | LUA_TTHREAD 8 |
| #define | LUA_NUMTAGS 9 |
| #define | LUA_MINSTACK 20 |
| #define | LUA_RIDX_MAINTHREAD 1 |
| #define | LUA_RIDX_GLOBALS 2 |
| #define | LUA_RIDX_LAST LUA_RIDX_GLOBALS |
| #define | LUA_OPADD 0 |
| #define | LUA_OPSUB 1 |
| #define | LUA_OPMUL 2 |
| #define | LUA_OPDIV 3 |
| #define | LUA_OPMOD 4 |
| #define | LUA_OPPOW 5 |
| #define | LUA_OPUNM 6 |
| #define | LUA_OPEQ 0 |
| #define | LUA_OPLT 1 |
| #define | LUA_OPLE 2 |
| #define | lua_call(L, n, r) lua_callk(L, (n), (r), 0, NULL) |
| #define | lua_pcall(L, n, r, f) lua_pcallk(L, (n), (r), (f), 0, NULL) |
| #define | lua_yield(L, n) lua_yieldk(L, (n), 0, NULL) |
| #define | LUA_GCSTOP 0 |
| #define | LUA_GCRESTART 1 |
| #define | LUA_GCCOLLECT 2 |
| #define | LUA_GCCOUNT 3 |
| #define | LUA_GCCOUNTB 4 |
| #define | LUA_GCSTEP 5 |
| #define | LUA_GCSETPAUSE 6 |
| #define | LUA_GCSETSTEPMUL 7 |
| #define | LUA_GCSETMAJORINC 8 |
| #define | LUA_GCISRUNNING 9 |
| #define | LUA_GCGEN 10 |
| #define | LUA_GCINC 11 |
| #define | lua_tonumber(L, i) lua_tonumberx(L,i,NULL) |
| #define | lua_tointeger(L, i) lua_tointegerx(L,i,NULL) |
| #define | lua_tounsigned(L, i) lua_tounsignedx(L,i,NULL) |
| #define | lua_pop(L, n) lua_settop(L, -(n)-1) |
| #define | lua_newtable(L) lua_createtable(L, 0, 0) |
| #define | lua_register(L, n, f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) |
| #define | lua_pushcfunction(L, f) lua_pushcclosure(L, (f), 0) |
| #define | lua_isfunction(L, n) (lua_type(L, (n)) == LUA_TFUNCTION) |
| #define | lua_istable(L, n) (lua_type(L, (n)) == LUA_TTABLE) |
| #define | lua_islightuserdata(L, n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) |
| #define | lua_isnil(L, n) (lua_type(L, (n)) == LUA_TNIL) |
| #define | lua_isboolean(L, n) (lua_type(L, (n)) == LUA_TBOOLEAN) |
| #define | lua_isthread(L, n) (lua_type(L, (n)) == LUA_TTHREAD) |
| #define | lua_isnone(L, n) (lua_type(L, (n)) == LUA_TNONE) |
| #define | lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) |
| #define | lua_pushliteral(L, s) lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) |
| #define | lua_pushglobaltable(L) lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS) |
| #define | lua_tostring(L, i) lua_tolstring(L, (i), NULL) |
| #define | LUA_HOOKCALL 0 |
| #define | LUA_HOOKRET 1 |
| #define | LUA_HOOKLINE 2 |
| #define | LUA_HOOKCOUNT 3 |
| #define | LUA_HOOKTAILCALL 4 |
| #define | LUA_MASKCALL (1 << LUA_HOOKCALL) |
| #define | LUA_MASKRET (1 << LUA_HOOKRET) |
| #define | LUA_MASKLINE (1 << LUA_HOOKLINE) |
| #define | LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) |
Typedefs | |
| typedef struct lua_State | lua_State |
| typedef int(* | lua_CFunction )(lua_State *L) |
| typedef const char *(* | lua_Reader )(lua_State *L, void *ud, size_t *sz) |
| typedef int(* | lua_Writer )(lua_State *L, const void *p, size_t sz, void *ud) |
| typedef void *(* | lua_Alloc )(void *ud, void *ptr, size_t osize, size_t nsize) |
| typedef LUA_NUMBER | lua_Number |
| typedef LUA_INTEGER | lua_Integer |
| typedef LUA_UNSIGNED | lua_Unsigned |
| typedef struct lua_Debug | lua_Debug |
| typedef void(* | lua_Hook )(lua_State *L, lua_Debug *ar) |
Functions | |
| LUA_API lua_State *() | lua_newstate (lua_Alloc f, void *ud) |
| LUA_API void() | lua_close (lua_State *L) |
| LUA_API lua_State *() | lua_newthread (lua_State *L) |
| LUA_API lua_CFunction() | lua_atpanic (lua_State *L, lua_CFunction panicf) |
| LUA_API const lua_Number *() | lua_version (lua_State *L) |
| LUA_API int() | lua_absindex (lua_State *L, int idx) |
| LUA_API int() | lua_gettop (lua_State *L) |
| LUA_API void() | lua_settop (lua_State *L, int idx) |
| LUA_API void() | lua_pushvalue (lua_State *L, int idx) |
| LUA_API void() | lua_remove (lua_State *L, int idx) |
| LUA_API void() | lua_insert (lua_State *L, int idx) |
| LUA_API void() | lua_replace (lua_State *L, int idx) |
| LUA_API void() | lua_copy (lua_State *L, int fromidx, int toidx) |
| LUA_API int() | lua_checkstack (lua_State *L, int sz) |
| LUA_API void() | lua_xmove (lua_State *from, lua_State *to, int n) |
| LUA_API int() | lua_isnumber (lua_State *L, int idx) |
| LUA_API int() | lua_isstring (lua_State *L, int idx) |
| LUA_API int() | lua_iscfunction (lua_State *L, int idx) |
| LUA_API int() | lua_isuserdata (lua_State *L, int idx) |
| LUA_API int() | lua_type (lua_State *L, int idx) |
| LUA_API const char *() | lua_typename (lua_State *L, int tp) |
| LUA_API lua_Number() | lua_tonumberx (lua_State *L, int idx, int *isnum) |
| LUA_API lua_Integer() | lua_tointegerx (lua_State *L, int idx, int *isnum) |
| LUA_API lua_Unsigned() | lua_tounsignedx (lua_State *L, int idx, int *isnum) |
| LUA_API int() | lua_toboolean (lua_State *L, int idx) |
| LUA_API const char *() | lua_tolstring (lua_State *L, int idx, size_t *len) |
| LUA_API size_t() | lua_rawlen (lua_State *L, int idx) |
| LUA_API lua_CFunction() | lua_tocfunction (lua_State *L, int idx) |
| LUA_API void *() | lua_touserdata (lua_State *L, int idx) |
| LUA_API lua_State *() | lua_tothread (lua_State *L, int idx) |
| LUA_API const void *() | lua_topointer (lua_State *L, int idx) |
| LUA_API void() | lua_arith (lua_State *L, int op) |
| LUA_API int() | lua_rawequal (lua_State *L, int idx1, int idx2) |
| LUA_API int() | lua_compare (lua_State *L, int idx1, int idx2, int op) |
| LUA_API void() | lua_pushnil (lua_State *L) |
| LUA_API void() | lua_pushnumber (lua_State *L, lua_Number n) |
| LUA_API void() | lua_pushinteger (lua_State *L, lua_Integer n) |
| LUA_API void() | lua_pushunsigned (lua_State *L, lua_Unsigned n) |
| LUA_API const char *() | lua_pushlstring (lua_State *L, const char *s, size_t l) |
| LUA_API const char *() | lua_pushstring (lua_State *L, const char *s) |
| LUA_API const char *() | lua_pushvfstring (lua_State *L, const char *fmt, va_list argp) |
| LUA_API const char *() | lua_pushfstring (lua_State *L, const char *fmt,...) |
| LUA_API void() | lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) |
| LUA_API void() | lua_pushboolean (lua_State *L, int b) |
| LUA_API void() | lua_pushlightuserdata (lua_State *L, void *p) |
| LUA_API int() | lua_pushthread (lua_State *L) |
| LUA_API void() | lua_getglobal (lua_State *L, const char *var) |
| LUA_API void() | lua_gettable (lua_State *L, int idx) |
| LUA_API void() | lua_getfield (lua_State *L, int idx, const char *k) |
| LUA_API void() | lua_rawget (lua_State *L, int idx) |
| LUA_API void() | lua_rawgeti (lua_State *L, int idx, int n) |
| LUA_API void() | lua_rawgetp (lua_State *L, int idx, const void *p) |
| LUA_API void() | lua_createtable (lua_State *L, int narr, int nrec) |
| LUA_API void *() | lua_newuserdata (lua_State *L, size_t sz) |
| LUA_API int() | lua_getmetatable (lua_State *L, int objindex) |
| LUA_API void() | lua_getuservalue (lua_State *L, int idx) |
| LUA_API void() | lua_setglobal (lua_State *L, const char *var) |
| LUA_API void() | lua_settable (lua_State *L, int idx) |
| LUA_API void() | lua_setfield (lua_State *L, int idx, const char *k) |
| LUA_API void() | lua_rawset (lua_State *L, int idx) |
| LUA_API void() | lua_rawseti (lua_State *L, int idx, int n) |
| LUA_API void() | lua_rawsetp (lua_State *L, int idx, const void *p) |
| LUA_API int() | lua_setmetatable (lua_State *L, int objindex) |
| LUA_API void() | lua_setuservalue (lua_State *L, int idx) |
| LUA_API void() | lua_callk (lua_State *L, int nargs, int nresults, int ctx, lua_CFunction k) |
| LUA_API int() | lua_getctx (lua_State *L, int *ctx) |
| LUA_API int() | lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, int ctx, lua_CFunction k) |
| LUA_API int() | lua_load (lua_State *L, lua_Reader reader, void *dt, const char *chunkname, const char *mode) |
| LUA_API int() | lua_dump (lua_State *L, lua_Writer writer, void *data) |
| LUA_API int() | lua_yieldk (lua_State *L, int nresults, int ctx, lua_CFunction k) |
| LUA_API int() | lua_resume (lua_State *L, lua_State *from, int narg) |
| LUA_API int() | lua_status (lua_State *L) |
| LUA_API int() | lua_gc (lua_State *L, int what, int data) |
| LUA_API int() | lua_error (lua_State *L) |
| LUA_API int() | lua_next (lua_State *L, int idx) |
| LUA_API void() | lua_concat (lua_State *L, int n) |
| LUA_API void() | lua_len (lua_State *L, int idx) |
| LUA_API lua_Alloc() | lua_getallocf (lua_State *L, void **ud) |
| LUA_API void() | lua_setallocf (lua_State *L, lua_Alloc f, void *ud) |
| LUA_API int() | lua_getstack (lua_State *L, int level, lua_Debug *ar) |
| LUA_API int() | lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) |
| LUA_API const char *() | lua_getlocal (lua_State *L, const lua_Debug *ar, int n) |
| LUA_API const char *() | lua_setlocal (lua_State *L, const lua_Debug *ar, int n) |
| LUA_API const char *() | lua_getupvalue (lua_State *L, int funcindex, int n) |
| LUA_API const char *() | lua_setupvalue (lua_State *L, int funcindex, int n) |
| LUA_API void *() | lua_upvalueid (lua_State *L, int fidx, int n) |
| LUA_API void() | lua_upvaluejoin (lua_State *L, int fidx1, int n1, int fidx2, int n2) |
| LUA_API int() | lua_sethook (lua_State *L, lua_Hook func, int mask, int count) |
| LUA_API lua_Hook() | lua_gethook (lua_State *L) |
| LUA_API int() | lua_gethookmask (lua_State *L) |
| LUA_API int() | lua_gethookcount (lua_State *L) |
| #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" |
| #define lua_call | ( | L, | ||
| n, | ||||
| r | ||||
| ) | lua_callk(L, (n), (r), 0, NULL) |
Definition at line 248 of file lua.h.
Referenced by add_value(), dialog_callback(), dooptions(), findloader(), generic_reader(), hookf(), intf_dofile(), intf_show_dialog(), ll_require(), LuaKernel::load_package(), luaB_print(), luaL_callmeta(), luaL_requiref(), pairsmeta(), and sort_comp().
| #define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2011 Lua.org, PUC-Rio" |
Definition at line 26 of file lua.h.
Referenced by doargs(), and print_version().
| #define LUA_ERRERR 6 |
Definition at line 51 of file lua.h.
Referenced by luaD_call(), luaD_growstack(), luaG_errormsg(), and seterrorobj().
| #define LUA_ERRMEM 4 |
Definition at line 49 of file lua.h.
Referenced by luaM_realloc_(), and seterrorobj().
| #define LUA_ERRRUN 2 |
Definition at line 47 of file lua.h.
Referenced by GCTM(), and luaG_errormsg().
| #define LUA_ERRSYNTAX 3 |
Definition at line 48 of file lua.h.
Referenced by checkmode(), error(), incomplete(), and lexerror().
| #define LUA_GCCOUNT 3 |
Definition at line 279 of file lua.h.
Referenced by lua_gc(), and luaB_collectgarbage().
| #define LUA_GCCOUNTB 4 |
Definition at line 280 of file lua.h.
Referenced by lua_gc(), and luaB_collectgarbage().
| #define LUA_GCINC 11 |
Definition at line 287 of file lua.h.
Referenced by lua_gc(), and luaB_collectgarbage().
| #define LUA_GCISRUNNING 9 |
Definition at line 285 of file lua.h.
Referenced by lua_gc(), and luaB_collectgarbage().
| #define LUA_GCSTEP 5 |
Definition at line 281 of file lua.h.
Referenced by lua_gc(), and luaB_collectgarbage().
| #define LUA_HOOKCALL 0 |
Definition at line 355 of file lua.h.
Referenced by luaD_precall().
| #define LUA_HOOKCOUNT 3 |
Definition at line 358 of file lua.h.
Referenced by traceexec().
| #define LUA_HOOKLINE 2 |
Definition at line 357 of file lua.h.
Referenced by traceexec().
| #define LUA_HOOKRET 1 |
Definition at line 356 of file lua.h.
Referenced by luaD_poscall().
| #define lua_isboolean | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TBOOLEAN) |
Definition at line 330 of file lua.h.
Referenced by ai::ai_move(), and os_exit().
| #define lua_isfunction | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TFUNCTION) |
Definition at line 326 of file lua.h.
Referenced by db_getinfo(), db_getlocal(), dooptions(), findloader(), hookf(), and intf_find_path().
| #define lua_islightuserdata | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) |
| #define lua_isnil | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TNIL) |
Definition at line 329 of file lua.h.
Referenced by findloader(), generic_reader(), getboolfield(), impl_side_set(), intf_find_path(), intf_find_reach(), intf_get_time_of_day(), intf_require(), intf_set_dialog_callback(), intf_set_terrain(), io_lines(), io_readline(), ipairsaux(), ll_module(), ll_register(), ll_require(), luaL_findtable(), luaL_getmetafield(), luaL_newmetatable(), luaL_ref(), luaW_getglobal(), report(), searcher_preload(), and sort_comp().
| #define lua_isnone | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TNONE) |
Definition at line 332 of file lua.h.
Referenced by intf_message(), intf_set_terrain(), io_close(), io_lines(), and luaB_loadfile().
| #define lua_isnoneornil | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) <= 0) |
Definition at line 333 of file lua.h.
Referenced by ai::ai_attack(), ai::ai_recall(), ai::ai_recruit(), db_sethook(), db_setuservalue(), db_traceback(), find_widget(), g_iofile(), intf_find_vacant_tile(), intf_fire_event(), intf_get_unit(), intf_put_unit(), intf_select_hex(), intf_set_music(), intf_set_terrain(), intf_set_variable(), intf_set_village_owner(), intf_show_dialog(), intf_unit_resistance(), luaB_tonumber(), luaL_optlstring(), math_log(), os_time(), lua_synchronize::query_user(), sort(), and traceback().
| #define lua_istable | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TTABLE) |
Definition at line 327 of file lua.h.
Referenced by findfield(), findloader(), impl_side_set(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_variables_get(), impl_unit_variables_set(), intf_find_path(), intf_find_reach(), intf_get_time_of_day(), luaL_findtable(), luaL_getsubtable(), luaL_pushmodule(), luaW_getglobal(), and luaW_toconfig().
| #define lua_isthread | ( | L, | ||
| n | ||||
| ) | (lua_type(L, (n)) == LUA_TTHREAD) |
Definition at line 331 of file lua.h.
Referenced by getthread().
| #define LUA_MASKCALL (1 << LUA_HOOKCALL) |
Definition at line 365 of file lua.h.
Referenced by laction(), luaD_precall(), and unmakemask().
| #define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) |
Definition at line 368 of file lua.h.
Referenced by laction(), luaV_execute(), and traceexec().
| #define LUA_MASKLINE (1 << LUA_HOOKLINE) |
Definition at line 367 of file lua.h.
Referenced by luaD_poscall(), luaV_execute(), traceexec(), and unmakemask().
| #define LUA_MASKRET (1 << LUA_HOOKRET) |
Definition at line 366 of file lua.h.
Referenced by laction(), luaD_poscall(), and unmakemask().
| #define LUA_MINSTACK 20 |
Definition at line 93 of file lua.h.
Referenced by aux_lines(), dotty(), g_read(), luaD_hook(), luaD_precall(), luaW_filltable(), and luaW_toconfig().
| #define LUA_MULTRET (-1) |
Definition at line 34 of file lua.h.
Referenced by dotty(), handle_script(), intf_dofile(), lastlistfield(), luaB_dofile(), luaB_pcall(), luaB_xpcall(), luaD_poscall(), luaV_execute(), and resume().
| #define lua_newtable | ( | L | ) | lua_createtable(L, 0, 0) |
Definition at line 320 of file lua.h.
Referenced by ai::lua_ai_context::create(), impl_vconfig_get(), ai::lua_ai_context::init(), LuaKernel::initialize(), intf_get_recall_units(), intf_get_terrain_info(), intf_get_time_of_day(), intf_get_traits(), intf_get_units(), intf_get_variable(), LuaKernel::load_game(), LuaKernel::LuaKernel(), luaL_getsubtable(), luaL_newmetatable(), luaW_filltable(), luaW_pushconfig(), ai::push_attack_analysis(), and ai::transform_ai_action().
| #define LUA_OK 0 |
Definition at line 45 of file lua.h.
Referenced by auxresume(), combine(), dofile(), dolibrary(), dostring(), dotty(), finalreport(), finishCcall(), GCTM(), handle_script(), load_aux(), lua_callk(), lua_load(), lua_pcallk(), lua_resume(), luaB_costatus(), luaB_dofile(), luaB_load(), luaB_loadfile(), luaB_pcall(), luaB_xpcall(), luaD_pcall(), main(), pmain(), report(), resume(), runargs(), and searcher_Lua().
| #define LUA_OPADD 0 |
Definition at line 179 of file lua.h.
Referenced by constfolding(), lua_arith(), luaO_arith(), and luaV_arith().
| #define LUA_OPDIV 3 |
Definition at line 182 of file lua.h.
Referenced by luaO_arith().
| #define LUA_OPEQ 0 |
Definition at line 189 of file lua.h.
Referenced by lua_compare().
| #define LUA_OPLE 2 |
Definition at line 191 of file lua.h.
Referenced by lua_compare().
| #define LUA_OPLT 1 |
Definition at line 190 of file lua.h.
Referenced by lua_compare(), and sort_comp().
| #define LUA_OPMOD 4 |
Definition at line 183 of file lua.h.
Referenced by luaO_arith().
| #define LUA_OPMUL 2 |
Definition at line 181 of file lua.h.
Referenced by luaO_arith().
| #define LUA_OPPOW 5 |
Definition at line 184 of file lua.h.
Referenced by luaO_arith().
| #define LUA_OPSUB 1 |
Definition at line 180 of file lua.h.
Referenced by luaO_arith().
| #define LUA_OPUNM 6 |
Definition at line 185 of file lua.h.
Referenced by lua_arith(), and luaO_arith().
| #define lua_pcall | ( | L, | ||
| n, | ||||
| r, | ||||
| f | ||||
| ) | lua_pcallk(L, (n), (r), (f), 0, NULL) |
Definition at line 254 of file lua.h.
Referenced by db_debug(), docall(), dotty(), luaW_pcall(), and main().
| #define lua_pop | ( | L, | ||
| n | ||||
| ) | lua_settop(L, -(n)-1) |
Definition at line 318 of file lua.h.
Referenced by add_value(), auxresume(), auxsort(), lua_calculator::cost(), ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), createmeta(), createmetatable(), db_sethook(), dolibrary(), LuaKernel::execute(), finalreport(), findfield(), findloader(), g_read(), lua_report_generator::generate(), get_prompt(), getboolfield(), getfield(), handle_script(), impl_side_set(), incomplete(), LuaKernel::initialize(), intf_find_path(), intf_find_reach(), intf_get_time_of_day(), intf_require(), intf_set_dialog_callback(), ll_module(), ll_register(), ll_require(), luaB_print(), LuaKernel::LuaKernel(), luaL_checkversion_(), luaL_findtable(), luaL_getmetafield(), luaL_getsubtable(), luaL_len(), luaL_newmetatable(), luaL_openlib(), luaL_openlibs(), luaL_pushmodule(), luaL_ref(), luaL_requiref(), luaL_setfuncs(), luaL_testudata(), luaopen_package(), luaW_getglobal(), luaW_hasmetatable(), luaW_pcall(), luaW_toconfig(), maxn(), noenv(), pushglobalfuncname(), report(), LuaKernel::run_filter(), LuaKernel::save_game(), set_env(), LuaKernel::set_wml_action(), sort_comp(), str_format(), ai::lua_object< T >::to_type(), tstring_concat_aux(), ai::lua_ai_action_handler::~lua_ai_action_handler(), and ai::lua_ai_context::~lua_ai_context().
| #define lua_pushcfunction | ( | L, | ||
| f | ||||
| ) | lua_pushcclosure(L, (f), 0) |
Definition at line 324 of file lua.h.
Referenced by docall(), ll_loadfunc(), LuaKernel::load_package(), LuaKernel::LuaKernel(), luaL_openlibs(), luaL_requiref(), luaopen_package(), main(), and pairsmeta().
| #define lua_pushglobaltable | ( | L | ) | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS) |
Definition at line 338 of file lua.h.
Referenced by dolibrary(), ll_seeall(), luaL_pushmodule(), luaL_requiref(), luaopen_base(), luaopen_package(), luaW_getglobal(), and pushglobalfuncname().
| #define lua_pushliteral | ( | L, | ||
| s | ||||
| ) | lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) |
Definition at line 335 of file lua.h.
Referenced by auxresume(), createmetatable(), db_gethook(), f_tostring(), findfield(), io_noclose(), io_type(), ll_load(), ll_sym(), loadline(), luaB_costatus(), luaL_loadfilex(), luaL_tolstring(), luaL_traceback(), luaL_where(), luaopen_base(), luaopen_package(), pushfuncname(), str_rep(), str_sub(), and traceback().
| #define lua_register | ( | L, | ||
| n, | ||||
| f | ||||
| ) | (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) |
| #define LUA_REGISTRYINDEX LUAI_FIRSTPSEUDOIDX |
Definition at line 40 of file lua.h.
Referenced by ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), createstdfile(), db_getregistry(), dialog_callback(), g_iofile(), ai::lua_ai_context::get_persistent_data(), getiofile(), ai::lua_ai_action_handler::handle(), impl_tstring_concat(), impl_unit_get(), impl_vconfig_get(), index2addr(), ai::lua_ai_context::init(), LuaKernel::initialize(), intf_copy_unit(), intf_create_unit(), intf_get_displayed_unit(), intf_get_recall_units(), intf_get_sides(), intf_get_unit(), intf_get_units(), intf_set_dialog_callback(), intf_textdomain(), io_close(), io_lines(), ll_register(), ll_require(), ai::lua_ai_context::load(), lua_absindex(), LuaKernel::LuaKernel(), luaL_newmetatable(), luaL_openlibs(), luaL_pushmodule(), luaL_requiref(), luaopen_package(), luaW_hasmetatable(), luaW_pcall(), luaW_pushtstring(), luaW_pushvconfig(), luaW_toconfig(), moveto(), noenv(), pmain(), LuaKernel::run_filter(), scoped_dialog::scoped_dialog(), searcher_preload(), ai::lua_ai_context::set_persistent_data(), ai::lua_ai_action_handler::~lua_ai_action_handler(), ai::lua_ai_context::~lua_ai_context(), and scoped_dialog::~scoped_dialog().
| #define LUA_RIDX_GLOBALS 2 |
Definition at line 98 of file lua.h.
Referenced by init_registry(), lua_getglobal(), lua_load(), and lua_setglobal().
| #define LUA_RIDX_LAST LUA_RIDX_GLOBALS |
Definition at line 99 of file lua.h.
Referenced by init_registry().
| #define LUA_RIDX_MAINTHREAD 1 |
Definition at line 97 of file lua.h.
Referenced by init_registry().
| #define LUA_SIGNATURE "\033Lua" |
Definition at line 31 of file lua.h.
Referenced by f_parser(), luaL_loadfilex(), luaU_header(), luaU_undump(), and PrintHeader().
| #define LUA_TBOOLEAN 1 |
Definition at line 79 of file lua.h.
Referenced by DumpConstants(), impl_unit_variables_set(), intf_set_variable(), LoadConstants(), luaL_tolstring(), luaV_equalobj_(), luaW_toconfig(), luaW_totstring(), mainposition(), and PrintConstant().
| #define LUA_TFUNCTION 6 |
Definition at line 84 of file lua.h.
Referenced by add_value(), auxupvalue(), checkupval(), db_sethook(), freeobj(), luaB_cocreate(), luaB_load(), luaF_newCclosure(), luaF_newLclosure(), propagatemark(), reallymarkobject(), sort(), str_dump(), and str_gsub().
| #define LUA_TLIGHTUSERDATA 2 |
Definition at line 80 of file lua.h.
Referenced by db_setuservalue(), lua_topointer(), lua_touserdata(), luaV_equalobj_(), and mainposition().
| #define LUA_TNIL 0 |
Definition at line 78 of file lua.h.
Referenced by db_setmetatable(), DumpConstants(), impl_unit_variables_set(), LoadConstants(), luaB_setmetatable(), luaH_get(), luaL_tolstring(), luaV_equalobj_(), luaW_toconfig(), luaW_tovconfig(), and PrintConstant().
| #define LUA_TNONE (-1) |
Definition at line 76 of file lua.h.
Referenced by lua_type(), luaL_checkany(), luaW_toconfig(), and luaW_tovconfig().
| #define LUA_TNUMBER 3 |
Definition at line 81 of file lua.h.
Referenced by DumpConstants(), g_read(), g_write(), impl_unit_variables_set(), intf_set_variable(), LoadConstants(), lua_isstring(), luaH_get(), luaL_checkinteger(), luaL_checknumber(), luaL_checkunsigned(), luaL_tolstring(), luaV_equalobj_(), luaW_toconfig(), luaW_totstring(), mainposition(), maxn(), PrintConstant(), str_gsub(), and tstring_concat_aux().
| #define lua_tointeger | ( | L, | ||
| i | ||||
| ) | lua_tointegerx(L,i,NULL) |
Definition at line 315 of file lua.h.
Referenced by ai::ai_attack(), db_getinfo(), find_widget(), g_read(), gmatch_aux(), impl_vconfig_get(), intf_find_reach(), intf_fire_event(), intf_play_sound(), intf_put_recall_unit(), intf_put_unit(), intf_simulate_combat(), io_readline(), luaL_checkversion_(), luaL_ref(), pmain(), ai::to_map_location(), and ai::lua_object< T >::to_type().
| #define lua_tonumber | ( | L, | ||
| i | ||||
| ) | lua_tonumberx(L,i,NULL) |
Definition at line 314 of file lua.h.
Referenced by ai::ai_attack(), ai::ai_recall(), ai::ai_recruit(), lua_calculator::cost(), g_write(), impl_unit_variables_set(), intf_set_variable(), luaW_toconfig(), maxn(), and ai::lua_object< T >::to_type().
| #define lua_tostring | ( | L, | ||
| i | ||||
| ) | lua_tolstring(L, (i), NULL) |
Definition at line 341 of file lua.h.
Referenced by cfun_theme_item(), checkload(), combine(), ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), db_debug(), db_getinfo(), db_traceback(), dotty(), errfile(), LuaKernel::execute(), finalreport(), find_widget(), findfile(), findloader(), g_iofile(), g_read(), GCTM(), get_prompt(), impl_race_get(), impl_side_set(), impl_unit_type_get(), impl_unit_variables_set(), intf_remove_tile_overlay(), intf_require(), intf_set_variable(), io_readline(), luaB_select(), LuaKernel::LuaKernel(), luaL_argerror(), luaL_gsub(), luaL_loadfilex(), luaW_pcall(), luaW_toconfig(), luaW_totstring(), main(), panic(), pmain(), pushfuncname(), report(), searcher_Croot(), searchpath(), ai::lua_object< T >::to_type(), traceback(), and tstring_concat_aux().
| #define lua_tounsigned | ( | L, | ||
| i | ||||
| ) | lua_tounsignedx(L,i,NULL) |
Definition at line 316 of file lua.h.
Referenced by luaL_checkversion_().
| #define LUA_TSTRING 4 |
Definition at line 82 of file lua.h.
Referenced by DumpConstants(), findfield(), freeobj(), impl_unit_variables_set(), intf_set_variable(), LoadConstants(), lua_isstring(), lua_rawlen(), luaB_rawlen(), luaB_select(), luaH_get(), luaL_checklstring(), luaL_tolstring(), luaV_equalobj_(), luaV_objlen(), luaW_toconfig(), luaW_totstring(), mainposition(), newlstr(), PrintConstant(), reallymarkobject(), str_gsub(), and tstring_concat_aux().
| #define LUA_TTABLE 5 |
Definition at line 83 of file lua.h.
Referenced by add_value(), db_setmetatable(), db_setuservalue(), freeobj(), intf_set_variable(), ipairsaux(), ll_seeall(), lua_getmetatable(), lua_rawlen(), lua_setmetatable(), lua_topointer(), luaB_next(), luaB_rawget(), luaB_rawlen(), luaB_rawset(), luaB_setmetatable(), luaC_barrier_(), luaC_barrierback_(), luaH_new(), luaT_gettmbyobj(), luaV_equalobj_(), luaV_objlen(), luaW_toconfig(), luaW_tovconfig(), maxn(), os_time(), pairsmeta(), propagatemark(), reallymarkobject(), str_gsub(), tconcat(), and unpack().
| #define LUA_TTHREAD 8 |
Definition at line 86 of file lua.h.
Referenced by freeobj(), lua_newstate(), lua_newthread(), lua_topointer(), propagatemark(), reallymarkobject(), and sweeplist().
| #define LUA_TUSERDATA 7 |
Definition at line 85 of file lua.h.
Referenced by db_getuservalue(), db_setuservalue(), freeobj(), impl_unit_variables_set(), intf_set_variable(), lua_getmetatable(), lua_rawlen(), lua_setmetatable(), lua_topointer(), lua_touserdata(), luaS_newudata(), luaT_gettmbyobj(), luaV_equalobj_(), luaW_toconfig(), luaW_totstring(), luaW_tovconfig(), reallymarkobject(), and tstring_concat_aux().
| #define lua_upvalueindex | ( | i | ) | (LUA_REGISTRYINDEX - (i)) |
Definition at line 41 of file lua.h.
Referenced by cfun_theme_item(), cfun_wml_action(), findfile(), findloader(), ai::get_engine(), gmatch_aux(), io_readline(), and luaB_auxwrap().
| #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR |
Definition at line 24 of file lua.h.
Referenced by luaopen_base().
| #define lua_yield | ( | L, | ||
| n | ||||
| ) | lua_yieldk(L, (n), 0, NULL) |
Definition at line 268 of file lua.h.
Referenced by luaB_yield().
| #define LUA_YIELD 1 |
Definition at line 46 of file lua.h.
Referenced by auxresume(), lua_resume(), lua_yieldk(), luaB_costatus(), pcallcont(), resume(), and traceexec().
| typedef void*(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize) |
| typedef int(* lua_CFunction)(lua_State *L) |
| typedef LUA_INTEGER lua_Integer |
| typedef LUA_NUMBER lua_Number |
| typedef const char*(* lua_Reader)(lua_State *L, void *ud, size_t *sz) |
| typedef LUA_UNSIGNED lua_Unsigned |
| typedef int(* lua_Writer)(lua_State *L, const void *p, size_t sz, void *ud) |
| LUA_API int() lua_absindex | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 144 of file lapi.c.
References cast_int, lua_State::ci, CallInfo::func, LUA_REGISTRYINDEX, and lua_State::top.
Referenced by luaL_callmeta(), luaL_getsubtable(), luaL_ref(), and luaL_unref().

| LUA_API void() lua_arith | ( | lua_State * | L, | |
| int | op | |||
| ) |
Definition at line 284 of file lapi.c.
References api_checknelems, cast, changenvalue, lua_lock, LUA_OPADD, LUA_OPUNM, lua_unlock, luaO_arith(), luaV_arith(), nvalue, setobjs2s, TM_ADD, lua_State::top, and ttisnumber.

| LUA_API lua_CFunction() lua_atpanic | ( | lua_State * | L, | |
| lua_CFunction | panicf | |||
| ) |
Definition at line 118 of file lapi.c.
References G, lua_lock, and lua_unlock.
Referenced by luaL_newstate().

| LUA_API void() lua_callk | ( | lua_State * | L, | |
| int | nargs, | |||
| int | nresults, | |||
| int | ctx, | |||
| lua_CFunction | k | |||
| ) |
Definition at line 886 of file lapi.c.
References adjustresults, api_check, api_checknelems, CallInfo::c, checkresults, lua_State::ci, isLua, lua_lock, LUA_OK, lua_unlock, luaD_call(), lua_State::nny, lua_State::status, lua_State::top, and CallInfo::u.
Referenced by luaB_dofile().


| LUA_API int() lua_checkstack | ( | lua_State * | L, | |
| int | sz | |||
| ) |
Definition at line 83 of file lapi.c.
References cast_int, lua_State::ci, growstack(), lua_lock, lua_unlock, luaD_rawrunprotected(), LUAI_MAXSTACK, lua_State::stack, lua_State::stack_last, CallInfo::top, and lua_State::top.
Referenced by auxresume(), finishpcall(), luaL_checkstack(), luaW_filltable(), luaW_toconfig(), pmain(), and unpack().


| LUA_API void() lua_close | ( | lua_State * | L | ) |
Definition at line 279 of file lstate.c.
References close_state(), G, lua_lock, and luai_userstateclose.
Referenced by main(), os_exit(), and LuaKernel::~LuaKernel().


| LUA_API int() lua_compare | ( | lua_State * | L, | |
| int | idx1, | |||
| int | idx2, | |||
| int | op | |||
| ) |
Definition at line 307 of file lapi.c.
References api_check, equalobj, index2addr(), isvalid, lua_lock, LUA_OPEQ, LUA_OPLE, LUA_OPLT, lua_unlock, luaV_lessequal(), and luaV_lessthan().
Referenced by sort_comp().


| LUA_API void() lua_concat | ( | lua_State * | L, | |
| int | n | |||
| ) |
Definition at line 1128 of file lapi.c.
References api_checknelems, api_incr_top, lua_lock, lua_unlock, luaC_checkGC, luaS_newlstr(), luaV_concat(), setsvalue2s, and lua_State::top.
Referenced by findfield(), loadline(), luaB_auxwrap(), luaB_error(), luaL_error(), and luaL_traceback().


| LUA_API void() lua_copy | ( | lua_State * | L, | |
| int | fromidx, | |||
| int | toidx | |||
| ) |
Definition at line 216 of file lapi.c.
References api_checkvalidindex, index2addr(), lua_lock, lua_unlock, and moveto().
Referenced by luaB_xpcall(), and pushglobalfuncname().


| LUA_API void() lua_createtable | ( | lua_State * | L, | |
| int | narr, | |||
| int | nrec | |||
| ) |
Definition at line 666 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, luaC_checkGC, luaH_new(), luaH_resize(), sethvalue, and lua_State::top.
Referenced by ai::cfun_ai_get_attacks(), ai::cfun_ai_get_avoid(), ai::cfun_ai_get_recruitment_pattern(), ai::cfun_ai_get_targets(), createmetatable(), db_getinfo(), getargs(), impl_side_get(), impl_unit_get(), impl_vconfig_get(), LuaKernel::initialize(), intf_find_path(), intf_find_reach(), intf_get_locations(), intf_get_sides(), intf_get_starting_location(), ll_seeall(), LuaKernel::load_game(), LuaKernel::LuaKernel(), luaL_findtable(), luaopen_package(), luaW_filltable(), luaW_pushsimdata(), os_date(), pack(), ai::push_map_location(), ai::push_move_map(), ai::push_movements(), and scoped_dialog::scoped_dialog().


| LUA_API int() lua_dump | ( | lua_State * | L, | |
| lua_Writer | writer, | |||
| void * | data | |||
| ) |
Definition at line 994 of file lapi.c.
References api_checknelems, getproto, isLfunction, lua_lock, lua_unlock, luaU_dump(), and lua_State::top.
Referenced by str_dump().


| LUA_API int() lua_error | ( | lua_State * | L | ) |
Definition at line 1102 of file lapi.c.
References api_checknelems, lua_lock, lua_unlock, and luaG_errormsg().
Referenced by intf_dofile(), luaB_auxwrap(), luaB_dofile(), luaB_error(), and luaL_error().


| LUA_API int() lua_gc | ( | lua_State * | L, | |
| int | what, | |||
| int | data | |||
| ) |
Definition at line 1018 of file lapi.c.
References cast_int, G, global_State::gckind, global_State::gcmajorinc, global_State::gcpause, global_State::gcrunning, GCSpause, global_State::gcstate, global_State::gcstepmul, gettotalbytes, KGC_GEN, KGC_NORMAL, global_State::lastmajormem, LUA_GCCOLLECT, LUA_GCCOUNT, LUA_GCCOUNTB, LUA_GCGEN, LUA_GCINC, LUA_GCISRUNNING, LUA_GCRESTART, LUA_GCSETMAJORINC, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, LUA_GCSTEP, LUA_GCSTOP, lua_lock, lua_unlock, luaC_changemode(), luaC_forcestep(), luaC_fullgc(), and luaE_setdebt().
Referenced by luaB_collectgarbage(), pmain(), and report().


Definition at line 1154 of file lapi.c.
References G, lua_lock, and lua_unlock.
| LUA_API int() lua_getctx | ( | lua_State * | L, | |
| int * | ctx | |||
| ) |
Definition at line 877 of file lapi.c.
References CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_YIELDED, and CallInfo::u.
Referenced by pcallcont().

| LUA_API void() lua_getfield | ( | lua_State * | L, | |
| int | idx, | |||
| const char * | k | |||
| ) |
Definition at line 620 of file lapi.c.
References api_checkvalidindex, api_incr_top, index2addr(), lua_lock, lua_unlock, luaS_new(), luaV_gettable(), setsvalue2s, and lua_State::top.
Referenced by ai::cfun_attack_rating(), dolibrary(), findfile(), findloader(), g_iofile(), ai::lua_ai_context::get_persistent_data(), getboolfield(), getfield(), getiofile(), io_close(), io_lines(), ll_module(), ll_require(), LuaKernel::LuaKernel(), luaL_getsubtable(), luaL_pushmodule(), luaopen_table(), noenv(), and searcher_preload().


| LUA_API void() lua_getglobal | ( | lua_State * | L, | |
| const char * | var | |||
| ) |
Definition at line 599 of file lapi.c.
References G, hvalue, lua_lock, LUA_RIDX_GLOBALS, lua_unlock, luaH_getint(), luaS_new(), luaV_gettable(), setsvalue2s, and lua_State::top.
Referenced by dotty(), get_prompt(), LuaKernel::initialize(), luaB_print(), LuaKernel::LuaKernel(), and LuaKernel::set_wml_action().


Definition at line 65 of file ldebug.c.
References lua_State::hook.
Referenced by db_gethook().

| LUA_API int() lua_gethookcount | ( | lua_State * | L | ) |
Definition at line 75 of file ldebug.c.
References lua_State::basehookcount.
Referenced by db_gethook().

| LUA_API int() lua_gethookmask | ( | lua_State * | L | ) |
Definition at line 70 of file ldebug.c.
References lua_State::hookmask.
Referenced by db_gethook().

Definition at line 263 of file ldebug.c.
References api_check, auxgetinfo(), clvalue, collectvalidlines(), CallInfo::func, lua_Debug::i_ci, incr_top, lua_assert, lua_lock, lua_unlock, setobjs2s, lua_State::top, ttisclosure, and ttisfunction.
Referenced by checkupval(), db_getinfo(), hookf(), luaL_argerror(), luaL_traceback(), luaL_where(), pushglobalfuncname(), and set_env().


Definition at line 141 of file ldebug.c.
References api_incr_top, clLvalue, findlocal(), lua_Debug::i_ci, isLfunction, lua_lock, lua_unlock, luaF_getlocalname(), pos, setobj2s, and lua_State::top.
Referenced by db_getlocal().


| LUA_API int() lua_getmetatable | ( | lua_State * | L, | |
| int | objindex | |||
| ) |
Definition at line 679 of file lapi.c.
References api_incr_top, G, hvalue, index2addr(), lua_lock, LUA_TTABLE, LUA_TUSERDATA, lua_unlock, sethvalue, lua_State::top, ttypenv, and uvalue.
Referenced by db_getmetatable(), ll_seeall(), luaB_getmetatable(), luaL_getmetafield(), luaL_testudata(), luaW_hasmetatable(), luaW_toconfig(), and tstring_concat_aux().


Definition at line 80 of file ldebug.c.
References lua_State::base_ci, lua_State::ci, lua_Debug::i_ci, lua_lock, lua_unlock, and CallInfo::previous.
Referenced by countlevels(), db_getinfo(), db_getlocal(), db_setlocal(), luaB_costatus(), luaL_argerror(), luaL_traceback(), luaL_where(), and set_env().

| LUA_API void() lua_gettable | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 610 of file lapi.c.
References api_checkvalidindex, index2addr(), lua_lock, lua_unlock, luaV_gettable(), and lua_State::top.
Referenced by add_value(), ll_register(), and ai::lua_object< T >::to_type().


| LUA_API int() lua_gettop | ( | lua_State * | L | ) |
Definition at line 151 of file lapi.c.
References cast_int, lua_State::ci, CallInfo::func, and lua_State::top.
Referenced by andaux(), aux_lines(), auxresume(), b_or(), b_xor(), ai::cfun_ai_get_attacks(), ai::cfun_attack_rating(), docall(), dofilecont(), dotty(), finishpcall(), g_read(), g_write(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), intf_dofile(), intf_get_dialog_value(), intf_set_dialog_active(), intf_set_dialog_callback(), intf_set_dialog_canvas(), intf_set_dialog_value(), ll_module(), luaB_assert(), luaB_auxwrap(), luaB_coresume(), luaB_costatus(), luaB_load(), luaB_pcall(), luaB_print(), luaB_select(), luaB_xpcall(), luaB_yield(), luaL_loadfilex(), luaL_traceback(), luaW_pcall(), luaW_toconfig(), math_max(), math_min(), math_random(), pack(), ai::push_movements(), pushglobalfuncname(), ai::lua_ai_context::set_persistent_data(), str_char(), str_format(), and tinsert().

| LUA_API const char*() lua_getupvalue | ( | lua_State * | L, | |
| int | funcindex, | |||
| int | n | |||
| ) |
Definition at line 1210 of file lapi.c.
References api_incr_top, aux_upvalue(), index2addr(), lua_lock, lua_unlock, setobj2s, and lua_State::top.
Referenced by auxupvalue().


| LUA_API void() lua_getuservalue | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 708 of file lapi.c.
References api_check, api_checkvalidindex, api_incr_top, index2addr(), lua_lock, lua_unlock, sethvalue, setnilvalue, lua_State::top, ttisuserdata, and uvalue.
Referenced by db_getuservalue().


| LUA_API void() lua_insert | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 184 of file lapi.c.
References api_checkvalidindex, index2addr(), lua_lock, lua_unlock, setobjs2s, and lua_State::top.
Referenced by auxupvalue(), docall(), dotty(), LuaKernel::execute(), findfield(), handle_script(), ll_loadlib(), ll_require(), ll_searchpath(), load_aux(), loadline(), luaB_auxwrap(), luaB_coresume(), luaB_pcall(), luaL_addvalue(), luaL_openlib(), and luaW_pcall().


| LUA_API int() lua_iscfunction | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 252 of file lapi.c.
References index2addr(), ttisCclosure, and ttislcf.
Referenced by db_upvaluejoin(), and set_env().


| LUA_API int() lua_isnumber | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 258 of file lapi.c.
References index2addr(), and tonumber.
Referenced by ai::ai_attack(), db_getinfo(), impl_vconfig_get(), intf_fire_event(), intf_get_time_of_day(), intf_put_unit(), intf_simulate_combat(), luaW_toconfig(), and ai::to_map_location().


| LUA_API int() lua_isstring | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 265 of file lapi.c.
References LUA_TNUMBER, LUA_TSTRING, and lua_type().
Referenced by add_value(), addfield(), findloader(), generic_reader(), luaB_auxwrap(), luaB_error(), and luaW_toconfig().


| LUA_API int() lua_isuserdata | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 271 of file lapi.c.
References index2addr(), ttislightuserdata, and ttisuserdata.
Referenced by ai::cfun_ai_get_suitable_keep(), intf_find_path(), intf_find_reach(), and ai::to_map_location().


| LUA_API void() lua_len | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 1144 of file lapi.c.
References api_incr_top, index2addr(), lua_lock, lua_unlock, luaV_objlen(), and lua_State::top.
Referenced by luaL_len().


| LUA_API int() lua_load | ( | lua_State * | L, | |
| lua_Reader | reader, | |||
| void * | dt, | |||
| const char * | chunkname, | |||
| const char * | mode | |||
| ) |
Definition at line 970 of file lapi.c.
References clLvalue, G, hvalue, lua_lock, LUA_OK, LUA_RIDX_GLOBALS, lua_unlock, luaC_barrier, luaD_protectedparser(), luaH_getint(), luaZ_init(), setobj, lua_State::top, LClosure::upvals, and UpVal::v.
Referenced by combine(), luaB_load(), luaL_loadbufferx(), and luaL_loadfilex().


Definition at line 228 of file lstate.c.
References global_State::allgc, global_State::allweak, bit2mask, global_State::buff, cast, close_state(), global_State::currentwhite, global_State::ephemeron, f_luaopen(), global_State::finobj, FIXEDBIT, global_State::frealloc, LG::g, global_State::GCdebt, global_State::gckind, global_State::gcmajorinc, global_State::gcpause, global_State::gcrunning, global_State::gcstate, global_State::gcstepmul, global_State::gray, global_State::grayagain, stringtable::hash, if(), UpVal::l, LX::l, LG::l, global_State::l_registry, global_State::lastmajormem, LUA_TTHREAD, lua_version(), luaC_white, luaD_rawrunprotected(), luai_userstateopen, luaZ_initbuffer, global_State::mainthread, global_State::mt, stringtable::nuse, global_State::panic, preinit_state(), setnilvalue, stringtable::size, global_State::strt, global_State::tobefnz, global_State::totalbytes, UpVal::u, global_State::ud, global_State::uvhead, global_State::version, global_State::weak, and WHITE0BIT.
Referenced by luaL_newstate().


Definition at line 199 of file lstate.c.
References api_incr_top, lua_State::basehookcount, G, lua_State::hook, lua_State::hookmask, lua_lock, LUA_TTHREAD, lua_unlock, luaC_checkGC, luaC_newobj(), luai_userstatethread, preinit_state(), resethookcount, setthvalue, stack_init(), GCObject::th, and lua_State::top.
Referenced by luaB_cocreate().


| LUA_API void*() lua_newuserdata | ( | lua_State * | L, | |
| size_t | sz | |||
| ) |
Definition at line 1172 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, luaC_checkGC, luaS_newudata(), setuvalue, and lua_State::top.
Referenced by impl_tstring_concat(), impl_vconfig_get(), LuaKernel::initialize(), intf_copy_unit(), intf_create_unit(), intf_get_displayed_unit(), intf_get_recall_units(), intf_get_sides(), intf_get_unit(), intf_get_units(), intf_textdomain(), ll_register(), LuaKernel::LuaKernel(), luaL_prepbuffsize(), luaW_pushtstring(), luaW_pushvconfig(), newprefile(), and LuaKernel::run_filter().


| LUA_API int() lua_next | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 1111 of file lapi.c.
References api_check, api_incr_top, hvalue, index2addr(), lua_lock, lua_unlock, luaH_next(), lua_State::top, and ttistable.
Referenced by findfield(), luaB_next(), LuaKernel::LuaKernel(), luaW_toconfig(), and maxn().


| LUA_API int() lua_pcallk | ( | lua_State * | L, | |
| int | nargs, | |||
| int | nresults, | |||
| int | errfunc, | |||
| int | ctx, | |||
| lua_CFunction | k | |||
| ) |
Definition at line 925 of file lapi.c.
References adjustresults, lua_State::allowhook, api_check, api_checknelems, api_checkvalidindex, CallInfo::c, CallInfo::callstatus, checkresults, lua_State::ci, lua_State::errfunc, f_call(), CallS::func, index2addr(), isLua, lua_lock, LUA_OK, lua_unlock, luaD_call(), luaD_pcall(), lua_State::nny, CallS::nresults, savestack, lua_State::status, lua_State::top, and CallInfo::u.
Referenced by luaB_pcall(), and luaB_xpcall().


| LUA_API void() lua_pushboolean | ( | lua_State * | L, | |
| int | b | |||
| ) |
Definition at line 568 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, setbvalue, and lua_State::top.
Referenced by aux_lines(), b_test(), ai::cfun_ai_get_passive_leader(), ai::cfun_ai_get_passive_leader_shares_keep(), ai::cfun_ai_get_recruitment_ignore_bad_combat(), ai::cfun_ai_get_recruitment_ignore_bad_movement(), ai::cfun_ai_get_simple_targeting(), ai::cfun_ai_get_support_villages(), ai::cfun_ai_is_dst_src_enemy_valid(), ai::cfun_ai_is_dst_src_valid(), ai::cfun_ai_is_src_dst_enemy_valid(), ai::cfun_ai_is_src_dst_valid(), finishpcall(), impl_unit_status_get(), intf_compare_versions(), intf_eval_conditional(), intf_fire_event(), intf_get_dialog_value(), intf_get_terrain_info(), intf_is_enemy(), intf_match_location(), intf_match_side(), intf_match_unit(), intf_unit_ability(), ll_loadfunc(), ll_require(), luaB_collectgarbage(), luaB_coresume(), luaB_corunning(), luaB_rawequal(), luaL_execresult(), luaL_fileresult(), luaW_pushscalar_visitor::operator()(), os_execute(), pmain(), ai::push_attack_analysis(), setboolfield(), settabsb(), and ai::transform_ai_action().

| LUA_API void() lua_pushcclosure | ( | lua_State * | L, | |
| lua_CFunction | fn, | |||
| int | n | |||
| ) |
Definition at line 546 of file lapi.c.
References api_check, api_checknelems, api_incr_top, Closure::c, CClosure::f, lua_lock, lua_unlock, luaC_checkGC, luaF_newCclosure(), MAXUPVAL, setclCvalue, setfvalue, setobj2n, lua_State::top, and CClosure::upvalue.
Referenced by aux_lines(), ai::lua_ai_context::create(), gmatch(), impl_theme_items_get(), luaB_cowrap(), luaL_setfuncs(), luaopen_package(), ai::push_attack_analysis(), and LuaKernel::set_wml_action().


| LUA_API const char*() lua_pushfstring | ( | lua_State * | L, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Definition at line 533 of file lapi.c.
References lua_lock, lua_unlock, luaC_checkGC, and luaO_pushvfstring().
Referenced by checkoption(), db_getinfo(), dotty(), errfile(), f_tostring(), ll_register(), loadfunc(), luaL_checkoption(), luaL_fileresult(), luaL_loadfilex(), luaL_tolstring(), luaL_traceback(), luaL_where(), pushfuncname(), pushline(), searcher_Croot(), searcher_preload(), searchpath(), and typeerror().


| LUA_API void() lua_pushinteger | ( | lua_State * | L, | |
| lua_Integer | n | |||
| ) |
Definition at line 474 of file lapi.c.
References api_incr_top, cast_num, lua_lock, lua_unlock, setnvalue, and lua_State::top.
Referenced by aux_lines(), ai::cfun_ai_get_avoid(), ai::cfun_ai_get_recruitment_pattern(), ai::cfun_ai_get_targets(), lua_calculator::cost(), ai::lua_ai_context::create(), db_gethook(), gmatch(), gmatch_aux(), hookf(), impl_unit_get(), impl_vconfig_size(), intf_find_path(), intf_find_reach(), intf_find_vacant_tile(), intf_get_dialog_value(), intf_get_image_size(), intf_get_locations(), intf_get_map_size(), intf_get_mouseover_tile(), intf_get_selected_tile(), intf_get_starting_location(), intf_get_terrain_info(), intf_get_time_of_day(), intf_get_village_owner(), intf_show_dialog(), intf_unit_defense(), intf_unit_movement_cost(), intf_unit_resistance(), ipairsaux(), luaB_collectgarbage(), luaB_rawlen(), luaB_select(), luaL_execresult(), luaL_fileresult(), luaL_unref(), main(), math_frexp(), pack(), pairsmeta(), ai::push_attack_analysis(), ai::push_map_location(), ai::push_move_map(), push_onecapture(), setfield(), settabsi(), str_byte(), str_find_aux(), str_gsub(), str_len(), ai::lua_object< T >::to_type(), and ai::transform_ai_action().
| LUA_API void() lua_pushlightuserdata | ( | lua_State * | L, | |
| void * | p | |||
| ) |
Definition at line 576 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, setpvalue, and lua_State::top.
Referenced by ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), db_upvalueid(), dialog_callback(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), impl_tstring_concat(), impl_unit_get(), impl_vconfig_get(), ai::lua_ai_context::init(), LuaKernel::initialize(), intf_copy_unit(), intf_create_unit(), intf_get_displayed_unit(), intf_get_recall_units(), intf_get_sides(), intf_get_unit(), intf_get_units(), intf_set_dialog_callback(), intf_textdomain(), ai::lua_ai_context::load(), LuaKernel::LuaKernel(), luaW_hasmetatable(), luaW_pcall(), luaW_pushtstring(), luaW_pushvconfig(), luaW_toconfig(), main(), ai::push_attack_analysis(), LuaKernel::run_filter(), scoped_dialog::scoped_dialog(), ai::lua_ai_context::set_persistent_data(), LuaKernel::set_wml_action(), ai::lua_ai_action_handler::~lua_ai_action_handler(), ai::lua_ai_context::~lua_ai_context(), and scoped_dialog::~scoped_dialog().

| LUA_API const char*() lua_pushlstring | ( | lua_State * | L, | |
| const char * | s, | |||
| size_t | l | |||
| ) |
Definition at line 492 of file lapi.c.
References api_incr_top, getstr, lua_lock, lua_unlock, luaC_checkGC, luaS_newlstr(), setsvalue2s, and lua_State::top.
Referenced by add_value(), loadfunc(), luaL_findtable(), luaL_pushresult(), modinit(), push_onecapture(), pushnexttemplate(), searcher_Croot(), str_sub(), and test_eof().


| LUA_API void() lua_pushnil | ( | lua_State * | L | ) |
Definition at line 456 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, setnilvalue, and lua_State::top.
Referenced by db_getinfo(), db_getlocal(), db_getmetatable(), db_getuservalue(), findfield(), g_read(), hookf(), intf_set_dialog_callback(), io_lines(), io_noclose(), io_type(), ll_loadlib(), ll_searchpath(), load_aux(), lua_pushstring(), luaB_getmetatable(), luaB_next(), luaB_pcall(), luaB_tonumber(), LuaKernel::LuaKernel(), luaL_execresult(), luaL_fileresult(), luaW_toconfig(), maxn(), luaW_pushscalar_visitor::operator()(), os_date(), os_time(), pairsmeta(), read_number(), str_find_aux(), tremove(), ai::lua_ai_action_handler::~lua_ai_action_handler(), and ai::lua_ai_context::~lua_ai_context().

| LUA_API void() lua_pushnumber | ( | lua_State * | L, | |
| lua_Number | n | |||
| ) |
Definition at line 464 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, luaG_runerror(), luai_checknum, setnvalue, and lua_State::top.
Referenced by ai::cfun_ai_get_aggression(), ai::cfun_ai_get_attack_depth(), ai::cfun_ai_get_caution(), ai::cfun_ai_get_leader_aggression(), ai::cfun_ai_get_leader_value(), ai::cfun_ai_get_number_of_possible_recruits_to_force_recruit(), ai::cfun_ai_get_scout_village_targeting(), ai::cfun_ai_get_suitable_keep(), ai::cfun_ai_get_targets(), ai::cfun_ai_get_village_value(), ai::cfun_ai_get_villages_per_scout(), ai::cfun_attack_rating(), lua_calculator::cost(), f_seek(), luaB_collectgarbage(), luaB_tonumber(), luaL_checkversion_(), luaopen_math(), luaW_pushsimdata(), math_abs(), math_acos(), math_asin(), math_atan(), math_atan2(), math_ceil(), math_cos(), math_cosh(), math_deg(), math_exp(), math_floor(), math_fmod(), math_frexp(), math_ldexp(), math_log(), math_log10(), math_max(), math_min(), math_modf(), math_pow(), math_rad(), math_random(), math_sin(), math_sinh(), math_sqrt(), math_tan(), math_tanh(), maxn(), luaW_pushscalar_visitor::operator()(), os_clock(), os_difftime(), os_time(), ai::push_attack_analysis(), and read_number().

| LUA_API const char*() lua_pushstring | ( | lua_State * | L, | |
| const char * | s | |||
| ) |
Definition at line 504 of file lapi.c.
References api_incr_top, getstr, lua_lock, lua_pushnil(), lua_unlock, luaC_checkGC, luaS_new(), setsvalue2s, and lua_State::top.
Referenced by auxupvalue(), ai::cfun_ai_get_grouping(), ai::cfun_ai_get_recruitment_pattern(), ai::cfun_ai_get_targets(), checkload(), db_gethook(), db_getlocal(), db_setlocal(), dolibrary(), findloader(), finishpcall(), getargs(), hookf(), impl_race_get(), impl_side_get(), impl_tstring_tostring(), impl_unit_get(), impl_unit_type_get(), impl_vconfig_get(), LuaKernel::initialize(), intf_debug(), intf_find_path(), intf_find_reach(), intf_get_dialog_value(), intf_get_terrain(), intf_get_terrain_info(), intf_get_time_of_day(), intf_get_traits(), intf_require(), ll_loadlib(), ll_require(), LuaKernel::load_game(), LuaKernel::load_package(), luaB_type(), LuaKernel::LuaKernel(), luaL_execresult(), luaL_getmetafield(), luaL_requiref(), luaL_tolstring(), luaW_filltable(), luaW_getglobal(), modinit(), luaW_pushscalar_visitor::operator()(), os_getenv(), os_setlocale(), os_tmpname(), ai::push_attack_analysis(), ai::push_map_location(), ai::push_movements(), pushline(), LuaKernel::run_event(), searcher_Croot(), LuaKernel::set_wml_action(), setpath(), settabss(), and ai::lua_object< T >::to_type().

| LUA_API int() lua_pushthread | ( | lua_State * | L | ) |
Definition at line 584 of file lapi.c.
References api_incr_top, G, lua_lock, lua_unlock, setthvalue, and lua_State::top.
Referenced by luaB_corunning().

| LUA_API void() lua_pushunsigned | ( | lua_State * | L, | |
| lua_Unsigned | n | |||
| ) |
Definition at line 482 of file lapi.c.
References api_incr_top, lua_lock, lua_unlock, lua_unsigned2number, setnvalue, and lua_State::top.
Referenced by b_and(), b_arshift(), b_extract(), b_not(), b_or(), b_replace(), b_rot(), b_shift(), and b_xor().

| LUA_API void() lua_pushvalue | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 226 of file lapi.c.
References api_incr_top, index2addr(), lua_lock, lua_unlock, setobj2s, and lua_State::top.
Referenced by add_value(), aux_lines(), auxsort(), checkupval(), lua_calculator::cost(), ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), createmeta(), createmetatable(), createstdfile(), db_getinfo(), db_getlocal(), db_getregistry(), db_sethook(), db_traceback(), dooptions(), f_write(), g_iofile(), generic_reader(), impl_theme_items_get(), impl_theme_items_set(), impl_unit_get(), LuaKernel::initialize(), intf_get_recall_units(), intf_get_sides(), intf_get_units(), intf_require(), intf_set_dialog_callback(), intf_show_dialog(), io_readline(), ll_module(), ll_register(), ll_require(), ll_seeall(), luaB_cocreate(), luaB_error(), luaB_load(), luaB_loadfile(), luaB_print(), luaB_xpcall(), luaL_callmeta(), luaL_findtable(), luaL_getsubtable(), luaL_newmetatable(), luaL_pushmodule(), luaL_requiref(), luaL_setfuncs(), luaL_tolstring(), luaopen_package(), modinit(), pack(), pairsmeta(), scoped_dialog::scoped_dialog(), set_env(), sort_comp(), treatstackoption(), and scoped_dialog::~scoped_dialog().

| LUA_API const char*() lua_pushvfstring | ( | lua_State * | L, | |
| const char * | fmt, | |||
| va_list | argp | |||
| ) |
Definition at line 522 of file lapi.c.
References lua_lock, lua_unlock, luaC_checkGC, and luaO_pushvfstring().
Referenced by luaL_error().


| LUA_API int() lua_rawequal | ( | lua_State * | L, | |
| int | idx1, | |||
| int | idx2 | |||
| ) |
Definition at line 277 of file lapi.c.
References index2addr(), isvalid, and luaV_rawequalobj.
Referenced by findfield(), luaB_rawequal(), luaL_testudata(), luaW_hasmetatable(), luaW_toconfig(), and tstring_concat_aux().


| LUA_API void() lua_rawget | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 632 of file lapi.c.
References api_check, hvalue, index2addr(), lua_lock, lua_unlock, luaH_get(), setobj2s, lua_State::top, and ttistable.
Referenced by ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), dialog_callback(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), impl_race_get(), impl_tstring_concat(), impl_unit_get(), impl_unit_type_get(), impl_vconfig_get(), LuaKernel::initialize(), intf_copy_unit(), intf_create_unit(), intf_find_path(), intf_find_reach(), intf_get_displayed_unit(), intf_get_recall_units(), intf_get_sides(), intf_get_unit(), intf_get_units(), intf_require(), intf_set_dialog_callback(), intf_textdomain(), ai::lua_ai_context::load(), luaB_rawget(), luaL_findtable(), luaL_getmetafield(), luaW_getglobal(), luaW_hasmetatable(), luaW_pcall(), luaW_pushtstring(), luaW_pushvconfig(), luaW_toconfig(), LuaKernel::run_filter(), scoped_dialog::scoped_dialog(), ai::lua_ai_context::set_persistent_data(), LuaKernel::set_wml_action(), ai::lua_object< T >::to_type(), ai::lua_ai_action_handler::~lua_ai_action_handler(), ai::lua_ai_context::~lua_ai_context(), and scoped_dialog::~scoped_dialog().


| LUA_API void() lua_rawgeti | ( | lua_State * | L, | |
| int | idx, | |||
| int | n | |||
| ) |
Definition at line 642 of file lapi.c.
References api_check, api_incr_top, hvalue, index2addr(), lua_lock, lua_unlock, luaH_getint(), setobj2s, lua_State::top, and ttistable.
Referenced by addfield(), auxsort(), dialog_callback(), findloader(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), impl_side_set(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_variables_get(), impl_unit_variables_set(), intf_get_time_of_day(), ipairsaux(), ai::lua_ai_context::load(), luaL_ref(), luaL_unref(), luaW_toconfig(), ai::lua_ai_context::set_persistent_data(), tinsert(), ai::lua_object< T >::to_type(), tremove(), unpack(), and scoped_dialog::~scoped_dialog().


| LUA_API void() lua_rawgetp | ( | lua_State * | L, | |
| int | idx, | |||
| const void * | p | |||
| ) |
Definition at line 653 of file lapi.c.
References api_check, api_incr_top, cast, hvalue, index2addr(), lua_lock, lua_unlock, luaH_get(), setobj2s, setpvalue, lua_State::top, and ttistable.
Referenced by db_gethook(), and hookf().


| LUA_API size_t() lua_rawlen | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 398 of file lapi.c.
References hvalue, index2addr(), LUA_TSTRING, LUA_TTABLE, LUA_TUSERDATA, luaH_getn(), tsvalue, ttypenv, and uvalue.
Referenced by ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), intf_set_dialog_callback(), luaB_rawlen(), luaL_ref(), luaW_toconfig(), read_line(), and ai::lua_object< T >::to_type().


| LUA_API void() lua_rawset | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 766 of file lapi.c.
References api_check, api_checknelems, gcvalue, hvalue, index2addr(), invalidateTMcache, lua_lock, lua_unlock, luaC_barrierback, luaH_set(), setobj2t, lua_State::top, and ttistable.
Referenced by ai::cfun_ai_get_targets(), impl_theme_items_get(), impl_theme_items_set(), ai::lua_ai_context::init(), intf_get_traits(), luaB_rawset(), LuaKernel::LuaKernel(), ai::push_attack_analysis(), ai::push_map_location(), ai::push_movements(), scoped_dialog::scoped_dialog(), LuaKernel::set_wml_action(), and scoped_dialog::~scoped_dialog().


| LUA_API void() lua_rawseti | ( | lua_State * | L, | |
| int | idx, | |||
| int | n | |||
| ) |
Definition at line 780 of file lapi.c.
References api_check, api_checknelems, gcvalue, hvalue, index2addr(), lua_lock, lua_unlock, luaC_barrierback, luaH_setint(), lua_State::top, and ttistable.
Referenced by ai::cfun_ai_get_attacks(), ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), getargs(), impl_side_get(), impl_unit_get(), impl_vconfig_get(), LuaKernel::initialize(), intf_find_path(), intf_find_reach(), intf_get_locations(), intf_get_recall_units(), intf_get_sides(), intf_get_starting_location(), intf_get_units(), intf_set_dialog_callback(), LuaKernel::load_game(), luaL_ref(), luaL_unref(), luaopen_package(), luaW_filltable(), luaW_pushsimdata(), pack(), ai::push_move_map(), ai::push_movements(), scoped_dialog::scoped_dialog(), set2(), tinsert(), tremove(), ai::lua_ai_action_handler::~lua_ai_action_handler(), and ai::lua_ai_context::~lua_ai_context().


| LUA_API void() lua_rawsetp | ( | lua_State * | L, | |
| int | idx, | |||
| const void * | p | |||
| ) |
Definition at line 793 of file lapi.c.
References api_check, api_checknelems, cast, gcvalue, hvalue, index2addr(), lua_lock, lua_unlock, luaC_barrierback, luaH_set(), setobj2t, setpvalue, lua_State::top, and ttistable.
Referenced by db_sethook().


| LUA_API void() lua_remove | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 173 of file lapi.c.
References api_checkvalidindex, index2addr(), lua_lock, lua_unlock, setobjs2s, and lua_State::top.
Referenced by ai::lua_ai_action_handler::create(), db_gethook(), dialog_callback(), docall(), dolibrary(), errfile(), findfield(), ai::lua_ai_action_handler::handle(), ai::lua_ai_context::load(), loadline(), LuaKernel::LuaKernel(), luaL_addvalue(), luaL_findtable(), luaL_getmetafield(), luaL_loadfilex(), luaL_prepbuffsize(), luaL_pushmodule(), luaL_pushresult(), luaW_getglobal(), luaW_pcall(), pushfuncname(), searchpath(), setpath(), treatstackoption(), and scoped_dialog::~scoped_dialog().


| LUA_API void() lua_replace | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 207 of file lapi.c.
References api_checknelems, lua_lock, lua_unlock, moveto(), and lua_State::top.
Referenced by finishpcall(), generic_reader(), gmatch_aux(), io_lines(), luaB_xpcall(), and pack().


Definition at line 541 of file ldo.c.
References api_checknelems, cast_byte, lua_State::ci, lua_assert, lua_lock, LUA_OK, lua_unlock, LUA_YIELD, luaD_rawrunprotected(), luai_userstateresume, lua_State::nCcalls, lua_State::nny, recover(), resume(), seterrorobj(), lua_State::status, lua_longjmp::status, CallInfo::top, lua_State::top, and unroll().
Referenced by auxresume().


Definition at line 1164 of file lapi.c.
References G, lua_lock, and lua_unlock.
| LUA_API void() lua_setfield | ( | lua_State * | L, | |
| int | idx, | |||
| const char * | k | |||
| ) |
Definition at line 753 of file lapi.c.
References api_checknelems, api_checkvalidindex, index2addr(), lua_lock, lua_unlock, luaS_new(), luaV_settable(), setsvalue2s, and lua_State::top.
Referenced by ai::lua_ai_context::create(), createmeta(), createmetatable(), createstdfile(), dolibrary(), g_iofile(), impl_vconfig_get(), LuaKernel::initialize(), intf_get_terrain_info(), intf_get_time_of_day(), ll_require(), ll_seeall(), LuaKernel::LuaKernel(), luaL_getsubtable(), luaL_newmetatable(), luaL_openlibs(), luaL_pushmodule(), luaL_requiref(), luaL_setfuncs(), luaopen_base(), luaopen_math(), luaopen_package(), luaW_filltable(), luaW_pushsimdata(), modinit(), pack(), pmain(), ai::lua_ai_context::set_persistent_data(), setboolfield(), setfield(), setpath(), settabsb(), settabsi(), settabss(), ai::transform_ai_action(), and treatstackoption().


| LUA_API void() lua_setglobal | ( | lua_State * | L, | |
| const char * | var | |||
| ) |
Definition at line 728 of file lapi.c.
References api_checknelems, G, hvalue, lua_lock, LUA_RIDX_GLOBALS, lua_unlock, luaH_getint(), luaS_new(), luaV_settable(), setsvalue2s, and lua_State::top.
Referenced by handle_script(), LuaKernel::LuaKernel(), and luaopen_table().


Definition at line 50 of file ldebug.c.
References lua_State::basehookcount, cast_byte, lua_State::ci, lua_State::hook, lua_State::hookmask, isLua, CallInfo::l, lua_State::oldpc, resethookcount, and CallInfo::u.
Referenced by db_sethook(), laction(), and lstop().

Definition at line 163 of file ldebug.c.
References findlocal(), lua_Debug::i_ci, lua_lock, lua_unlock, pos, setobjs2s, and lua_State::top.
Referenced by db_setlocal().


| LUA_API int() lua_setmetatable | ( | lua_State * | L, | |
| int | objindex | |||
| ) |
Definition at line 808 of file lapi.c.
References api_check, api_checknelems, api_checkvalidindex, G, gcvalue, hvalue, index2addr(), lua_lock, LUA_TTABLE, LUA_TUSERDATA, lua_unlock, luaC_checkfinalizer(), luaC_objbarrier, luaC_objbarrierback, rawuvalue, lua_State::top, ttisnil, ttistable, ttypenv, and uvalue.
Referenced by createmetatable(), db_setmetatable(), impl_tstring_concat(), impl_unit_get(), impl_vconfig_get(), LuaKernel::initialize(), intf_copy_unit(), intf_create_unit(), intf_get_displayed_unit(), intf_get_recall_units(), intf_get_sides(), intf_get_unit(), intf_get_units(), intf_textdomain(), ll_seeall(), luaB_setmetatable(), LuaKernel::LuaKernel(), luaL_setmetatable(), luaW_pushtstring(), luaW_pushvconfig(), and LuaKernel::run_filter().


| LUA_API void() lua_settable | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 741 of file lapi.c.
References api_checknelems, api_checkvalidindex, index2addr(), lua_lock, lua_unlock, luaV_settable(), and lua_State::top.
Referenced by ai::cfun_ai_get_avoid(), ai::cfun_ai_get_recruitment_pattern(), intf_require(), ll_register(), luaL_findtable(), and ai::push_move_map().


| LUA_API void() lua_settop | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 156 of file lapi.c.
References api_check, lua_State::ci, CallInfo::func, lua_lock, lua_unlock, setnilvalue, and lua_State::top.
Referenced by ai::cfun_attack_rating(), db_debug(), db_sethook(), db_setlocal(), db_setmetatable(), db_setuservalue(), dotty(), finishpcall(), ai::lua_ai_context::get_persistent_data(), gmatch(), ai::lua_ai_action_handler::handle(), intf_dofile(), intf_get_recall_units(), intf_get_sides(), intf_get_units(), io_readline(), ll_require(), loadline(), luaB_dofile(), luaB_error(), luaB_load(), luaB_next(), luaB_rawget(), luaB_rawset(), luaB_setmetatable(), LuaKernel::LuaKernel(), luaL_loadfilex(), luaW_toconfig(), os_time(), pushglobalfuncname(), lua_synchronize::query_user(), ai::lua_ai_context::set_persistent_data(), sort(), str_dump(), and ai::lua_object< T >::to_type().

| LUA_API const char*() lua_setupvalue | ( | lua_State * | L, | |
| int | funcindex, | |||
| int | n | |||
| ) |
Definition at line 1224 of file lapi.c.
References api_checknelems, aux_upvalue(), index2addr(), lua_lock, lua_unlock, luaC_barrier, setobj, and lua_State::top.
Referenced by auxupvalue(), luaB_load(), luaB_loadfile(), and set_env().


| LUA_API void() lua_setuservalue | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 848 of file lapi.c.
References api_check, api_checknelems, api_checkvalidindex, gcvalue, hvalue, index2addr(), lua_lock, lua_unlock, luaC_objbarrier, lua_State::top, ttisnil, ttistable, ttisuserdata, and uvalue.
Referenced by db_setuservalue().


| LUA_API int() lua_status | ( | lua_State * | L | ) |
Definition at line 1009 of file lapi.c.
References lua_State::status.
Referenced by auxresume(), and luaB_costatus().

| LUA_API int() lua_toboolean | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 374 of file lapi.c.
References index2addr(), and l_isfalse.
Referenced by add_value(), ai::ai_move(), getboolfield(), impl_unit_status_set(), impl_unit_variables_set(), intf_find_path(), intf_find_reach(), intf_get_time_of_day(), intf_get_variable(), intf_scroll_to_tile(), intf_select_hex(), intf_set_dialog_active(), intf_set_dialog_value(), intf_set_terrain(), intf_set_variable(), intf_set_village_owner(), intf_unit_resistance(), io_readline(), ll_require(), luaB_assert(), luaL_tolstring(), luaW_toconfig(), luaW_totstring(), main(), noenv(), os_exit(), LuaKernel::run_filter(), sort_comp(), str_find_aux(), and ai::lua_object< T >::to_type().


| LUA_API lua_CFunction() lua_tocfunction | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 409 of file lapi.c.
References clCvalue, fvalue, index2addr(), ttisCclosure, and ttislcf.

| LUA_API lua_Integer() lua_tointegerx | ( | lua_State * | L, | |
| int | idx, | |||
| int * | isnum | |||
| ) |
Definition at line 340 of file lapi.c.
References index2addr(), lua_number2integer, nvalue, and tonumber.
Referenced by getfield(), luaL_checkinteger(), and luaL_len().


| LUA_API const char*() lua_tolstring | ( | lua_State * | L, | |
| int | idx, | |||
| size_t * | len | |||
| ) |
Definition at line 380 of file lapi.c.
References index2addr(), lua_lock, lua_unlock, luaC_checkGC, luaV_tostring(), svalue, tsvalue, and ttisstring.
Referenced by add_s(), generic_reader(), gmatch_aux(), incomplete(), loadline(), luaB_load(), luaB_print(), luaL_addvalue(), luaL_checklstring(), and luaL_tolstring().


| LUA_API lua_Number() lua_tonumberx | ( | lua_State * | L, | |
| int | idx, | |||
| int * | isnum | |||
| ) |
Definition at line 326 of file lapi.c.
References index2addr(), nvalue, and tonumber.
Referenced by luaB_tonumber(), and luaL_checknumber().


| LUA_API const void*() lua_topointer | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 434 of file lapi.c.
References cast, clCvalue, clLvalue, fvalue, hvalue, index2addr(), LUA_TCCL, LUA_TLCF, LUA_TLCL, LUA_TLIGHTUSERDATA, lua_touserdata(), LUA_TTABLE, LUA_TTHREAD, LUA_TUSERDATA, thvalue, and ttype.
Referenced by luaL_tolstring().


Definition at line 428 of file lapi.c.
References index2addr(), thvalue, and ttisthread.
Referenced by getthread(), luaB_auxwrap(), luaB_coresume(), and luaB_costatus().


| LUA_API lua_Unsigned() lua_tounsignedx | ( | lua_State * | L, | |
| int | idx, | |||
| int * | isnum | |||
| ) |
Definition at line 357 of file lapi.c.
References index2addr(), lua_number2unsigned, nvalue, and tonumber.
Referenced by luaL_checkunsigned().


| LUA_API void*() lua_touserdata | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 418 of file lapi.c.
References index2addr(), LUA_TLIGHTUSERDATA, LUA_TUSERDATA, pvalue, rawuvalue, and ttypenv.
Referenced by ai::cfun_attack_rating(), cfun_wml_action(), ai::get_engine(), getiofile(), impl_gettext(), impl_side_get(), impl_side_set(), impl_tstring_collect(), impl_tstring_tostring(), impl_unit_collect(), impl_unit_get(), impl_unit_set(), impl_unit_variables_set(), impl_vconfig_collect(), impl_vconfig_get(), impl_vconfig_size(), intf_extract_unit(), intf_find_vacant_tile(), intf_match_unit(), intf_put_recall_unit(), intf_put_unit(), intf_set_variable(), io_readline(), ll_register(), lua_topointer(), luaL_testudata(), luaW_toconfig(), luaW_totstring(), luaW_tounit(), luaW_tovconfig(), pmain(), and tstring_concat_aux().


| LUA_API int() lua_type | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 240 of file lapi.c.
References index2addr(), isvalid, LUA_TNONE, and ttypenv.
Referenced by db_getuservalue(), db_setmetatable(), db_setuservalue(), finalreport(), findfield(), g_read(), g_write(), impl_unit_variables_set(), intf_set_variable(), lua_isstring(), luaB_rawlen(), luaB_select(), luaB_setmetatable(), luaL_checkany(), luaL_checktype(), luaL_tolstring(), luaW_toconfig(), luaW_totstring(), luaW_tovconfig(), maxn(), str_gsub(), and tstring_concat_aux().


| LUA_API const char*() lua_typename | ( | lua_State * | L, | |
| int | tp | |||
| ) |
Definition at line 246 of file lapi.c.
References ttypename, and UNUSED.
Referenced by tag_error().

| LUA_API void*() lua_upvalueid | ( | lua_State * | L, | |
| int | fidx, | |||
| int | n | |||
| ) |
Definition at line 1254 of file lapi.c.
References api_check, clCvalue, getupvalref(), index2addr(), LUA_TCCL, LUA_TLCL, ttype, and CClosure::upvalue.
Referenced by db_upvalueid().


| LUA_API void() lua_upvaluejoin | ( | lua_State * | L, | |
| int | fidx1, | |||
| int | n1, | |||
| int | fidx2, | |||
| int | n2 | |||
| ) |
Definition at line 1273 of file lapi.c.
References getupvalref(), and luaC_objbarrier.
Referenced by db_upvaluejoin().


| LUA_API const lua_Number*() lua_version | ( | lua_State * | L | ) |
Definition at line 128 of file lapi.c.
References G, and game_config::version.
Referenced by lua_newstate(), and luaL_checkversion_().

Definition at line 103 of file lapi.c.
References api_check, api_checknelems, lua_State::ci, G, lua_lock, lua_unlock, setobj2s, lua_State::top, and CallInfo::top.
Referenced by auxresume(), db_getinfo(), db_getlocal(), db_setlocal(), luaB_cocreate(), and treatstackoption().

| LUA_API int() lua_yieldk | ( | lua_State * | L, | |
| int | nresults, | |||
| int | ctx, | |||
| lua_CFunction | k | |||
| ) |
Definition at line 572 of file ldo.c.
References api_check, api_checknelems, CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_HOOKED, CallInfo::func, G, isLua, lua_assert, lua_lock, lua_unlock, LUA_YIELD, luaD_throw(), luaG_runerror(), luai_userstateyield, lua_State::nny, savestack, lua_State::status, lua_State::top, and CallInfo::u.

| Generated by doxygen 1.7.1 on Fri May 25 2012 01:08:15 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |