The Battle for Wesnoth  1.15.2+dev
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   "3"
 
#define LUA_VERSION_NUM   503
 
#define LUA_VERSION_RELEASE   "5"
 
#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-2018 Lua.org, PUC-Rio"
 
#define LUA_AUTHORS   "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
 
#define LUA_SIGNATURE   "\x1bLua"
 
#define LUA_MULTRET   (-1)
 
#define LUA_REGISTRYINDEX   (-LUAI_MAXSTACK - 1000)
 
#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, ORDER OP */
 
#define LUA_OPSUB   1
 
#define LUA_OPMUL   2
 
#define LUA_OPMOD   3
 
#define LUA_OPPOW   4
 
#define LUA_OPDIV   5
 
#define LUA_OPIDIV   6
 
#define LUA_OPBAND   7
 
#define LUA_OPBOR   8
 
#define LUA_OPBXOR   9
 
#define LUA_OPSHL   10
 
#define LUA_OPSHR   11
 
#define LUA_OPUNM   12
 
#define LUA_OPBNOT   13
 
#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_GCISRUNNING   9
 
#define lua_getextraspace(L)   ((void *)((char *)(L) - LUA_EXTRASPACE))
 
#define lua_tonumber(L, i)   lua_tonumberx(L,(i),NULL)
 
#define lua_tointeger(L, i)   lua_tointegerx(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_pushstring(L, "" s)
 
#define lua_pushglobaltable(L)   ((void)lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS))
 
#define lua_tostring(L, i)   lua_tolstring(L, (i), NULL)
 
#define lua_insert(L, idx)   lua_rotate(L, (idx), 1)
 
#define lua_remove(L, idx)   (lua_rotate(L, (idx), -1), lua_pop(L, 1))
 
#define lua_replace(L, idx)   (lua_copy(L, -1, (idx)), lua_pop(L, 1))
 
#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 LUA_NUMBER lua_Number
 
typedef LUA_INTEGER lua_Integer
 
typedef LUA_UNSIGNED lua_Unsigned
 
typedef LUA_KCONTEXT lua_KContext
 
typedef int(* lua_CFunction) (lua_State *L)
 
typedef int(* lua_KFunction) (lua_State *L, int status, lua_KContext ctx)
 
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 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_rotate (lua_State *L, int idx, int n)
 
LUA_API void() lua_copy (lua_State *L, int fromidx, int toidx)
 
LUA_API int() lua_checkstack (lua_State *L, int n)
 
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_isinteger (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 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 const char *() lua_pushlstring (lua_State *L, const char *s, size_t len)
 
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 int() lua_getglobal (lua_State *L, const char *name)
 
LUA_API int() lua_gettable (lua_State *L, int idx)
 
LUA_API int() lua_getfield (lua_State *L, int idx, const char *k)
 
LUA_API int() lua_geti (lua_State *L, int idx, lua_Integer n)
 
LUA_API int() lua_rawget (lua_State *L, int idx)
 
LUA_API int() lua_rawgeti (lua_State *L, int idx, lua_Integer n)
 
LUA_API int() 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 int() lua_getuservalue (lua_State *L, int idx)
 
LUA_API void() lua_setglobal (lua_State *L, const char *name)
 
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_seti (lua_State *L, int idx, lua_Integer n)
 
LUA_API void() lua_rawset (lua_State *L, int idx)
 
LUA_API void() lua_rawseti (lua_State *L, int idx, lua_Integer 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, lua_KContext ctx, lua_KFunction k)
 
LUA_API int() lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, lua_KContext ctx, lua_KFunction 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, int strip)
 
LUA_API int() lua_yieldk (lua_State *L, int nresults, lua_KContext ctx, lua_KFunction 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_isyieldable (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 size_t() lua_stringtonumber (lua_State *L, const char *s)
 
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 void() 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

◆ LUA_AUTHORS

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

Definition at line 27 of file lua.h.

◆ lua_call

#define lua_call (   L,
  n,
 
)    lua_callk(L, (n), (r), 0, NULL)

◆ LUA_COPYRIGHT

#define LUA_COPYRIGHT   LUA_RELEASE " Copyright (C) 1994-2018 Lua.org, PUC-Rio"

Definition at line 26 of file lua.h.

◆ LUA_ERRERR

#define LUA_ERRERR   6

◆ LUA_ERRGCMM

#define LUA_ERRGCMM   5

◆ LUA_ERRMEM

#define LUA_ERRMEM   4

◆ LUA_ERRRUN

#define LUA_ERRRUN   2

◆ LUA_ERRSYNTAX

#define LUA_ERRSYNTAX   3

◆ LUA_GCCOLLECT

#define LUA_GCCOLLECT   2

Definition at line 304 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCCOUNT

#define LUA_GCCOUNT   3

Definition at line 305 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCCOUNTB

#define LUA_GCCOUNTB   4

Definition at line 306 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCISRUNNING

#define LUA_GCISRUNNING   9

Definition at line 310 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCRESTART

#define LUA_GCRESTART   1

Definition at line 303 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCSETPAUSE

#define LUA_GCSETPAUSE   6

Definition at line 308 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCSETSTEPMUL

#define LUA_GCSETSTEPMUL   7

Definition at line 309 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCSTEP

#define LUA_GCSTEP   5

Definition at line 307 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ LUA_GCSTOP

#define LUA_GCSTOP   0

Definition at line 302 of file lua.h.

Referenced by lua_gc(), and luaB_collectgarbage().

◆ lua_getextraspace

#define lua_getextraspace (   L)    ((void *)((char *)(L) - LUA_EXTRASPACE))

Definition at line 339 of file lua.h.

Referenced by lua_kernel_base::get_lua_kernel_base_ptr(), and lua_newthread().

◆ LUA_HOOKCALL

#define LUA_HOOKCALL   0

Definition at line 402 of file lua.h.

Referenced by callhook(), and luaD_precall().

◆ LUA_HOOKCOUNT

#define LUA_HOOKCOUNT   3

Definition at line 405 of file lua.h.

Referenced by luaG_traceexec().

◆ LUA_HOOKLINE

#define LUA_HOOKLINE   2

Definition at line 404 of file lua.h.

Referenced by luaG_traceexec().

◆ LUA_HOOKRET

#define LUA_HOOKRET   1

Definition at line 403 of file lua.h.

Referenced by luaD_poscall().

◆ LUA_HOOKTAILCALL

#define LUA_HOOKTAILCALL   4

Definition at line 406 of file lua.h.

Referenced by callhook().

◆ lua_insert

#define lua_insert (   L,
  idx 
)    lua_rotate(L, (idx), 1)

