The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Typedefs | Functions | Variables
lua.h File Reference
#include <stdarg.h>
#include <stddef.h>
#include "luaconf.h"
Include dependency graph for lua.h:

Go to the source code of this file.

Classes

struct  lua_Debug
 

Macros

#define LUA_VERSION_MAJOR   "5"
 
#define LUA_VERSION_MINOR   "2"
 
#define LUA_VERSION_NUM   502
 
#define LUA_VERSION_RELEASE   "3"
 
#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-2013 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 /* ORDER TM */
 
#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)
 

Variables

const char lua_ident []
 

Macro Definition Documentation

#define LUA_AUTHORS   "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"

Definition at line 26 of file lua.h.

#define lua_call (   L,
  n,
  r 
)    lua_callk(L, (n), (r), 0, NULL)
#define LUA_COPYRIGHT   LUA_RELEASE " Copyright (C) 1994-2013 Lua.org, PUC-Rio"

Definition at line 25 of file lua.h.

Referenced by doargs(), and print_version().

#define LUA_ERRERR   6
#define LUA_ERRGCMM   5
#define LUA_ERRMEM   4
#define LUA_ERRRUN   2
#define LUA_ERRSYNTAX   3
#define LUA_GCCOLLECT   2

Definition at line 282 of file lua.h.

Referenced by lua_gc(), luaB_collectgarbage(), and report().

#define LUA_GCCOUNT   3

Definition at line 283 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCCOUNTB   4

Definition at line 284 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCGEN   10

Definition at line 290 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCINC   11

Definition at line 291 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCISRUNNING   9

Definition at line 289 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCRESTART   1

Definition at line 281 of file lua.h.

Referenced by lua_gc(), luaB_collectgarbage(), and pmain().

#define LUA_GCSETMAJORINC   8

Definition at line 288 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCSETPAUSE   6

Definition at line 286 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCSETSTEPMUL   7

Definition at line 287 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCSTEP   5

Definition at line 285 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

#define LUA_GCSTOP   0

Definition at line 280 of file lua.h.

Referenced by lua_gc(), luaB_collectgarbage(), and pmain().

#define LUA_HOOKCALL   0

Definition at line 359 of file lua.h.

Referenced by callhook(), and luaD_precall().

#define LUA_HOOKCOUNT   3

Definition at line 362 of file lua.h.

Referenced by traceexec().

#define LUA_HOOKLINE   2

Definition at line 361 of file lua.h.

Referenced by traceexec().

#define LUA_HOOKRET   1

Definition at line 360 of file lua.h.

Referenced by luaD_poscall().

#define LUA_HOOKTAILCALL   4

Definition at line 363 of file lua.h.

Referenced by callhook().

#define lua_isboolean (   L,
  n 
)    (lua_type(L, (n)) == LUA_TBOOLEAN)
#define lua_isfunction (   L,
  n 
)    (lua_type(L, (n)) == LUA_TFUNCTION)
#define lua_islightuserdata (   L,
  n 
)    (lua_type(L, (n)) == LUA_TLIGHTUSERDATA)

Definition at line 332 of file lua.h.

#define lua_isnil (   L,
  n 
)    (lua_type(L, (n)) == LUA_TNIL)
#define lua_isnone (   L,
  n 
)    (lua_type(L, (n)) == LUA_TNONE)
#define lua_isnoneornil (   L,
  n 
)    (lua_type(L, (n)) <= 0)
#define lua_istable (   L,
  n 
)    (lua_type(L, (n)) == LUA_TTABLE)
#define lua_isthread (   L,
  n 
)    (lua_type(L, (n)) == LUA_TTHREAD)

Definition at line 335 of file lua.h.

Referenced by getthread().

#define LUA_MASKCALL   (1 << LUA_HOOKCALL)

Definition at line 369 of file lua.h.

Referenced by laction(), luaD_precall(), makemask(), and unmakemask().

#define LUA_MASKCOUNT   (1 << LUA_HOOKCOUNT)

Definition at line 372 of file lua.h.

Referenced by laction(), luaV_execute(), makemask(), and traceexec().

#define LUA_MASKLINE   (1 << LUA_HOOKLINE)

Definition at line 371 of file lua.h.

Referenced by luaD_poscall(), luaV_execute(), makemask(), traceexec(), and unmakemask().

#define LUA_MASKRET   (1 << LUA_HOOKRET)

Definition at line 370 of file lua.h.

Referenced by laction(), luaD_poscall(), makemask(), and unmakemask().