◆ lua_isboolean

#define lua_isboolean (   L,
  n 
)    (lua_type(L, (n)) == LUA_TBOOLEAN)

◆ lua_isfunction

#define lua_isfunction (   L,
  n 
)    (lua_type(L, (n)) == LUA_TFUNCTION)

◆ lua_islightuserdata

#define lua_islightuserdata (   L,
  n 
)    (lua_type(L, (n)) == LUA_TLIGHTUSERDATA)

Definition at line 354 of file lua.h.

◆ lua_isnil

#define lua_isnil (   L,
  n 
)    (lua_type(L, (n)) == LUA_TNIL)

◆ lua_isnone

#define lua_isnone (   L,
  n 
)    (lua_type(L, (n)) == LUA_TNONE)

◆ lua_isnoneornil

#define lua_isnoneornil (   L,
  n 
)    (lua_type(L, (n)) <= 0)

◆ lua_istable

#define lua_istable (   L,
  n 
)    (lua_type(L, (n)) == LUA_TTABLE)

◆ lua_isthread

#define lua_isthread (   L,
  n 
)    (lua_type(L, (n)) == LUA_TTHREAD)

Definition at line 357 of file lua.h.

Referenced by getthread().

◆ LUA_MASKCALL

#define LUA_MASKCALL   (1 << LUA_HOOKCALL)

Definition at line 412 of file lua.h.

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

◆ LUA_MASKCOUNT

#define LUA_MASKCOUNT   (1 << LUA_HOOKCOUNT)

Definition at line 415 of file lua.h.

Referenced by luaG_traceexec(), and makemask().

◆ LUA_MASKLINE

#define LUA_MASKLINE   (1 << LUA_HOOKLINE)

Definition at line 414 of file lua.h.

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

◆ LUA_MASKRET

#define LUA_MASKRET   (1 << LUA_HOOKRET)

Definition at line 413 of file lua.h.

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

◆ LUA_MINSTACK

#define LUA_MINSTACK   20

◆ LUA_MULTRET

#define LUA_MULTRET   (-1)

◆ lua_newtable

#define lua_newtable (   L)    lua_createtable(L, 0, 0)

◆ LUA_NUMTAGS

#define LUA_NUMTAGS   9

Definition at line 74 of file lua.h.

Referenced by lua_newstate(), lua_typename(), and markmt().

◆ LUA_OK

#define LUA_OK   0

◆ LUA_OPADD

#define LUA_OPADD   0 /* ORDER TM, ORDER OP */

Definition at line 196 of file lua.h.

Referenced by intarith(), luaK_posfix(), luaO_arith(), and numarith().

◆ LUA_OPBAND

#define LUA_OPBAND   7

Definition at line 203 of file lua.h.

Referenced by intarith(), luaO_arith(), and validop().

◆ LUA_OPBNOT

#define LUA_OPBNOT   13

Definition at line 209 of file lua.h.

Referenced by intarith(), lua_arith(), luaO_arith(), and validop().

◆ LUA_OPBOR

#define LUA_OPBOR   8

Definition at line 204 of file lua.h.

Referenced by intarith(), luaO_arith(), and validop().

◆ LUA_OPBXOR

#define LUA_OPBXOR   9

Definition at line 205 of file lua.h.

Referenced by intarith(), luaO_arith(), and validop().

◆ LUA_OPDIV

#define LUA_OPDIV   5

Definition at line 201 of file lua.h.

Referenced by luaO_arith(), numarith(), and validop().

◆ LUA_OPEQ

#define LUA_OPEQ   0

Definition at line 213 of file lua.h.

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

◆ LUA_OPIDIV

#define LUA_OPIDIV   6

Definition at line 202 of file lua.h.

Referenced by intarith(), numarith(), and validop().

◆ LUA_OPLE

#define LUA_OPLE   2

Definition at line 215 of file lua.h.

Referenced by lua_compare().

◆ LUA_OPLT

#define LUA_OPLT   1

Definition at line 214 of file lua.h.

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

◆ LUA_OPMOD

#define LUA_OPMOD   3

Definition at line 199 of file lua.h.

Referenced by intarith(), numarith(), and validop().

◆ LUA_OPMUL

#define LUA_OPMUL   2

Definition at line 198 of file lua.h.

Referenced by intarith(), and numarith().

◆ LUA_OPPOW

#define LUA_OPPOW   4

Definition at line 200 of file lua.h.

Referenced by luaO_arith(), and numarith().

◆ LUA_OPSHL

#define LUA_OPSHL   10

Definition at line 206 of file lua.h.

Referenced by intarith(), luaO_arith(), and validop().

◆ LUA_OPSHR

#define LUA_OPSHR   11

Definition at line 207 of file lua.h.

Referenced by intarith(), luaO_arith(), and validop().

◆ LUA_OPSUB

#define LUA_OPSUB   1

Definition at line 197 of file lua.h.

Referenced by intarith(), and numarith().

◆ LUA_OPUNM

#define LUA_OPUNM   12

Definition at line 208 of file lua.h.

Referenced by intarith(), lua_arith(), luaK_prefix(), and numarith().

◆ lua_pcall

#define lua_pcall (   L,
  n,
  r,
  f 
)    lua_pcallk(L, (n), (r), (f), 0, NULL)

◆ lua_pop

#define lua_pop (   L,
  n 
)    lua_settop(L, -(n)-1)

Definition at line 344 of file lua.h.

Referenced by add_value(), addtoclib(), auxresume(), auxsort(), ai::call_lua_filter_fcn(), cfun_exec_candidate_action(), cfun_exec_stage(), checkclib(), checktab(), 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(), db_setlocal(), lua_mapgen::filter::filter(), 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(), impl_add_animation(), ai::impl_ai_get(), game_lua_kernel::initialize(), lua_kernel_base::interactive_run(), 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_load(), lua_wml::intf_load_wml(), mapgen_gamemap::intf_mg_terrain_mask(), intf_name_generator(), lua_kernel_base::intf_print(), lua_kernel_base::intf_require(), lua_map_location::intf_rotate_right_around_center(), game_lua_kernel::intf_scroll(), lua_gui2::intf_set_dialog_callback(), game_lua_kernel::intf_terrain_mask(), 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(), luaB_print(), luaL_getmetafield(), luaL_getsubtable(), luaL_len(), luaL_newmetatable(), luaL_ref(), luaL_requiref(), luaL_setfuncs(), luaL_testudata(), luaL_tolstring(), luaopen_package(), luaW_getglobal(), lua_stringx::luaW_open(), luaW_pcall(), luaW_table_get_def(), luaW_tableget(), luaW_to_locationset(), luaW_toconfig(), luaW_tolocation(), luaW_toslocs(), mapgen_lua_kernel::mapgen_lua_kernel(), noenv(), operator delete(), partition(), lua_kernel_base::protected_call(), pushglobalfuncname(), read_rules_vector(), lua_units::register_attacks_metatables(), lua_cpp::register_metatable(), lua_preferences::register_table(), lua_unit_type::register_table(), lua_audio::register_table(), game_lua_kernel::run_filter(), game_lua_kernel::run_wml_conditional(), game_lua_kernel::save_game(), lua_cpp::set_functions(), game_lua_kernel::set_wml_action(), game_lua_kernel::set_wml_condition(), setpath(), lua_gui2::show_message_dialog(), sort_comp(), str_format(), lua_kernel_base::throwing_run(), ai::lua_object< T >::to_type(), ai::lua_ai_context::update_state(), filter_impl::~filter_impl(), ai::lua_ai_action_handler::~lua_ai_action_handler(), ai::lua_ai_context::~lua_ai_context(), and ai::lua_ai_load::~lua_ai_load().

◆ lua_pushcfunction

#define lua_pushcfunction (   L,
  f 
)    lua_pushcclosure(L, (f), 0)

◆ lua_pushglobaltable

#define lua_pushglobaltable (   L)    ((void)lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS))

Definition at line 363 of file lua.h.

Referenced by ll_require(), luaL_tolstring(), luaopen_base(), luaopen_package(), and luaW_getglobal().

◆ lua_pushliteral

#define lua_pushliteral (   L,
  s 
)    lua_pushstring(L, "" s)

◆ lua_register

#define lua_register (   L,
  n,
  f 
)    (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))

Definition at line 348 of file lua.h.

◆ LUA_REGISTRYINDEX

#define LUA_REGISTRYINDEX   (-LUAI_MAXSTACK - 1000)

◆ LUA_RELEASE

#define LUA_RELEASE   LUA_VERSION "." LUA_VERSION_RELEASE

Definition at line 25 of file lua.h.

◆ lua_remove

#define lua_remove (   L,
  idx 
)    (lua_rotate(L, (idx), -1), lua_pop(L, 1))

◆ lua_replace

#define lua_replace (   L,
  idx 
)    (lua_copy(L, -1, (idx)), lua_pop(L, 1))

◆ LUA_RIDX_GLOBALS

#define LUA_RIDX_GLOBALS   2

Definition at line 84 of file lua.h.

Referenced by init_registry(), lua_getglobal(), lua_load(), and lua_setglobal().

◆ LUA_RIDX_LAST

#define LUA_RIDX_LAST   LUA_RIDX_GLOBALS

Definition at line 85 of file lua.h.

Referenced by init_registry().

◆ LUA_RIDX_MAINTHREAD

#define LUA_RIDX_MAINTHREAD   1

Definition at line 83 of file lua.h.

Referenced by init_registry().

◆ LUA_SIGNATURE

#define LUA_SIGNATURE   "\x1bLua"

Definition at line 31 of file lua.h.

Referenced by checkHeader(), checkliteral(), DumpHeader(), f_parser(), luaL_loadfilex(), and luaU_undump().

◆ LUA_TBOOLEAN

#define LUA_TBOOLEAN   1

◆ LUA_TFUNCTION

#define LUA_TFUNCTION   6

◆ LUA_TLIGHTUSERDATA