#define LUA_MINSTACK   20
#define LUA_MULTRET   (-1)
#define lua_newtable (   L)    lua_createtable(L, 0, 0)
#define LUA_NUMTAGS   9

Definition at line 87 of file lua.h.

Referenced by lua_newstate(), and markmt().

#define LUA_OK   0
#define LUA_OPADD   0 /* ORDER TM */

Definition at line 183 of file lua.h.

Referenced by constfolding(), lua_arith(), luaO_arith(), and luaV_arith().

#define LUA_OPDIV   3

Definition at line 186 of file lua.h.

Referenced by luaO_arith().

#define LUA_OPEQ   0

Definition at line 193 of file lua.h.

Referenced by lua_callable::do_compare(), and lua_compare().

#define LUA_OPLE   2

Definition at line 195 of file lua.h.

Referenced by lua_compare().

#define LUA_OPLT   1

Definition at line 194 of file lua.h.

Referenced by lua_callable::do_compare(), lua_compare(), and sort_comp().

#define LUA_OPMOD   4

Definition at line 187 of file lua.h.

Referenced by luaO_arith().

#define LUA_OPMUL   2

Definition at line 185 of file lua.h.

Referenced by luaO_arith().

#define LUA_OPPOW   5

Definition at line 188 of file lua.h.

Referenced by luaO_arith().

#define LUA_OPSUB   1

Definition at line 184 of file lua.h.

Referenced by luaO_arith().

#define LUA_OPUNM   6

Definition at line 189 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)
#define lua_pop (   L,
  n 
)    lua_settop(L, -(n)-1)

Definition at line 322 of file lua.h.

Referenced by add_value(), auxresume(), auxsort(), ai::call_lua_filter_fcn(), cfun_exec_candidate_action(), cfun_exec_stage(), lua_pathfind_cost_calculator::cost(), ai::lua_ai_context::create(), ai::lua_ai_action_handler::create(), mapgen_lua_kernel::create_map(), mapgen_lua_kernel::create_scenario(), createmeta(), createmetatable(), finalreport(), findfield(), findloader(), g_read(), game_lua_kernel::game_lua_kernel(), gctm(), generic_reader(), ai::unit_advancements_aspect::get_advancements(), lua_kernel_base::get_attribute_names(), lua_kernel_base::get_global_var_names(), lua_callable::get_inputs(), get_new_thread(), lua_callable::get_value(), getboolfield(), getfield(), handle_script(), ai::impl_ai_get(), impl_side_set(), incomplete(), game_lua_kernel::initialize(), intf_debug_ai(), game_lua_kernel::intf_find_cost_map(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), lua_map_location::intf_get_direction(), game_lua_kernel::intf_get_time_of_day(), intf_name_generator(), lua_kernel_base::intf_require(), lua_map_location::intf_rotate_right_around_center(), lua_gui2::intf_set_dialog_callback(), ll_addtoclib(), ll_checkclib(), ll_module(), ll_require(), load_aux(), lua_kernel_base::load_string(), ai::lua_ai_load::lua_ai_load(), lua_check_impl::lua_check(), lua_kernel_base::lua_kernel_base(), lua_round(), luaB_print(), 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(), luaW_tolocation(), mapgen_lua_kernel::mapgen_lua_kernel(), maxn(), noenv(), lua_kernel_base::protected_call(), pushglobalfuncname(), pushline(), lua_cpp::register_metatable(), report(), game_lua_kernel::run_filter(), game_lua_kernel::run_wml_conditional(), game_lua_kernel::save_game(), set_env(), lua_cpp::set_functions(), game_lua_kernel::set_wml_action(), lua_gui2::show_message_dialog(), sort_comp(), str_format(), ai::lua_object< T >::to_type(), ai::lua_ai_context::update_state(), ai::lua_ai_action_handler::~lua_ai_action_handler(), ai::lua_ai_context::~lua_ai_context(), and ai::lua_ai_load::~lua_ai_load().

#define lua_pushcfunction (   L,
  f 
)    lua_pushcclosure(L, (f), 0)
#define lua_pushglobaltable (   L)    lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS)
#define lua_pushliteral (   L,
  s 
)    lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)
#define lua_register (   L,
  n,
  f 
)    (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))

Definition at line 326 of file lua.h.

#define LUA_REGISTRYINDEX   LUAI_FIRSTPSEUDOIDX

Definition at line 39 of file lua.h.