#define LUA_TLIGHTUSERDATA   2

Definition at line 66 of file lua.h.

Referenced by lua_topointer(), lua_touserdata(), luaV_equalobj(), mainposition(), and typeerror().

◆ LUA_TNIL

#define LUA_TNIL   0

◆ LUA_TNONE

#define LUA_TNONE   (-1)

Definition at line 62 of file lua.h.

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

◆ LUA_TNUMBER

#define LUA_TNUMBER   3

◆ lua_tointeger

#define lua_tointeger (   L,
  i 
)    lua_tointegerx(L,(i),NULL)

◆ lua_tonumber

#define lua_tonumber (   L,
  i 
)    lua_tonumberx(L,(i),NULL)

◆ lua_tostring

#define lua_tostring (   L,
  i 
)    lua_tolstring(L, (i), NULL)

Definition at line 366 of file lua.h.

Referenced by game_lua_kernel::apply_effect(), game_lua_kernel::cfun_builtin_effect(), checkload(), ai::lua_ai_context::create(), ai::lua_ai_action_handler::create(), mapgen_lua_kernel::create_map(), db_debug(), db_traceback(), errfile(), find_widget(), findfile(), findloader(), g_iofile(), ai::unit_advancements_aspect::get_advancements(), lua_kernel_base::get_attribute_names(), lua_kernel_base::get_global_var_names(), lua_callable::get_inputs(), impl_add_animation(), ai::impl_ai_get(), impl_animator_get(), impl_unit_attacks_set(), lua_formula_bridge::intf_compile_formula(), lua_stringx::intf_format(), lua_wml::intf_load_wml(), intf_name_generator(), lua_kernel_base::intf_print(), game_lua_kernel::intf_remove_tile_overlay(), lua_gui2::intf_set_dialog_visible(), game_lua_kernel::intf_set_time_of_day(), game_lua_kernel::intf_shroud_op(), intf_transform_unit(), io_readline(), load_fake_units(), application_lua_kernel::load_script_from_string(), lua_kernel_base::load_string(), lua_kernel_base::lua_kernel_base(), luaB_select(), luaL_argerror(), luaL_gsub(), luaL_loadfilex(), luaL_tolstring(), luaW_checkrace(), luaW_checkvariable(), luaW_pcall(), luaW_toconfig(), luaW_tofaivariant(), luaW_toscalar(), luaW_totstring(), panic(), lua_kernel_base::protected_call(), pushfuncname(), pushglobalfuncname(), application_lua_kernel::thread::run_script(), searcher_Croot(), searchpath(), ai::lua_object< T >::to_type(), lua_common::tstring_concat_aux(), and typeerror().

◆ LUA_TSTRING

#define LUA_TSTRING   4

◆ LUA_TTABLE

#define LUA_TTABLE   5

◆ LUA_TTHREAD

#define LUA_TTHREAD   8

◆ LUA_TUSERDATA

#define LUA_TUSERDATA   7

◆ lua_upvalueindex

#define lua_upvalueindex (   i)    (LUA_REGISTRYINDEX - (i))

◆ LUA_VERSION

#define LUA_VERSION   "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR

Definition at line 24 of file lua.h.

Referenced by luaopen_base().

◆ LUA_VERSION_MAJOR

#define LUA_VERSION_MAJOR   "5"

Definition at line 19 of file lua.h.

◆ LUA_VERSION_MINOR

#define LUA_VERSION_MINOR   "3"

Definition at line 20 of file lua.h.

◆ LUA_VERSION_NUM

#define LUA_VERSION_NUM   503

Definition at line 21 of file lua.h.

Referenced by lua_version().

◆ LUA_VERSION_RELEASE

#define LUA_VERSION_RELEASE   "5"

Definition at line 22 of file lua.h.

◆ LUA_YIELD

#define LUA_YIELD   1

◆ lua_yield

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

Definition at line 295 of file lua.h.

Referenced by luaB_yield().

Typedef Documentation

◆ lua_Alloc

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

Definition at line 124 of file lua.h.

◆ lua_CFunction

typedef int(* lua_CFunction) (lua_State *L)

Definition at line 105 of file lua.h.

◆ lua_Debug

typedef struct lua_Debug lua_Debug

Definition at line 417 of file lua.h.

◆ lua_Hook

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

Definition at line 421 of file lua.h.

◆ lua_Integer

typedef LUA_INTEGER lua_Integer

Definition at line 93 of file lua.h.

◆ lua_KContext

Definition at line 99 of file lua.h.

◆ lua_KFunction

typedef int(* lua_KFunction) (lua_State *L, int status, lua_KContext ctx)

Definition at line 110 of file lua.h.

◆ lua_Number

Definition at line 89 of file lua.h.

◆ lua_Reader

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

Definition at line 116 of file lua.h.

◆ lua_State

typedef struct lua_State lua_State

Definition at line 56 of file lua.h.

◆ lua_Unsigned

Definition at line 96 of file lua.h.

◆ lua_Writer

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

Definition at line 118 of file lua.h.

Function Documentation

◆ lua_absindex()

LUA_API int() lua_absindex ( lua_State L,
int  idx 
)

◆ lua_arith()

LUA_API void() lua_arith ( lua_State L,
int  op 
)

◆ lua_atpanic()

LUA_API lua_CFunction() lua_atpanic ( lua_State L,
lua_CFunction  panicf 
)

Definition at line 134 of file lapi.cpp.

References G, lua_lock, and lua_unlock.

Referenced by luaL_newstate().

◆ lua_callk()

LUA_API void() lua_callk ( lua_State L,
int  nargs,
int  nresults,
lua_KContext  ctx,
lua_KFunction  k 
)

◆ lua_checkstack()

LUA_API int() lua_checkstack ( lua_State L,
int  n 
)

◆ lua_close()

LUA_API void() lua_close ( lua_State L)

Definition at line 341 of file lstate.cpp.

References close_state(), G, and lua_lock.

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

◆ lua_compare()

LUA_API int() lua_compare ( lua_State L,
int  idx1,
int  idx2,
int  op 
)

◆ lua_concat()

LUA_API void() lua_concat ( lua_State L,
int  n 
)

◆ lua_copy()

LUA_API void() lua_copy ( lua_State L,
int  fromidx,
int  toidx 
)

◆ lua_createtable()

LUA_API void() lua_createtable ( lua_State L,
int  narr,
int  nrec 
)

◆ lua_dump()

LUA_API int() lua_dump ( lua_State L,
lua_Writer  writer,
void *  data,
int  strip 
)

Definition at line 1016 of file lapi.cpp.

References api_checknelems, getproto, isLfunction, lua_lock, lua_unlock, luaU_dump(), and lua_State::top.

Referenced by str_dump().

◆ lua_error()

LUA_API int() lua_error ( lua_State L)

◆ lua_gc()

LUA_API int() lua_gc ( lua_State L,
int  what,
int  data 
)

◆ lua_getallocf()

LUA_API lua_Alloc() lua_getallocf ( lua_State L,
void **  ud 
)

Definition at line 1166 of file lapi.cpp.

References f, G, lua_lock, and lua_unlock.

Referenced by resizebox().

◆ lua_getfield()

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

◆ lua_getglobal()

LUA_API int() lua_getglobal ( lua_State L,
const char *  name 
)

◆ lua_gethook()

LUA_API lua_Hook() lua_gethook ( lua_State L)

Definition at line 95 of file ldebug.cpp.

References lua_State::hook.

Referenced by db_gethook().

◆ lua_gethookcount()

LUA_API int() lua_gethookcount ( lua_State L)

Definition at line 105 of file ldebug.cpp.

References lua_State::basehookcount.

Referenced by db_gethook().

◆ lua_gethookmask()

LUA_API int() lua_gethookmask ( lua_State L)

Definition at line 100 of file ldebug.cpp.

References lua_State::hookmask.

Referenced by db_gethook().

◆ lua_geti()

LUA_API int() lua_geti ( lua_State L,
int  idx,
lua_Integer  n 
)

◆ lua_getinfo()

LUA_API int() lua_getinfo ( lua_State L,
const char *  what,
lua_Debug ar 
)

◆ lua_getlocal()

LUA_API const char*() lua_getlocal ( lua_State L,
const lua_Debug ar,
int  n 
)

◆ lua_getmetatable()

LUA_API int() lua_getmetatable ( lua_State L,
int  objindex 
)

◆ lua_getstack()

LUA_API int() lua_getstack ( lua_State L,
int  level,
lua_Debug ar 
)

◆ lua_gettable()

LUA_API int() lua_gettable ( lua_State L,
int  idx 
)

◆ lua_gettop()

LUA_API int() lua_gettop ( lua_State L)

Definition at line 167 of file lapi.cpp.

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

Referenced by game_lua_kernel::apply_effect(), aux_lines(), auxresume(), ai::cfun_ai_get_attacks(), ai::cfun_attack_rating(), lua_callable::do_compare(), dofilecont(), 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_kernel_base::interactive_run(), lua_gui2::intf_add_dialog_tree_node(), lua_kernel_base::intf_dofile(), game_lua_kernel::intf_find_path(), lua_gui2::intf_get_dialog_value(), lua_map_location::intf_get_direction(), game_lua_kernel::intf_log_replay(), intf_music_add(), intf_music_remove(), 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_tooltip(), lua_gui2::intf_set_dialog_value(), lua_gui2::intf_set_dialog_visible(), lua_stringx::intf_str_format(), ll_require(), 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_internal(), luaW_toconfig(), mapgen_lua_kernel::mapgen_lua_kernel(), math_max(), math_min(), math_random(), pack(), 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(), tinsert(), and utfchar().

◆ lua_getupvalue()

LUA_API const char*() lua_getupvalue ( lua_State L,
int  funcindex,
int  n 
)

Definition at line 1222 of file lapi.cpp.

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

Referenced by auxupvalue(), and checkupval().

◆ lua_getuservalue()

LUA_API int() lua_getuservalue ( lua_State L,
int  idx 
)

◆ lua_iscfunction()

LUA_API int() lua_iscfunction ( lua_State L,
int  idx 
)

Definition at line 264 of file lapi.cpp.

References index2addr(), ttisCclosure, and ttislcf.

Referenced by db_upvaluejoin(), and ll_require().

◆ lua_isinteger()

LUA_API int() lua_isinteger ( lua_State L,
int  idx 
)

◆ lua_isnumber()

LUA_API int() lua_isnumber ( lua_State L,
int  idx 
)

◆ lua_isstring()

LUA_API int() lua_isstring ( lua_State L,
int  idx 
)

◆ lua_isuserdata()

LUA_API int() lua_isuserdata ( lua_State L,
int  idx 
)

◆ lua_isyieldable()

LUA_API int() lua_isyieldable ( lua_State L)

Definition at line 687 of file ldo.cpp.

References lua_State::nny.

Referenced by luaB_yieldable().

◆ lua_len()

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

◆ lua_load()