Referenced by ai::call_lua_filter_fcn(), ai::lua_ai_action_handler::create(), createstdfile(), db_getregistry(), g_iofile(), game_lua_kernel::game_lua_kernel(), ai::generate_and_push_ai_state(), ai::unit_advancements_aspect::get_advancements(), ai::lua_ai_context::get_arguments(), get_new_thread(), ai::lua_ai_context::get_persistent_data(), getiofile(), ai::lua_ai_action_handler::handle(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), index2addr(), ai::lua_ai_context::init(), lua_formula_bridge::intf_compile_formula(), intf_copy_unit(), intf_create_unit(), game_lua_kernel::intf_get_displayed_unit(), game_lua_kernel::intf_get_recall_units(), game_lua_kernel::intf_get_unit(), game_lua_kernel::intf_get_units(), lua_gui2::intf_set_dialog_callback(), io_close(), io_lines(), ll_addtoclib(), ll_checkclib(), ll_require(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaL_newmetatable(), luaL_openlibs(), luaL_pushmodule(), luaL_requiref(), luaopen_package(), luaW_hasmetatable(), luaW_pcall(), luaW_pushfaivariant(), luaW_pushlocalunit(), moveto(), noenv(), pmain(), lua_kernel_base::protected_call(), ai::aspect_attacks_lua::recalculate(), lua_formula_bridge::register_metatables(), game_lua_kernel::run_filter(), searcher_preload(), ai::lua_ai_context::set_arguments(), ai::lua_ai_context::set_persistent_data(), ai::lua_object< T >::to_type(), ai::unit_advancements_aspect::unit_advancements_aspect(), ai::lua_ai_action_handler::~lua_ai_action_handler(), ai::lua_ai_context::~lua_ai_context(), and ai::unit_advancements_aspect::~unit_advancements_aspect().

#define LUA_RELEASE   LUA_VERSION "." LUA_VERSION_RELEASE

Definition at line 24 of file lua.h.

#define LUA_RIDX_GLOBALS   2

Definition at line 97 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 98 of file lua.h.

Referenced by init_registry().

#define LUA_RIDX_MAINTHREAD   1

Definition at line 96 of file lua.h.

Referenced by init_registry().

#define LUA_SIGNATURE   "\033Lua"

Definition at line 30 of file lua.h.

Referenced by f_parser(), luaL_loadfilex(), luaU_header(), luaU_undump(), and PrintHeader().

#define LUA_TBOOLEAN   1
#define LUA_TFUNCTION   6
#define LUA_TLIGHTUSERDATA   2

Definition at line 79 of file lua.h.

Referenced by db_setuservalue(), lua_topointer(), lua_touserdata(), luaV_equalobj_(), and mainposition().

#define LUA_TNIL   0
#define LUA_TNONE   (-1)

Definition at line 75 of file lua.h.

Referenced by lua_type(), luaL_checkany(), luaW_toconfig(), and luaW_tovconfig().

#define LUA_TNUMBER   3
#define lua_tointeger (   L,
  i 
)    lua_tointegerx(L,i,NULL)
#define lua_tonumber (   L,
  i 
)    lua_tonumberx(L,i,NULL)
#define lua_tostring (   L,
  i 
)    lua_tolstring(L, (i), NULL)
#define lua_tounsigned (   L,
  i 
)    lua_tounsignedx(L,i,NULL)

Definition at line 320 of file lua.h.

Referenced by luaL_checkversion_().

#define LUA_TSTRING   4
#define LUA_TTABLE   5
#define LUA_TTHREAD   8
#define LUA_TUSERDATA   7
#define lua_upvalueindex (   i)    (LUA_REGISTRYINDEX - (i))
#define LUA_VERSION   "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR

Definition at line 23 of file lua.h.

Referenced by luaopen_base().

#define LUA_VERSION_MAJOR   "5"

Definition at line 18 of file lua.h.

#define LUA_VERSION_MINOR   "2"

Definition at line 19 of file lua.h.

#define LUA_VERSION_NUM   502

Definition at line 20 of file lua.h.

Referenced by lua_version().

#define LUA_VERSION_RELEASE   "3"

Definition at line 21 of file lua.h.

#define LUA_YIELD   1
#define lua_yield (   L,
  n 
)    lua_yieldk(L, (n), 0, NULL)

Definition at line 272 of file lua.h.

Referenced by luaB_yield().

Typedef Documentation

typedef void*(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)

Definition at line 69 of file lua.h.

typedef int(* lua_CFunction)(lua_State *L)

Definition at line 55 of file lua.h.

typedef struct lua_Debug lua_Debug

Definition at line 374 of file lua.h.

typedef void(* lua_Hook)(lua_State *L, lua_Debug *ar)

Definition at line 378 of file lua.h.

Definition at line 106 of file lua.h.

Definition at line 102 of file lua.h.

typedef const char*(* lua_Reader)(lua_State *L, void *ud, size_t *sz)

Definition at line 61 of file lua.h.

typedef struct lua_State lua_State

Definition at line 53 of file lua.h.

Definition at line 109 of file lua.h.

typedef int(* lua_Writer)(lua_State *L, const void *p, size_t sz, void *ud)

Definition at line 63 of file lua.h.

Function Documentation

LUA_API int() lua_absindex ( lua_State L,
int  idx 
)
LUA_API void() lua_arith ( lua_State L,
int  op 
)
LUA_API lua_CFunction() lua_atpanic ( lua_State L,
lua_CFunction  panicf 
)

Definition at line 121 of file lapi.cpp.

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 
)
LUA_API int() lua_checkstack ( lua_State L,
int  sz 
)
LUA_API void() lua_close ( lua_State L)

Definition at line 316 of file lstate.cpp.

References close_state(), G, and lua_lock.

Referenced by main(), os_exit(), and lua_kernel_base::~lua_kernel_base().

LUA_API int() lua_compare ( lua_State L,
int  idx1,
int  idx2,
int  op 
)
LUA_API void() lua_concat ( lua_State L,
int  n 
)
LUA_API void() lua_copy ( lua_State L,
int  fromidx,
int  toidx 
)

Definition at line 220 of file lapi.cpp.

References 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 
)
LUA_API int() lua_dump ( lua_State L,
lua_Writer  writer,
void data 
)

Definition at line 991 of file lapi.cpp.

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)
LUA_API int() lua_gc ( lua_State L,
int  what,
int  data 
)
LUA_API lua_Alloc() lua_getallocf ( lua_State L,
void **  ud 
)

Definition at line 1151 of file lapi.cpp.

References G, lua_lock, and lua_unlock.

LUA_API int() lua_getctx ( lua_State L,
int ctx 
)

Definition at line 874 of file lapi.cpp.

References CallInfo::c, CallInfo::callstatus, lua_State::ci, CIST_YIELDED, LUA_OK, and CallInfo::u.

Referenced by pcallcont().

LUA_API void() lua_getfield ( lua_State L,
int  idx,
const char *  k 
)
LUA_API void() lua_getglobal ( lua_State L,
const char *  var 
)
LUA_API lua_Hook() lua_gethook ( lua_State L)

Definition at line 67 of file ldebug.cpp.

References lua_State::hook.

Referenced by db_gethook().

LUA_API int() lua_gethookcount ( lua_State L)

Definition at line 77 of file ldebug.cpp.

References lua_State::basehookcount.

Referenced by db_gethook().

LUA_API int() lua_gethookmask ( lua_State L)

Definition at line 72 of file ldebug.cpp.

References lua_State::hookmask.

Referenced by db_gethook().

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 int() lua_getmetatable ( lua_State L,
int  objindex 
)
LUA_API int() lua_getstack ( lua_State L,
int  level,
lua_Debug ar 
)
LUA_API void() lua_gettable ( lua_State L,
int  idx 
)
LUA_API int() lua_gettop ( lua_State L)

Definition at line 154 of file lapi.cpp.

References cast_int, lua_State::ci, CallInfo::func, and lua_State::top.

Referenced by andaux(), game_lua_kernel::apply_effect(), aux_lines(), auxresume(), b_or(), b_xor(), ai::cfun_ai_get_attacks(), ai::cfun_attack_rating(), lua_callable::do_compare(), docall(), dofilecont(), dotty(), finishpcall(), g_read(), g_write(), ai::lua_ai_context::get_arguments(), lua_kernel_base::get_attribute_names(), lua_kernel_base::get_global_var_names(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), impl_context_accessor(), lua_gui2::intf_add_dialog_tree_node(), lua_kernel_base::intf_dofile(), lua_gui2::intf_get_dialog_value(), lua_map_location::intf_get_direction(), lua_kernel_base::intf_print(), lua_gui2::intf_remove_dialog_item(), lua_gui2::intf_set_dialog_active(), lua_gui2::intf_set_dialog_callback(), lua_gui2::intf_set_dialog_canvas(), lua_gui2::intf_set_dialog_markup(), lua_gui2::intf_set_dialog_value(), lua_gui2::intf_set_dialog_visible(), ll_module(), load_fake_units(), luaB_assert(), luaB_auxwrap(), luaB_coresume(), luaB_costatus(), luaB_pcall(), luaB_print(), luaB_select(), luaB_xpcall(), luaB_yield(), luaL_loadfilex(), luaL_traceback(), luaW_pcall(), luaW_toconfig(), mapgen_lua_kernel::mapgen_lua_kernel(), math_max(), math_min(), math_random(), pack(), lua_kernel_base::protected_call(), game_lua_kernel::push_builtin_effect(), ai::push_movements(), pushglobalfuncname(), ai::lua_ai_context::set_arguments(), 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 1207 of file lapi.cpp.

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 
)
LUA_API void() lua_insert ( lua_State L,
int  idx 
)
LUA_API int() lua_iscfunction ( lua_State L,
int  idx 
)