LUA_API int() lua_load ( lua_State L,
lua_Reader  reader,
void *  dt,
const char *  chunkname,
const char *  mode 
)

◆ lua_newstate()

LUA_API lua_State*() lua_newstate ( lua_Alloc  f,
void *  ud 
)

◆ lua_newthread()

LUA_API lua_State*() lua_newthread ( lua_State L)

◆ lua_newuserdata()

LUA_API void*() lua_newuserdata ( lua_State L,
size_t  sz 
)

◆ lua_next()

LUA_API int() lua_next ( lua_State L,
int  idx 
)

◆ lua_pcallk()

LUA_API int() lua_pcallk ( lua_State L,
int  nargs,
int  nresults,
int  errfunc,
lua_KContext  ctx,
lua_KFunction  k 
)

◆ lua_pushboolean()

LUA_API void() lua_pushboolean ( lua_State L,
int  b 
)

Definition at line 557 of file lapi.cpp.

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

Referenced by aux_lines(), 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(), cfun_wml_condition(), finishpcall(), ai::lua_object< T >::from_type(), impl_track_eq(), lua_common::impl_tstring_eq(), lua_common::impl_tstring_le(), lua_common::impl_tstring_lt(), impl_unit_attack_equal(), impl_unit_attack_match(), impl_unit_equality(), impl_unit_status_get(), impl_unit_type_equal(), 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_fog_or_shroud(), 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(), game_lua_kernel::intf_unit_ability(), game_lua_kernel::intf_view_locked(), lua_wml::intf_wml_equal(), lua_wml::intf_wml_matches_filter(), lua_wml::intf_wml_valid(), ll_require(), lookforfunc(), ai::lua_ai_load::lua_ai_load(), lua_check_impl::lua_push(), luaB_collectgarbage(), luaB_coresume(), luaB_corunning(), luaB_pcall(), luaB_rawequal(), luaB_xpcall(), luaB_yieldable(), luaL_execresult(), luaL_fileresult(), luaW_pushsimweapon(), luaW_pushtstring(), math_ult(), os_execute(), ai::push_attack_analysis(), game_lua_kernel::push_builtin_effect(), setboolfield(), settabsb(), lua_gui2::show_message_box(), ai::transform_ai_action(), and ai::lua_ai_load::~lua_ai_load().

◆ lua_pushcclosure()

LUA_API void() lua_pushcclosure ( lua_State L,
lua_CFunction  fn,
int  n 
)

◆ lua_pushfstring()

LUA_API const char*() lua_pushfstring ( lua_State L,
const char *  fmt,
  ... 
)

◆ lua_pushinteger()

LUA_API void() lua_pushinteger ( lua_State L,
lua_Integer  n 
)

Definition at line 466 of file lapi.cpp.

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