Definition at line 255 of file lapi.cpp.

References index2addr(), ttisCclosure, and ttislcf.

Referenced by db_upvaluejoin(), and set_env().

LUA_API int() lua_isnumber ( lua_State L,
int  idx 
)
LUA_API int() lua_isstring ( lua_State L,
int  idx 
)
LUA_API int() lua_isuserdata ( lua_State L,
int  idx 
)
LUA_API void() lua_len ( lua_State L,
int  idx 
)

Definition at line 1141 of file lapi.cpp.

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 
)
LUA_API lua_State*() lua_newstate ( lua_Alloc  f,
void ud 
)
LUA_API lua_State*() lua_newthread ( lua_State L)
LUA_API void*() lua_newuserdata ( lua_State L,
size_t  sz 
)
LUA_API int() lua_next ( lua_State L,
int  idx 
)
LUA_API int() lua_pcallk ( lua_State L,
int  nargs,
int  nresults,
int  errfunc,
int  ctx,
lua_CFunction  k 
)
LUA_API void() lua_pushboolean ( lua_State L,
int  b 
)

Definition at line 571 of file lapi.cpp.

References api_incr_top, lua_lock, lua_unlock, setbvalue, and lua_State::top.

Referenced by aux_lines(), b_test(), ai::cfun_ai_get_leader_ignores_keep(), ai::cfun_ai_get_passive_leader(), ai::cfun_ai_get_passive_leader_shares_keep(), 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(), ai::impl_ai_aspect_get(), lua_common::impl_tstring_eq(), lua_common::impl_tstring_le(), lua_common::impl_tstring_lt(), impl_unit_equality(), impl_unit_status_get(), game_lua_kernel::intf_check_end_level_disabled(), intf_compare_versions(), intf_eval_conditional(), game_lua_kernel::intf_fire_event(), game_lua_kernel::intf_fire_wml_menu_item(), lua_gui2::intf_get_dialog_value(), game_lua_kernel::intf_get_terrain_info(), intf_get_viewing_side(), lua_fileops::intf_have_file(), game_lua_kernel::intf_is_enemy(), game_lua_kernel::intf_is_skipping_messages(), game_lua_kernel::intf_match_location(), game_lua_kernel::intf_match_side(), game_lua_kernel::intf_match_unit(), lua_map_location::intf_tiles_adjacent(), intf_unit_ability(), game_lua_kernel::intf_view_locked(), ll_loadfunc(), ll_require(), ai::lua_ai_load::lua_ai_load(), lua_check_impl::lua_push(), luaB_collectgarbage(), luaB_coresume(), luaB_corunning(), luaB_rawequal(), luaL_execresult(), luaL_fileresult(), luaW_pushsimweapon(), os_execute(), pmain(), ai::push_attack_analysis(), game_lua_kernel::push_builtin_effect(), setboolfield(), settabsb(), ai::transform_ai_action(), and ai::lua_ai_load::~lua_ai_load().

LUA_API void() lua_pushcclosure ( lua_State L,
lua_CFunction  fn,
int  n 
)
LUA_API const char*() lua_pushfstring ( lua_State L,
const char *  fmt,
  ... 
)
LUA_API void() lua_pushinteger ( lua_State L,
lua_Integer  n 
)

Definition at line 477 of file lapi.cpp.

References api_incr_top, cast_num, lua_lock, lua_unlock, setnvalue, and lua_State::top.

Referenced by aux_lines(), ai::cfun_ai_get_recruitment_pattern(), ai::cfun_ai_get_targets(), cfun_exec_candidate_action(), lua_pathfind_cost_calculator::cost(), db_gethook(), ai::unit_advancements_aspect::get_advancements(), get_new_thread(), lua_callable::get_value(), gmatch(), gmatch_aux(), hookf(), ai::impl_ai_aspect_get(), ai::impl_ai_get(), impl_unit_attacks_len(), impl_unit_get(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_ipairs_iter(), lua_common::impl_vconfig_size(), lua_map_location::intf_distance_between(), game_lua_kernel::intf_find_cost_map(), intf_find_path(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), game_lua_kernel::intf_find_vacant_tile(), lua_gui2::intf_get_dialog_value(), intf_get_image_size(), lua_map_location::intf_get_in_basis_N_NE(), game_lua_kernel::intf_get_locations(), game_lua_kernel::intf_get_map_size(), game_lua_kernel::intf_get_mouseover_tile(), lua_map_location::intf_get_relative_dir(), game_lua_kernel::intf_get_selected_tile(), game_lua_kernel::intf_get_starting_location(), game_lua_kernel::intf_get_terrain_info(), game_lua_kernel::intf_get_time_of_day(), intf_get_time_stamp(), intf_get_viewing_side(), game_lua_kernel::intf_get_village_owner(), game_lua_kernel::intf_get_villages(), game_lua_kernel::intf_kill(), lua_map_location::intf_parse_direction(), intf_unit_defense(), intf_unit_jamming_cost(), intf_unit_movement_cost(), intf_unit_resistance(), intf_unit_vision_cost(), ipairsaux(), luaB_collectgarbage(), luaB_rawlen(), luaB_select(), luaL_execresult(), luaL_fileresult(), luaL_unref(), luaW_pushfaivariant(), luaW_pushlocation(), main(), math_frexp(), pack(), pairsmeta(), ai::push_attack_analysis(), ai::push_location_key(), push_onecapture(), game_lua_kernel::run_filter(), setfield(), settabsi(), lua_gui2::show_dialog(), lua_gui2::show_message_dialog(), 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 
)
LUA_API const char*() lua_pushlstring ( lua_State L,
const char *  s,
size_t  l 
)
LUA_API void() lua_pushnil ( lua_State L)
LUA_API void() lua_pushnumber ( lua_State L,
lua_Number  n 
)
LUA_API const char*() lua_pushstring ( lua_State L,
const char *  s 
)