Referenced by aux_lines(), byteoffset(), ai::cfun_ai_get_recruitment_pattern(), ai::cfun_ai_get_targets(), cfun_exec_candidate_action(), codepoint(), lua_pathfind_cost_calculator::cost(), db_gethook(), f_seek(), ai::unit_advancements_aspect::get_advancements(), get_new_thread(), lua_callable::get_value(), hookf(), ai::impl_ai_aspect_get(), ai::impl_ai_get(), impl_music_get(), impl_music_len(), impl_unit_attacks_len(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_ipairs_iter(), lua_common::impl_vconfig_size(), intf_default_generate_height_map(), lua_map_location::intf_distance_between(), game_lua_kernel::intf_find_cost_map(), game_lua_kernel::intf_find_path(), 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(), game_lua_kernel::intf_get_selected_tile(), 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(), intf_unit_defense(), intf_unit_jamming_cost(), intf_unit_movement_cost(), intf_unit_resistance(), intf_unit_vision_cost(), ipairsaux(), iter_aux(), iter_codes(), luaB_collectgarbage(), luaB_ipairs(), luaB_rawlen(), luaB_select(), luaB_tonumber(), luaL_execresult(), luaL_fileresult(), luaL_unref(), luaopen_math(), luaW_push_locationset(), luaW_pushfaivariant(), luaW_pushlocation(), luaW_pushtstring(), math_abs(), math_fmod(), math_random(), math_toint(), math_type(), pack(), pairsmeta(), ai::push_attack_analysis(), ai::push_move_map(), push_onecapture(), pushnumint(), game_lua_kernel::run_filter(), setfield(), settabsi(), lua_gui2::show_dialog(), lua_gui2::show_menu(), lua_gui2::show_message_dialog(), str_byte(), str_find_aux(), str_gsub(), str_len(), str_packsize(), str_unpack(), ai::lua_object< T >::to_type(), ai::transform_ai_action(), and utflen().

◆ lua_pushlightuserdata()

LUA_API void() lua_pushlightuserdata ( lua_State L,
void *  p 
)

◆ lua_pushlstring()

LUA_API const char*() lua_pushlstring ( lua_State L,
const char *  s,
size_t  len 
)

◆ lua_pushnil()

LUA_API void() lua_pushnil ( lua_State L)

◆ lua_pushnumber()

LUA_API void() lua_pushnumber ( lua_State L,
lua_Number  n 
)

◆ lua_pushstring()

LUA_API const char*() lua_pushstring ( lua_State L,
const char *  s 
)

Definition at line 491 of file lapi.cpp.

References api_incr_top, getstr, lua_lock, lua_unlock, luaC_checkGC, luaS_new(), s, setnilvalue, 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(), checkfield(), checkload(), db_gethook(), db_getlocal(), db_sethook(), db_setlocal(), findloader(), game_lua_kernel::game_lua_kernel(), hookf(), ai::impl_ai_aspect_set(), ai::impl_ai_get(), impl_name_generator_call(), lua_rng::impl_rng_destroy(), impl_side_get(), lua_common::impl_tstring_tostring(), impl_unit_type_new(), impl_unit_type_next(), lua_common::impl_vconfig_get(), lua_cpp::intf_cleanup(), game_lua_kernel::intf_create_animator(), 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(), 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_gui2::intf_remove_dialog_item(), 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_diff(), lua_map_location::intf_vector_sum(), lua_wml::intf_wml_tostring(), ll_loadlib(), ll_require(), lua_kernel_base::load_core(), 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_newmetatable(), luaL_requiref(), luaL_tolstring(), luaW_checkrace(), luaW_filltable(), luaW_pushfaivariant(), luaW_pushrace(), luaW_pushsimweapon(), luaW_pushtstring(), luaW_tableget(), os_getenv(), os_setlocale(), os_tmpname(), ai::push_attack_analysis(), game_lua_kernel::push_builtin_effect(), push_component(), push_locations_table(), ai::push_movements(), pushglobalfuncname(), lua_units::register_attacks_metatables(), lua_common::register_gettext_metatable(), lua_cpp::register_metatable(), lua_race::register_metatable(), lua_unit_type::register_metatable(), lua_formula_bridge::register_metatables(), lua_terrainmap::register_metatables(), lua_units::register_metatables(), lua_terrainfilter::register_metatables(), lua_preferences::register_table(), lua_unit_type::register_table(), lua_audio::register_table(), 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(), game_lua_kernel::set_wml_condition(), 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_pushthread()

LUA_API int() lua_pushthread ( lua_State L)

Definition at line 573 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_pushvalue()

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

Definition at line 237 of file lapi.cpp.

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

Referenced by add_value(), addtoclib(), game_lua_kernel::apply_effect(), auxsort(), 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(), f_write(), lua_mapgen::filter::filter(), finishpcall(), g_iofile(), ai::generate_and_push_ai_state(), generic_reader(), lua_kernel_base::get_attribute_names(), lua_callable::get_inputs(), get_new_thread(), ai::impl_ai_get(), impl_side_get(), lua_stringx::impl_str_index(), game_lua_kernel::impl_theme_items_get(), game_lua_kernel::impl_theme_items_set(), impl_unit_attacks_iter(), impl_unit_attacks_next(), impl_unit_type_pairs(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_pairs(), lua_kernel_base::interactive_run(), intf_describe_plugins(), intf_do_unsynced(), intf_load(), lua_kernel_base::intf_print(), lua_kernel_base::intf_require(), lua_gui2::intf_set_dialog_callback(), game_lua_kernel::intf_skip_messages(), lua_stringx::intf_str_format(), lua_stringx::intf_str_join_map(), io_readline(), iter_codes(), ll_require(), load_aux(), lua_rng::load_tables(), luaB_cocreate(), luaB_error(), luaB_ipairs(), luaB_print(), luaB_xpcall(), luaL_callmeta(), luaL_getsubtable(), luaL_newmetatable(), luaL_requiref(), luaL_setfuncs(), luaL_tolstring(), luaopen_base(), luaopen_package(), luaW_pushslocs(), luaW_to_locationset(), math_max(), math_min(), pairsmeta(), game_lua_kernel::push_builtin_effect(), push_unit_attacks_table(), lua_cpp::register_metatable(), lua_preferences::register_table(), game_lua_kernel::run_filter(), lua_cpp::set_functions(), lua_gui2::show_dialog(), sort_comp(), special_locations_pairs(), and tmove().

◆ lua_pushvfstring()

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

Definition at line 508 of file lapi.cpp.

References lua_lock, lua_unlock, luaC_checkGC, and luaO_pushvfstring().

Referenced by luaL_error().

◆ lua_rawequal()

LUA_API int() lua_rawequal ( lua_State L,
int  idx1,
int  idx2 
)

Definition at line 295 of file lapi.cpp.

References index2addr(), isvalid, and luaV_rawequalobj.

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

◆ lua_rawget()

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

◆ lua_rawgeti()

LUA_API int() lua_rawgeti ( lua_State L,
int  idx,
lua_Integer  n 
)

◆ lua_rawgetp()

LUA_API int() lua_rawgetp ( lua_State L,
int  idx,
const void *  p 
)

◆ lua_rawlen()

LUA_API size_t() lua_rawlen ( lua_State L,
int  idx 
)

◆ lua_rawset()

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

◆ lua_rawseti()

LUA_API void() lua_rawseti ( lua_State L,
int  idx,
lua_Integer  n 
)

◆ lua_rawsetp()

LUA_API void() lua_rawsetp ( lua_State L,
int  idx,
const void *  p 
)

◆ lua_resume()

LUA_API int() lua_resume ( lua_State L,
lua_State from,
int  narg 
)

◆ lua_rotate()

LUA_API void() lua_rotate ( lua_State L,
int  idx,
int  n 
)

◆ lua_setallocf()

LUA_API void() lua_setallocf ( lua_State L,
lua_Alloc  f,
void *  ud 
)

Definition at line 1176 of file lapi.cpp.

References f, G, lua_lock, and lua_unlock.

◆ lua_setfield()

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

Definition at line 777 of file lapi.cpp.

References auxsetstr(), index2addr(), and lua_lock.

Referenced by addtoclib(), application_lua_kernel::application_lua_kernel(), ai::lua_ai_context::create(), createclibstable(), createmeta(), createmetatable(), createsearcherstable(), 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_aspect_get(), ai::impl_ai_get(), lua_common::impl_vconfig_get(), ai::lua_ai_context::init(), game_lua_kernel::initialize(), lua_kernel_base::interactive_run(), game_lua_kernel::intf_create_animator(), game_lua_kernel::intf_get_terrain_info(), game_lua_kernel::intf_get_time_of_day(), lua_fileops::intf_read_file(), ll_require(), lua_rng::load_tables(), lua_kernel_base::lua_kernel_base(), luaL_getsubtable(), luaL_newmetatable(), luaL_requiref(), luaL_setfuncs(), luaL_tolstring(), luaopen_base(), luaopen_math(), luaopen_package(), luaopen_utf8(), luaW_filltable(), lua_stringx::luaW_open(), luaW_pushrace(), luaW_pushracetable(), luaW_pushsimdata(), luaW_pushsimweapon(), mapgen_lua_kernel::mapgen_lua_kernel(), newbox(), pack(), push_error_handler(), lua_units::register_attacks_metatables(), lua_common::register_gettext_metatable(), lua_cpp::register_metatable(), lua_race::register_metatable(), lua_unit_type::register_metatable(), lua_formula_bridge::register_metatables(), lua_terrainmap::register_metatables(), lua_units::register_metatables(), lua_terrainfilter::register_metatables(), lua_preferences::register_table(), lua_unit_type::register_table(), lua_audio::register_table(), 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_setglobal()

LUA_API void() lua_setglobal ( lua_State L,
const char *  name 
)

◆ lua_sethook()

LUA_API void() lua_sethook ( lua_State L,
lua_Hook  func,
int  mask,
int  count 
)

◆ lua_seti()

LUA_API void() lua_seti ( lua_State L,
int  idx,
lua_Integer  n 
)

◆ lua_setlocal()

LUA_API const char*() lua_setlocal ( lua_State L,
const lua_Debug ar,
int  n 
)

Definition at line 195 of file ldebug.cpp.

References findlocal(), lua_Debug::i_ci, lua_lock, lua_unlock, setobjs2s, swapextra(), and lua_State::top.

Referenced by db_setlocal().

◆ lua_setmetatable()

LUA_API int() lua_setmetatable ( lua_State L,
int  objindex 
)

◆ lua_settable()

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

◆ lua_settop()

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

◆ lua_setupvalue()

LUA_API const char*() lua_setupvalue ( lua_State L,
int  funcindex,
int  n 
)

◆ lua_setuservalue()

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

◆ lua_status()

LUA_API int() lua_status ( lua_State L)

◆ lua_stringtonumber()

LUA_API size_t() lua_stringtonumber ( lua_State L,
const char *  s 
)

Definition at line 337 of file lapi.cpp.

References api_incr_top, luaO_str2num(), and lua_State::top.

Referenced by luaB_tonumber(), and read_number().

◆ lua_toboolean()

LUA_API int() lua_toboolean ( lua_State L,
int  idx 
)

◆ lua_tocfunction()

LUA_API lua_CFunction() lua_tocfunction ( lua_State L,
int  idx 
)

Definition at line 404 of file lapi.cpp.

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

◆ lua_tointegerx()

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

◆ lua_tolstring()

LUA_API const char*() lua_tolstring ( lua_State L,
int  idx,
size_t *  len 
)

◆ lua_tonumberx()

LUA_API lua_Number() lua_tonumberx ( lua_State L,
int  idx,
int *  isnum 
)

◆ lua_topointer()

LUA_API const void*() lua_topointer ( lua_State L,
int  idx 
)

◆ lua_tothread()

LUA_API lua_State*() lua_tothread ( lua_State L,
int  idx 
)

Definition at line 423 of file lapi.cpp.

References index2addr(), thvalue, and ttisthread.

Referenced by getco(), getthread(), and luaB_auxwrap().

◆ lua_touserdata()

LUA_API void*() lua_touserdata ( lua_State L,
int  idx 
)

◆ lua_type()

LUA_API int() lua_type ( lua_State L,
int  idx 
)

◆ lua_typename()

LUA_API const char*() lua_typename ( lua_State L,
int  tp 
)

◆ lua_upvalueid()

LUA_API void*() lua_upvalueid ( lua_State L,
int  fidx,
int  n 
)

Definition at line 1268 of file lapi.cpp.

References api_check, clCvalue, f, getupvalref(), index2addr(), LUA_TCCL, LUA_TLCL, ttype, and CClosure::upvalue.

Referenced by db_upvalueid().

◆ lua_upvaluejoin()

LUA_API void() lua_upvaluejoin ( lua_State L,
int  fidx1,
int  n1,
int  fidx2,
int  n2 
)

Definition at line 1287 of file lapi.cpp.

References getupvalref(), luaC_upvalbarrier, luaC_upvdeccount(), UpVal::refcount, and upisopen.

Referenced by db_upvaluejoin().

◆ lua_version()

LUA_API const lua_Number*() lua_version ( lua_State L)

Definition at line 144 of file lapi.cpp.

References G, and LUA_VERSION_NUM.

Referenced by f_luaopen(), and luaL_checkversion_().

◆ lua_xmove()

LUA_API void() lua_xmove ( lua_State from,
lua_State to,
int  n 
)

◆ lua_yieldk()

LUA_API int() lua_yieldk ( lua_State L,
int  nresults,
lua_KContext  ctx,
lua_KFunction  k 
)

Variable Documentation

◆ lua_ident

const char lua_ident[]

Definition at line 34 of file lapi.cpp.