Definition at line 507 of file lapi.cpp.

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(), game_lua_kernel::cfun_builtin_effect(), checkload(), db_gethook(), db_getlocal(), db_sethook(), db_setlocal(), dolibrary(), findloader(), finishpcall(), game_lua_kernel::game_lua_kernel(), lua_kernel_base::get_attribute_names(), getargs(), hookf(), ai::impl_ai_aspect_set(), ai::impl_ai_get(), impl_name_generator_call(), impl_race_get(), lua_rng::impl_rng_destroy(), impl_side_get(), lua_common::impl_tstring_tostring(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), lua_common::impl_vconfig_get(), game_lua_kernel::initialize(), lua_cpp::intf_cleanup(), intf_debug(), intf_debug_ai(), intf_describe_plugins(), lua_map_location::intf_distance_between(), game_lua_kernel::intf_find_cost_map(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), lua_gui2::intf_get_dialog_value(), lua_map_location::intf_get_relative_dir(), game_lua_kernel::intf_get_terrain(), game_lua_kernel::intf_get_terrain_info(), game_lua_kernel::intf_get_time_of_day(), intf_get_traits(), intf_name_generator(), lua_kernel_base::intf_require(), lua_map_location::intf_rotate_right_around_center(), lua_gui2::intf_set_dialog_callback(), lua_map_location::intf_tiles_adjacent(), lua_cpp::intf_tostring(), lua_map_location::intf_vector_sum(), lua_map_location::intf_write_direction(), ll_loadlib(), ll_require(), game_lua_kernel::load_game(), lua_kernel_base::load_package(), application_lua_kernel::load_script_from_file(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaB_type(), luaL_execresult(), luaL_fileresult(), luaL_getmetafield(), luaL_requiref(), luaL_tolstring(), luaW_filltable(), luaW_pushfaivariant(), luaW_pushrace(), luaW_pushsimweapon(), luaW_pushunittype(), modinit(), os_getenv(), os_setlocale(), os_tmpname(), ai::push_attack_analysis(), game_lua_kernel::push_builtin_effect(), push_component(), push_locations_talbe(), ai::push_movements(), pushline(), lua_common::register_gettext_metatable(), lua_unit_type::register_metatable(), lua_race::register_metatable(), lua_team::register_metatable(), lua_formula_bridge::register_metatables(), lua_common::register_tstring_metatable(), lua_common::register_vconfig_metatable(), game_lua_kernel::run_event(), application_lua_kernel::thread::run_script(), searcher_Croot(), game_lua_kernel::set_wml_action(), setpath(), settabss(), special_locations_newindex(), special_locations_next(), ai::lua_object< T >::to_type(), ai::transform_ai_action(), and ai::lua_ai_load::~lua_ai_load().

LUA_API int() lua_pushthread ( lua_State L)

Definition at line 587 of file lapi.cpp.

References api_incr_top, G, lua_lock, lua_unlock, setthvalue, and lua_State::top.

Referenced by db_gethook(), db_sethook(), hookf(), and luaB_corunning().

LUA_API void() lua_pushunsigned ( lua_State L,
lua_Unsigned  n 
)
LUA_API void() lua_pushvalue ( lua_State L,
int  idx 
)

Definition at line 229 of file lapi.cpp.

References api_incr_top, index2addr(), lua_lock, lua_unlock, setobj2s, and lua_State::top.

Referenced by add_value(), game_lua_kernel::apply_effect(), aux_lines(), auxsort(), checkupval(), lua_pathfind_cost_calculator::cost(), ai::lua_ai_context::create(), ai::lua_ai_action_handler::create(), createmeta(), createmetatable(), createsearcherstable(), createstdfile(), db_getinfo(), db_getlocal(), db_getregistry(), db_sethook(), db_traceback(), dooptions(), f_write(), g_iofile(), ai::generate_and_push_ai_state(), generic_reader(), get_new_thread(), ai::impl_ai_get(), game_lua_kernel::impl_theme_items_get(), game_lua_kernel::impl_theme_items_set(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_pairs(), intf_describe_plugins(), intf_do_unsynced(), game_lua_kernel::intf_get_recall_units(), game_lua_kernel::intf_get_units(), lua_kernel_base::intf_require(), lua_gui2::intf_set_dialog_callback(), io_readline(), ll_addtoclib(), ll_module(), ll_require(), ll_seeall(), load_aux(), lua_rng::load_tables(), luaB_cocreate(), luaB_error(), 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(), game_lua_kernel::push_builtin_effect(), lua_cpp::register_metatable(), set_env(), lua_cpp::set_functions(), lua_gui2::show_dialog(), sort_comp(), special_locations_pairs(), and treatstackoption().

LUA_API const char*() lua_pushvfstring ( lua_State L,
const char *  fmt,
va_list  argp 
)

Definition at line 525 of file lapi.cpp.

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 280 of file lapi.cpp.

References index2addr(), isvalid, and luaV_rawequalobj.

Referenced by findfield(), luaB_rawequal(), luaL_testudata(), and luaW_hasmetatable().

LUA_API void() lua_rawget ( lua_State L,
int  idx 
)

Definition at line 633 of file lapi.cpp.

References api_check, hvalue, index2addr(), lua_lock, lua_unlock, luaH_get(), setobj2s, lua_State::top, and ttistable.

Referenced by ai::call_lua_filter_fcn(), ai::lua_ai_action_handler::create(), db_gethook(), ai::generate_and_push_ai_state(), ai::lua_ai_context::get_arguments(), lua_kernel_base::get_attribute_names(), get_new_thread(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), hookf(), ai::impl_ai_get(), impl_race_get(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), game_lua_kernel::initialize(), lua_formula_bridge::intf_compile_formula(), intf_copy_unit(), intf_create_unit(), game_lua_kernel::intf_find_cost_map(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), game_lua_kernel::intf_get_displayed_unit(), game_lua_kernel::intf_get_recall_units(), game_lua_kernel::intf_get_unit(), game_lua_kernel::intf_get_units(), lua_kernel_base::intf_require(), lua_gui2::intf_set_dialog_callback(), ai::lua_ai_load::lua_ai_load(), luaB_rawget(), luaL_findtable(), luaL_getmetafield(), luaW_getglobal(), luaW_hasmetatable(), luaW_pcall(), luaW_pushfaivariant(), luaW_pushlocalunit(), lua_kernel_base::protected_call(), game_lua_kernel::run_filter(), ai::lua_ai_context::set_arguments(), ai::lua_ai_context::set_persistent_data(), game_lua_kernel::set_wml_action(), ai::lua_object< T >::to_type(), ai::lua_ai_action_handler::~lua_ai_action_handler(), and ai::lua_ai_context::~lua_ai_context().

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 size_t() lua_rawlen ( lua_State L,
int  idx 
)
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 void() lua_remove ( lua_State L,
int  idx 
)
LUA_API void() lua_replace ( lua_State L,
int  idx 
)
LUA_API int() lua_resume ( lua_State L,
lua_State from,
int  narg 
)
LUA_API void() lua_setallocf ( lua_State L,
lua_Alloc  f,
void ud 
)

Definition at line 1161 of file lapi.cpp.

References G, lua_lock, and lua_unlock.

LUA_API void() lua_setfield ( lua_State L,
int  idx,
const char *  k 
)

Definition at line 752 of file lapi.cpp.

References api_checknelems, index2addr(), lua_lock, lua_unlock, luaS_new(), luaV_settable(), setsvalue2s, and lua_State::top.

Referenced by ai::lua_ai_context::create(), createmeta(), createmetatable(), createstdfile(), db_sethook(), g_iofile(), game_lua_kernel::game_lua_kernel(), ai::generate_and_push_ai_state(), ai::generate_and_push_ai_table(), ai::impl_ai_get(), lua_common::impl_vconfig_get(), game_lua_kernel::initialize(), game_lua_kernel::intf_get_terrain_info(), game_lua_kernel::intf_get_time_of_day(), ll_addtoclib(), ll_require(), ll_seeall(), lua_rng::load_tables(), lua_kernel_base::lua_kernel_base(), luaL_getsubtable(), luaL_newmetatable(), luaL_openlibs(), luaL_pushmodule(), luaL_requiref(), luaL_setfuncs(), luaopen_base(), luaopen_math(), luaopen_package(), luaW_filltable(), luaW_pushrace(), luaW_pushracetable(), luaW_pushsimdata(), luaW_pushsimweapon(), luaW_pushunittype(), modinit(), pack(), pmain(), lua_common::register_gettext_metatable(), lua_cpp::register_metatable(), lua_unit_type::register_metatable(), lua_race::register_metatable(), lua_team::register_metatable(), lua_formula_bridge::register_metatables(), lua_common::register_tstring_metatable(), lua_common::register_vconfig_metatable(), ai::lua_ai_context::set_arguments(), lua_cpp::set_functions(), ai::lua_ai_context::set_persistent_data(), setboolfield(), setfield(), setpath(), settabsb(), settabsi(), settabss(), ai::transform_ai_action(), treatstackoption(), and ai::lua_ai_context::update_state().

LUA_API void() lua_setglobal ( lua_State L,
const char *  var 
)
LUA_API int() lua_sethook ( lua_State L,
lua_Hook  func,
int  mask,
int  count 
)
LUA_API const char*() lua_setlocal ( lua_State L,
const lua_Debug ar,
int  n 
)

Definition at line 165 of file ldebug.cpp.

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 
)
LUA_API void() lua_settable ( lua_State L,
int  idx 
)
LUA_API void() lua_settop ( lua_State L,
int  idx 
)
LUA_API const char*() lua_setupvalue ( lua_State L,
int  funcindex,
int  n 
)
LUA_API void() lua_setuservalue ( lua_State L,
int  idx 
)
LUA_API int() lua_status ( lua_State L)
LUA_API int() lua_toboolean ( lua_State L,
int  idx 
)
LUA_API lua_CFunction() lua_tocfunction ( lua_State L,
int  idx 
)

Definition at line 412 of file lapi.cpp.

References clCvalue, fvalue, index2addr(), ttisCclosure, and ttislcf.

LUA_API lua_Integer() lua_tointegerx ( lua_State L,
int  idx,
int isnum 
)

Definition at line 343 of file lapi.cpp.

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 
)
LUA_API lua_Number() lua_tonumberx ( lua_State L,
int  idx,
int isnum 
)
LUA_API const void*() lua_topointer ( lua_State L,
int  idx 
)
LUA_API lua_State*() lua_tothread ( lua_State L,
int  idx 
)

Definition at line 431 of file lapi.cpp.

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 360 of file lapi.cpp.

References index2addr(), lua_number2unsigned, nvalue, and tonumber.

Referenced by luaL_checkunsigned().

LUA_API void*() lua_touserdata ( 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 void*() lua_upvalueid ( lua_State L,
int  fidx,
int  n 
)

Definition at line 1251 of file lapi.cpp.

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 1270 of file lapi.cpp.

References getupvalref(), and luaC_objbarrier.

Referenced by db_upvaluejoin().

LUA_API const lua_Number*() lua_version ( lua_State L)

Definition at line 131 of file lapi.cpp.

References G, LUA_VERSION_NUM, and game_config::version.

Referenced by f_luaopen(), and luaL_checkversion_().

LUA_API void() lua_xmove ( lua_State from,
lua_State to,
int  n 
)
LUA_API int() lua_yieldk ( lua_State L,
int  nresults,
int  ctx,
lua_CFunction  k 
)

Variable Documentation

const char lua_ident[]