#include <stdarg.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lundump.h"
#include "lvm.h"
Go to the source code of this file.
Classes | |
struct | CallS |
Macros | |
#define | lapi_c |
#define | LUA_CORE |
#define | NONVALIDVALUE cast(TValue *, luaO_nilobject) |
#define | isvalid(o) ((o) != luaO_nilobject) |
#define | ispseudo(i) ((i) <= LUA_REGISTRYINDEX) |
#define | isstackindex(i, o) (isvalid(o) && !ispseudo(i)) |
#define | api_checkvalidindex(L, o) api_check(L, isvalid(o), "invalid index") |
#define | api_checkstackindex(L, i, o) api_check(L, isstackindex(i, o), "index not in the stack") |
#define | checkresults(L, na, nr) |
#define api_checkstackindex | ( | L, | |
i, | |||
o | |||
) | api_check(L, isstackindex(i, o), "index not in the stack") |
Definition at line 45 of file lapi.cpp.
Referenced by lua_insert(), lua_pcallk(), and lua_remove().
#define checkresults | ( | L, | |
na, | |||
nr | |||
) |
Definition at line 869 of file lapi.cpp.
Referenced by lua_callk(), and lua_pcallk().
#define ispseudo | ( | i | ) | ((i) <= LUA_REGISTRYINDEX) |
Definition at line 38 of file lapi.cpp.
Referenced by index2addr(), and lua_absindex().
#define isvalid | ( | o | ) | ((o) != luaO_nilobject) |
Definition at line 35 of file lapi.cpp.
Referenced by lua_compare(), lua_rawequal(), and lua_type().
#define NONVALIDVALUE cast(TValue *, luaO_nilobject) |
Definition at line 32 of file lapi.cpp.
Referenced by index2addr().
Definition at line 1182 of file lapi.cpp.
References clCvalue, clLvalue, getstr, LUA_TCCL, LUA_TLCL, Upvaldesc::name, obj2gco, LClosure::p, ttype, LClosure::upvals, CClosure::upvalue, Proto::upvalues, and UpVal::v.
Referenced by lua_getupvalue(), and lua_setupvalue().
Definition at line 915 of file lapi.cpp.
References cast, CallS::func, luaD_call(), and CallS::nresults.
Referenced by lua_pcallk().
Definition at line 1240 of file lapi.cpp.
References api_check, clLvalue, index2addr(), ttisLclosure, and LClosure::upvals.
Referenced by lua_upvalueid(), and lua_upvaluejoin().
Definition at line 80 of file lapi.cpp.
References luaD_growstack().
Referenced by lua_checkstack().
Definition at line 49 of file lapi.cpp.
References api_check, lua_State::ci, clCvalue, CallInfo::func, G, ispseudo, LUA_REGISTRYINDEX, MAXUPVAL, NONVALIDVALUE, lua_State::top, ttislcf, and CClosure::upvalue.
Referenced by getupvalref(), lua_compare(), lua_copy(), lua_getfield(), lua_getmetatable(), lua_gettable(), lua_getupvalue(), lua_getuservalue(), lua_insert(), lua_iscfunction(), lua_isnumber(), lua_isuserdata(), lua_len(), lua_next(), lua_pcallk(), lua_pushvalue(), lua_rawequal(), lua_rawget(), lua_rawgeti(), lua_rawgetp(), lua_rawlen(), lua_rawset(), lua_rawseti(), lua_rawsetp(), lua_remove(), lua_setfield(), lua_setmetatable(), lua_settable(), lua_setupvalue(), lua_setuservalue(), lua_toboolean(), lua_tocfunction(), lua_tointegerx(), lua_tolstring(), lua_tonumberx(), lua_topointer(), lua_tothread(), lua_tounsignedx(), lua_touserdata(), lua_type(), lua_upvalueid(), and moveto().
Definition at line 147 of file lapi.cpp.
References cast_int, lua_State::ci, CallInfo::func, ispseudo, and lua_State::top.
Referenced by ai::lua_ai_action_handler::handle(), luaL_callmeta(), luaL_getsubtable(), luaL_ref(), luaL_unref(), luaW_toconfig(), luaW_tolocation(), and ai::lua_object< T >::store().
Definition at line 287 of file lapi.cpp.
References api_checknelems, cast, lua_lock, LUA_OPADD, LUA_OPUNM, lua_unlock, luaO_arith(), luaV_arith(), nvalue, setnvalue, setobjs2s, TM_ADD, lua_State::top, and ttisnumber.
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().
Definition at line 883 of file lapi.cpp.
References adjustresults, api_check, api_checknelems, CallInfo::c, checkresults, lua_State::ci, isLua, lua_lock, LUA_OK, lua_unlock, luaD_call(), lua_State::nny, lua_State::status, lua_State::top, and CallInfo::u.
Referenced by luaB_dofile().
Definition at line 86 of file lapi.cpp.
References cast_int, lua_State::ci, EXTRA_STACK, growstack(), lua_lock, LUA_OK, lua_unlock, luaD_rawrunprotected(), LUAI_MAXSTACK, lua_State::stack, lua_State::stack_last, CallInfo::top, and lua_State::top.
Referenced by auxresume(), finishpcall(), luaL_checkstack(), luaW_filltable(), luaW_toconfig(), luaW_tolocation(), pmain(), and unpack().
Definition at line 310 of file lapi.cpp.
References api_check, equalobj, i, index2addr(), isvalid, lua_lock, LUA_OPEQ, LUA_OPLE, LUA_OPLT, lua_unlock, luaV_lessequal(), and luaV_lessthan().
Referenced by lua_callable::do_compare(), and sort_comp().
Definition at line 1125 of file lapi.cpp.
References api_checknelems, api_incr_top, lua_lock, lua_unlock, luaC_checkGC, luaS_newlstr(), luaV_concat(), setsvalue2s, and lua_State::top.
Referenced by findfield(), loadline(), luaB_auxwrap(), luaB_error(), luaL_error(), and luaL_traceback().
Definition at line 220 of file lapi.cpp.
References index2addr(), lua_lock, lua_unlock, and moveto().
Referenced by luaB_xpcall(), and pushglobalfuncname().
Definition at line 667 of file lapi.cpp.
References api_incr_top, lua_lock, lua_unlock, luaC_checkGC, luaH_new(), luaH_resize(), sethvalue, and lua_State::top.
Referenced by ai::cfun_ai_get_attacks(), ai::cfun_ai_get_recruitment_pattern(), ai::cfun_ai_get_targets(), createmetatable(), createsearcherstable(), db_getinfo(), game_lua_kernel::game_lua_kernel(), getargs(), impl_side_get(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), lua_common::impl_vconfig_get(), lua_common::impl_vconfig_ipairs_iter(), game_lua_kernel::initialize(), game_lua_kernel::intf_find_cost_map(), intf_find_path(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), lua_gui2::intf_get_dialog_value(), game_lua_kernel::intf_get_locations(), game_lua_kernel::intf_get_sides(), game_lua_kernel::intf_get_starting_location(), game_lua_kernel::intf_get_villages(), ll_seeall(), game_lua_kernel::load_game(), lua_check_impl::lua_push(), luaL_findtable(), luaopen_package(), luaW_filltable(), luaW_pushlocation(), luaW_pushrace(), luaW_pushracetable(), luaW_pushsimdata(), luaW_pushsimweapon(), luaW_pushunittype(), os_date(), pack(), push_component(), ai::push_move_map(), ai::push_movements(), lua_formula_bridge::register_metatables(), special_locations_index(), and special_locations_next().
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().
Definition at line 1099 of file lapi.cpp.
References api_checknelems, lua_lock, and luaG_errormsg().
Referenced by mapgen_lua_kernel::create_map(), mapgen_lua_kernel::create_scenario(), ai::impl_ai_aspect_set(), lua_rng::impl_rng_destroy(), lua_cpp::intf_cleanup(), lua_map_location::intf_distance_between(), lua_map_location::intf_get_relative_dir(), intf_name_generator(), lua_map_location::intf_rotate_right_around_center(), lua_kernel_base::intf_show_dialog(), lua_kernel_base::intf_show_lua_console(), lua_kernel_base::intf_show_message_dialog(), lua_kernel_base::intf_show_popup_dialog(), lua_map_location::intf_tiles_adjacent(), lua_map_location::intf_vector_sum(), lua_fileops::load_file(), application_lua_kernel::load_script_from_file(), application_lua_kernel::load_script_from_string(), luaB_auxwrap(), luaB_dofile(), luaB_error(), luaL_error(), special_locations_newindex(), and lua_kernel_base::throw_exception().
Definition at line 1015 of file lapi.cpp.
References cast, cast_int, G, g, global_State::GCdebt, global_State::GCestimate, global_State::gckind, global_State::gcmajorinc, global_State::gcpause, global_State::gcrunning, GCSpause, global_State::gcstate, global_State::gcstepmul, GCSTEPSIZE, gettotalbytes, KGC_GEN, KGC_NORMAL, LUA_GCCOLLECT, LUA_GCCOUNT, LUA_GCCOUNTB, LUA_GCGEN, LUA_GCINC, LUA_GCISRUNNING, LUA_GCRESTART, LUA_GCSETMAJORINC, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, LUA_GCSTEP, LUA_GCSTOP, lua_lock, lua_unlock, luaC_changemode(), luaC_forcestep(), luaC_fullgc(), and luaE_setdebt().
Referenced by luaB_collectgarbage(), pmain(), and report().
Definition at line 1151 of file lapi.cpp.
References G, lua_lock, and lua_unlock.
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().
Definition at line 622 of file lapi.cpp.
References api_incr_top, index2addr(), lua_lock, lua_unlock, luaS_new(), luaV_gettable(), setsvalue2s, and lua_State::top.
Referenced by ai::cfun_attack_rating(), cfun_exec_candidate_action(), cfun_exec_stage(), lua_callable::do_compare(), findfile(), findloader(), g_iofile(), ai::lua_ai_context::get_arguments(), ai::lua_ai_context::get_persistent_data(), getboolfield(), getfield(), getiofile(), ai::lua_ai_action_handler::handle(), io_close(), io_lines(), ll_addtoclib(), ll_checkclib(), ll_module(), ll_require(), load_fake_units(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaL_getsubtable(), luaL_pushmodule(), luaopen_table(), luaW_tolocation(), noenv(), searcher_preload(), lua_gui2::show_message_dialog(), ai::lua_object< T >::to_type(), and ai::lua_ai_context::update_state().
Definition at line 602 of file lapi.cpp.
References G, hvalue, lua_lock, LUA_RIDX_GLOBALS, lua_unlock, luaH_getint(), luaS_new(), luaV_gettable(), setsvalue2s, and lua_State::top.
Referenced by dolibrary(), dotty(), game_lua_kernel::game_lua_kernel(), lua_kernel_base::get_attribute_names(), lua_kernel_base::get_global_var_names(), get_prompt(), game_lua_kernel::initialize(), intf_describe_plugins(), lua_kernel_base::intf_require(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaB_print(), mapgen_lua_kernel::mapgen_lua_kernel(), game_lua_kernel::set_wml_action(), and ai::lua_ai_load::~lua_ai_load().
Definition at line 680 of file lapi.cpp.
References api_incr_top, G, hvalue, index2addr(), lua_lock, LUA_TTABLE, LUA_TUSERDATA, lua_unlock, sethvalue, lua_State::top, ttypenv, and uvalue.
Referenced by db_getmetatable(), lua_callable::do_compare(), ll_seeall(), luaB_getmetatable(), luaL_getmetafield(), luaL_testudata(), and luaW_hasmetatable().
Definition at line 613 of file lapi.cpp.
References index2addr(), lua_lock, lua_unlock, luaV_gettable(), and lua_State::top.
Referenced by add_value(), lua_callable::get_value(), lua_kernel_base::lua_kernel_base(), and ai::lua_object< T >::to_type().
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().
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().
Definition at line 709 of file lapi.cpp.
References api_check, api_incr_top, index2addr(), lua_lock, lua_unlock, sethvalue, setnilvalue, lua_State::top, ttisuserdata, and uvalue.
Referenced by db_getuservalue().
Definition at line 187 of file lapi.cpp.
References api_checkstackindex, index2addr(), lua_lock, lua_unlock, setobjs2s, and lua_State::top.
Referenced by auxupvalue(), docall(), dotty(), findfield(), handle_script(), ll_loadlib(), ll_require(), ll_searchpath(), load_aux(), loadline(), luaB_auxwrap(), luaB_coresume(), luaB_pcall(), luaL_addvalue(), luaL_openlib(), luaW_pcall(), lua_kernel_base::protected_call(), lua_cpp::push_closure(), game_lua_kernel::run_filter(), and lua_kernel_base::throwing_run().
Definition at line 255 of file lapi.cpp.
References index2addr(), ttisCclosure, and ttislcf.
Referenced by db_upvaluejoin(), and set_env().
Definition at line 261 of file lapi.cpp.
References index2addr(), and tonumber.
Referenced by ai::ai_attack(), game_lua_kernel::apply_effect(), db_getinfo(), find_widget(), lua_callable::get_inputs(), impl_unit_attacks_get(), impl_unit_set(), lua_common::impl_vconfig_get(), lua_map_location::intf_get_direction(), game_lua_kernel::intf_get_time_of_day(), game_lua_kernel::intf_get_unit(), game_lua_kernel::intf_put_unit(), intf_random(), game_lua_kernel::intf_random(), game_lua_kernel::intf_set_end_campaign_text(), game_lua_kernel::intf_simulate_combat(), game_lua_kernel::intf_toggle_fog(), load_fake_units(), luaW_toconfig(), luaW_tolocation(), lua_gui2::show_message_dialog(), and ai::lua_object< T >::to_type().
Definition at line 268 of file lapi.cpp.
References LUA_TNUMBER, LUA_TSTRING, and lua_type().
Referenced by add_value(), addfield(), game_lua_kernel::apply_effect(), mapgen_lua_kernel::create_map(), findloader(), 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(), ai::impl_ai_get(), lua_formula_bridge::intf_compile_formula(), lua_map_location::intf_get_direction(), game_lua_kernel::intf_get_unit(), game_lua_kernel::intf_log(), intf_name_generator(), game_lua_kernel::intf_set_time_of_day(), load_fake_units(), luaB_auxwrap(), luaB_error(), luaW_toconfig(), and ai::lua_object< T >::to_type().
Definition at line 274 of file lapi.cpp.
References index2addr(), ttislightuserdata, and ttisuserdata.
Referenced by ai::cfun_ai_get_suitable_keep(), lua_kernel_base::get_attribute_names(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), and luaW_tolocation().
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 * | data, | ||
const char * | chunkname, | ||
const char * | mode | ||
) |
Definition at line 967 of file lapi.cpp.
References clLvalue, G, hvalue, lua_lock, LUA_OK, LUA_RIDX_GLOBALS, lua_unlock, luaC_barrier, luaD_protectedparser(), luaH_getint(), luaZ_init(), setobj, lua_State::top, LClosure::upvals, and UpVal::v.
Referenced by combine(), lua_fileops::lua_filestream::lua_loadfile(), luaB_load(), luaL_loadbufferx(), and luaL_loadfilex().
Definition at line 1169 of file lapi.cpp.
References api_incr_top, lua_lock, lua_unlock, luaC_checkGC, luaS_newudata(), setuvalue, and lua_State::top.
Referenced by ai::call_lua_filter_fcn(), game_lua_kernel::game_lua_kernel(), impl_race_get(), lua_rng::impl_rng_create(), lua_common::impl_tstring_concat(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_pairs(), 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(), intf_name_generator(), lua_common::intf_textdomain(), luaL_prepbuffsize(), luaW_pushfaivariant(), luaW_pushlocalunit(), luaW_pushteam(), luaW_pushtstring(), luaW_pushvconfig(), newprefile(), lua_cpp::push_function(), and game_lua_kernel::run_filter().
Definition at line 1108 of file lapi.cpp.
References api_check, api_incr_top, hvalue, index2addr(), lua_lock, lua_unlock, luaH_next(), lua_State::top, and ttistable.
Referenced by findfield(), lua_kernel_base::get_attribute_names(), lua_kernel_base::get_global_var_names(), lua_callable::get_inputs(), lua_callable::get_value(), intf_name_generator(), lua_kernel_base::lua_kernel_base(), luaB_next(), luaW_toconfig(), and maxn().
LUA_API int lua_pcallk | ( | lua_State * | L, |
int | nargs, | ||
int | nresults, | ||
int | errfunc, | ||
int | ctx, | ||
lua_CFunction | k | ||
) |
Definition at line 922 of file lapi.cpp.
References adjustresults, lua_State::allowhook, api_check, api_checknelems, api_checkstackindex, CallInfo::c, CallInfo::callstatus, checkresults, lua_State::ci, CIST_YPCALL, lua_State::errfunc, CallInfo::extra, f_call(), CallS::func, index2addr(), isLua, lua_lock, LUA_OK, lua_unlock, luaD_call(), luaD_pcall(), lua_State::nny, CallS::nresults, savestack, lua_State::status, lua_State::top, and CallInfo::u.
Referenced by luaB_pcall(), and luaB_xpcall().
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 | ||
) |
Definition at line 549 of file lapi.cpp.
References api_check, api_checknelems, api_incr_top, Closure::c, CClosure::f, lua_lock, lua_unlock, luaC_checkGC, luaF_newCclosure(), MAXUPVAL, setclCvalue, setfvalue, setobj2n, lua_State::top, and CClosure::upvalue.
Referenced by aux_lines(), createsearcherstable(), ai::generate_and_push_ai_table(), gmatch(), ai::impl_ai_aspect_get(), ai::impl_ai_get(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_pairs(), luaB_cowrap(), luaL_setfuncs(), ai::push_attack_analysis(), game_lua_kernel::push_builtin_effect(), lua_cpp::push_closure(), push_component(), and game_lua_kernel::set_wml_action().
Definition at line 536 of file lapi.cpp.
References lua_lock, lua_unlock, luaC_checkGC, and luaO_pushvfstring().
Referenced by checkoption(), db_getinfo(), dotty(), errfile(), f_tostring(), intf_find_path(), loadfunc(), luaL_checkoption(), luaL_fileresult(), luaL_loadfilex(), luaL_tolstring(), luaL_traceback(), luaL_where(), pushfuncname(), pushline(), searcher_Croot(), searcher_preload(), searchpath(), and typeerror().
LUA_API void lua_pushinteger | ( | lua_State * | L, |
lua_Integer | n | ||
) |
Definition at line 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().
Definition at line 579 of file lapi.cpp.
References api_incr_top, lua_lock, lua_unlock, setpvalue, and lua_State::top.
Referenced by ai::call_lua_filter_fcn(), ai::lua_ai_context::create(), ai::lua_ai_action_handler::create(), db_upvalueid(), game_lua_kernel::game_lua_kernel(), ai::generate_and_push_ai_state(), ai::generate_and_push_ai_table(), ai::lua_ai_context::get_arguments(), get_new_thread(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), ai::impl_ai_aspect_get(), ai::impl_ai_get(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), 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(), ll_addtoclib(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaW_hasmetatable(), luaW_pcall(), luaW_pushfaivariant(), luaW_pushlocalunit(), main(), lua_kernel_base::protected_call(), ai::push_attack_analysis(), push_component(), lua_formula_bridge::register_metatables(), 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_ai_action_handler::~lua_ai_action_handler(), and ai::lua_ai_context::~lua_ai_context().
Definition at line 495 of file lapi.cpp.
References api_incr_top, getstr, lua_lock, lua_unlock, luaC_checkGC, luaS_newlstr(), setsvalue2s, and lua_State::top.
Referenced by add_value(), lua_callable::get_value(), impl_formula_tostring(), impl_race_get(), impl_unit_type_get(), lua_common::impl_vconfig_ipairs_iter(), lua_common::impl_vconfig_pairs_iter(), loadfunc(), lua_check_impl::lua_push(), luaL_findtable(), luaL_pushresult(), luaW_getglobal(), luaW_pushfaivariant(), modinit(), push_onecapture(), pushnexttemplate(), searcher_Croot(), lua_gui2::show_message_dialog(), str_sub(), and test_eof().
Definition at line 459 of file lapi.cpp.
References api_incr_top, lua_lock, lua_unlock, setnilvalue, and lua_State::top.
Referenced by db_getinfo(), db_getlocal(), db_getmetatable(), db_getuservalue(), findfield(), g_read(), lua_kernel_base::get_attribute_names(), lua_kernel_base::get_global_var_names(), lua_callable::get_inputs(), lua_callable::get_value(), hookf(), ai::impl_ai_aspect_get(), intf_name_generator(), lua_gui2::intf_set_dialog_callback(), io_lines(), io_noclose(), io_type(), ll_loadlib(), ll_searchpath(), load_aux(), lua_kernel_base::lua_kernel_base(), lua_pushstring(), luaB_getmetatable(), luaB_next(), luaB_pcall(), luaB_tonumber(), luaL_execresult(), luaL_fileresult(), luaW_pushfaivariant(), luaW_pushvariable(), luaW_toconfig(), maxn(), os_date(), os_time(), pairsmeta(), read_number(), lua_gui2::show_message_dialog(), special_locations_pairs(), str_find_aux(), tremove(), 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_API void lua_pushnumber | ( | lua_State * | L, |
lua_Number | n | ||
) |
Definition at line 467 of file lapi.cpp.
References api_incr_top, lua_lock, lua_unlock, luaG_runerror(), luai_checknum, setnvalue, and lua_State::top.
Referenced by ai::cfun_ai_get_aggression(), ai::cfun_ai_get_attack_depth(), ai::cfun_ai_get_caution(), ai::cfun_ai_get_leader_aggression(), ai::cfun_ai_get_leader_value(), ai::cfun_ai_get_scout_village_targeting(), ai::cfun_ai_get_suitable_keep(), ai::cfun_ai_get_targets(), ai::cfun_ai_get_village_value(), ai::cfun_ai_get_villages_per_scout(), ai::cfun_attack_rating(), lua_pathfind_cost_calculator::cost(), f_seek(), ai::impl_ai_aspect_get(), lua_rng::impl_rng_draw(), lua_check_impl::lua_push(), lua_round(), luaB_collectgarbage(), luaB_tonumber(), luaL_checkversion_(), luaopen_math(), luaW_pushfaivariant(), luaW_pushsimdata(), luaW_pushsimweapon(), math_abs(), math_acos(), math_asin(), math_atan(), math_atan2(), math_ceil(), math_cos(), math_cosh(), math_deg(), math_exp(), math_floor(), math_fmod(), math_frexp(), math_ldexp(), math_log(), math_log10(), math_max(), math_min(), math_modf(), math_pow(), math_rad(), math_random(), math_sin(), math_sinh(), math_sqrt(), math_tan(), math_tanh(), maxn(), os_clock(), os_difftime(), os_time(), ai::push_attack_analysis(), read_number(), special_locations_index(), special_locations_len(), and special_locations_next().
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().
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 | u | ||
) |
Definition at line 485 of file lapi.cpp.
References api_incr_top, lua_lock, lua_unlock, lua_unsigned2number, setnvalue, and lua_State::top.
Referenced by b_and(), b_arshift(), b_extract(), b_not(), b_or(), b_replace(), b_rot(), b_shift(), and b_xor().
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().
Definition at line 525 of file lapi.cpp.
References lua_lock, lua_unlock, luaC_checkGC, and luaO_pushvfstring().
Referenced by luaL_error().
Definition at line 280 of file lapi.cpp.
References index2addr(), isvalid, and luaV_rawequalobj.
Referenced by findfield(), luaB_rawequal(), luaL_testudata(), and luaW_hasmetatable().
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().
Definition at line 643 of file lapi.cpp.
References api_check, api_incr_top, hvalue, index2addr(), lua_lock, lua_unlock, luaH_getint(), setobj2s, lua_State::top, and ttistable.
Referenced by addfield(), auxsort(), ai::call_lua_filter_fcn(), findloader(), gctm(), ai::unit_advancements_aspect::get_advancements(), ai::lua_ai_context::get_arguments(), ai::lua_ai_context::get_persistent_data(), ai::lua_ai_action_handler::handle(), impl_side_set(), impl_unit_attack_get(), impl_unit_attack_set(), impl_unit_attacks_get(), impl_unit_attacks_len(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_variables_get(), impl_unit_variables_set(), game_lua_kernel::intf_get_time_of_day(), ipairsaux(), load_fake_units(), ai::lua_ai_load::lua_ai_load(), lua_check_impl::lua_check(), luaL_ref(), luaL_unref(), luaW_toconfig(), luaW_tolocation(), ai::lua_ai_context::set_arguments(), ai::lua_ai_context::set_persistent_data(), lua_gui2::show_message_dialog(), tinsert(), ai::lua_object< T >::to_type(), tremove(), and unpack().
Definition at line 654 of file lapi.cpp.
References api_check, api_incr_top, cast, hvalue, index2addr(), lua_lock, lua_unlock, luaH_get(), setobj2s, setpvalue, lua_State::top, and ttistable.
Definition at line 401 of file lapi.cpp.
References hvalue, index2addr(), LUA_TSTRING, LUA_TTABLE, LUA_TUSERDATA, luaH_getn(), tsvalue, ttypenv, and uvalue.
Referenced by ai::lua_ai_action_handler::create(), ai::generate_and_push_ai_state(), lua_callable::get_value(), lua_gui2::intf_set_dialog_callback(), load_fake_units(), lua_check_impl::lua_check(), luaB_rawlen(), luaL_ref(), luaW_pushfaivariant(), luaW_toconfig(), read_line(), lua_gui2::show_message_dialog(), and ai::lua_object< T >::to_type().
Definition at line 764 of file lapi.cpp.
References api_check, api_checknelems, gcvalue, hvalue, index2addr(), invalidateTMcache, lua_lock, lua_unlock, luaC_barrierback, luaH_set(), setobj2t, lua_State::top, and ttistable.
Referenced by ai::cfun_ai_get_targets(), db_sethook(), game_lua_kernel::game_lua_kernel(), get_new_thread(), ai::impl_ai_get(), impl_race_get(), game_lua_kernel::impl_theme_items_get(), game_lua_kernel::impl_theme_items_set(), impl_unit_type_get(), ai::lua_ai_context::init(), intf_debug_ai(), intf_get_traits(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaB_rawset(), luaW_pushlocation(), ai::push_attack_analysis(), game_lua_kernel::push_builtin_effect(), push_component(), push_locations_talbe(), ai::push_movements(), lua_formula_bridge::register_metatables(), lua_common::register_vconfig_metatable(), game_lua_kernel::set_wml_action(), and ai::lua_ai_load::~lua_ai_load().
Definition at line 778 of file lapi.cpp.
References api_check, api_checknelems, gcvalue, hvalue, index2addr(), lua_lock, lua_unlock, luaC_barrierback, luaH_setint(), lua_State::top, and ttistable.
Referenced by ai::cfun_ai_get_attacks(), ai::lua_ai_action_handler::create(), createsearcherstable(), ai::generate_and_push_ai_state(), getargs(), impl_side_get(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), lua_common::impl_vconfig_get(), lua_common::impl_vconfig_ipairs_iter(), game_lua_kernel::intf_find_cost_map(), intf_find_path(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), lua_gui2::intf_get_dialog_value(), game_lua_kernel::intf_get_locations(), game_lua_kernel::intf_get_recall_units(), game_lua_kernel::intf_get_sides(), game_lua_kernel::intf_get_starting_location(), game_lua_kernel::intf_get_units(), game_lua_kernel::intf_get_villages(), lua_gui2::intf_set_dialog_callback(), ll_addtoclib(), game_lua_kernel::load_game(), lua_check_impl::lua_push(), luaL_ref(), luaL_unref(), luaW_filltable(), luaW_pushsimdata(), pack(), ai::push_move_map(), ai::push_movements(), application_lua_kernel::thread::run_script(), set2(), special_locations_index(), special_locations_next(), tinsert(), tremove(), ai::lua_ai_action_handler::~lua_ai_action_handler(), and ai::lua_ai_context::~lua_ai_context().
Definition at line 791 of file lapi.cpp.
References api_check, api_checknelems, cast, gcvalue, hvalue, index2addr(), lua_lock, lua_unlock, luaC_barrierback, luaH_set(), setobj2t, setpvalue, lua_State::top, and ttistable.
Definition at line 176 of file lapi.cpp.
References api_checkstackindex, index2addr(), lua_lock, lua_unlock, setobjs2s, and lua_State::top.
Referenced by ai::lua_ai_action_handler::create(), db_gethook(), docall(), errfile(), findfield(), ai::generate_and_push_ai_state(), ai::lua_ai_action_handler::handle(), lua_cpp::intf_dispatcher(), lua_fileops::load_file(), loadline(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaL_addvalue(), luaL_findtable(), luaL_getmetafield(), luaL_loadfilex(), luaL_prepbuffsize(), luaL_pushmodule(), luaL_pushresult(), luaW_getglobal(), luaW_pcall(), luaW_tolocation(), lua_kernel_base::protected_call(), pushfuncname(), searchpath(), setpath(), and treatstackoption().
Definition at line 211 of file lapi.cpp.
References api_checknelems, lua_lock, lua_unlock, moveto(), and lua_State::top.
Referenced by finishpcall(), generic_reader(), gmatch_aux(), game_lua_kernel::intf_select_hex(), io_lines(), luaB_xpcall(), and pack().
Definition at line 1161 of file lapi.cpp.
References G, lua_lock, and lua_unlock.
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().
Definition at line 728 of file lapi.cpp.
References api_checknelems, G, hvalue, lua_lock, LUA_RIDX_GLOBALS, lua_unlock, luaH_getint(), luaS_new(), luaV_settable(), setsvalue2s, and lua_State::top.
Referenced by application_lua_kernel::application_lua_kernel(), dolibrary(), game_lua_kernel::game_lua_kernel(), handle_script(), lua_rng::load_tables(), ai::lua_ai_load::lua_ai_load(), lua_kernel_base::lua_kernel_base(), luaL_requiref(), luaopen_table(), and ai::lua_ai_load::~lua_ai_load().
Definition at line 806 of file lapi.cpp.
References api_check, api_checknelems, G, gcvalue, hvalue, index2addr(), lua_lock, LUA_TTABLE, LUA_TUSERDATA, lua_unlock, luaC_checkfinalizer(), luaC_objbarrier, luaC_objbarrierback, rawuvalue, lua_State::top, ttisnil, ttistable, ttypenv, and uvalue.
Referenced by ai::call_lua_filter_fcn(), createmetatable(), db_sethook(), db_setmetatable(), game_lua_kernel::game_lua_kernel(), ai::generate_and_push_ai_table(), ai::impl_ai_get(), impl_race_get(), impl_unit_attacks_get(), impl_unit_get(), impl_unit_type_get(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_pairs(), 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(), intf_name_generator(), ll_seeall(), luaB_setmetatable(), luaL_setmetatable(), luaopen_package(), luaW_pushfaivariant(), luaW_pushlocalunit(), game_lua_kernel::push_builtin_effect(), push_locations_talbe(), and game_lua_kernel::run_filter().
Definition at line 741 of file lapi.cpp.
References api_checknelems, index2addr(), lua_lock, lua_unlock, luaV_settable(), and lua_State::top.
Referenced by ai::cfun_ai_get_recruitment_pattern(), ai::impl_ai_aspect_get(), lua_kernel_base::intf_require(), lua_check_impl::lua_push(), luaL_findtable(), luaW_pushfaivariant(), ai::push_move_map(), and application_lua_kernel::thread::run_script().
Definition at line 159 of file lapi.cpp.
References api_check, lua_State::ci, CallInfo::func, lua_lock, lua_unlock, setnilvalue, and lua_State::top.
Referenced by application_lua_kernel::application_lua_kernel(), game_lua_kernel::apply_effect(), ai::cfun_attack_rating(), db_debug(), db_sethook(), db_setlocal(), db_setmetatable(), db_setuservalue(), lua_callable::do_compare(), dotty(), finishpcall(), game_lua_kernel::game_lua_kernel(), 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(), gmatch(), ai::lua_ai_action_handler::handle(), game_lua_kernel::initialize(), game_lua_kernel::intf_get_recall_units(), game_lua_kernel::intf_get_sides(), game_lua_kernel::intf_get_units(), io_readline(), ll_require(), load_fake_units(), loadline(), lua_kernel_base::lua_kernel_base(), luaB_dofile(), luaB_error(), luaB_load(), luaB_next(), luaB_rawget(), luaB_rawset(), luaB_setmetatable(), luaL_loadfilex(), luaW_toconfig(), mapgen_lua_kernel::mapgen_lua_kernel(), os_time(), pushglobalfuncname(), ai::lua_ai_context::set_arguments(), ai::lua_ai_context::set_persistent_data(), sort(), str_dump(), ai::lua_object< T >::to_type(), and ai::unit_advancements_aspect::unit_advancements_aspect().
Definition at line 1221 of file lapi.cpp.
References api_checknelems, aux_upvalue(), index2addr(), lua_lock, lua_unlock, luaC_barrier, setobj, and lua_State::top.
Referenced by auxupvalue(), load_aux(), and set_env().
Definition at line 846 of file lapi.cpp.
References api_check, api_checknelems, gcvalue, hvalue, index2addr(), lua_lock, lua_unlock, luaC_objbarrier, lua_State::top, ttisnil, ttistable, ttisuserdata, and uvalue.
Referenced by db_setuservalue().
Definition at line 1006 of file lapi.cpp.
References lua_State::status.
Referenced by auxresume(), application_lua_kernel::thread::is_running(), application_lua_kernel::load_script_from_string(), luaB_costatus(), application_lua_kernel::thread::run_script(), and application_lua_kernel::thread::status().
Definition at line 377 of file lapi.cpp.
References index2addr(), and l_isfalse.
Referenced by add_value(), getboolfield(), io_readline(), ll_require(), luaB_assert(), luaL_tolstring(), luaW_toboolean(), luaW_totstring(), main(), noenv(), os_exit(), sort_comp(), and str_find_aux().
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().
Definition at line 383 of file lapi.cpp.
References index2addr(), lua_lock, lua_unlock, luaC_checkGC, luaV_tostring(), svalue, tsvalue, and ttisstring.
Referenced by add_s(), generic_reader(), gmatch_aux(), incomplete(), loadline(), luaB_load(), luaB_print(), luaL_addvalue(), luaL_checklstring(), and luaL_tolstring().
LUA_API lua_Number lua_tonumberx | ( | lua_State * | L, |
int | idx, | ||
int * | isnum | ||
) |
Definition at line 329 of file lapi.cpp.
References index2addr(), nvalue, and tonumber.
Referenced by game_lua_kernel::intf_set_time_of_day(), luaB_tonumber(), luaL_checknumber(), and luaW_tolocation().
Definition at line 437 of file lapi.cpp.
References cast, clCvalue, clLvalue, fvalue, hvalue, index2addr(), LUA_TCCL, LUA_TLCF, LUA_TLCL, LUA_TLIGHTUSERDATA, lua_touserdata(), LUA_TTABLE, LUA_TTHREAD, LUA_TUSERDATA, thvalue, and ttype.
Referenced by lua_callable::do_compare(), and luaL_tolstring().
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().
Definition at line 421 of file lapi.cpp.
References index2addr(), LUA_TLIGHTUSERDATA, LUA_TUSERDATA, pvalue, rawuvalue, and ttypenv.
Referenced by ai::cfun_attack_rating(), cfun_exec_candidate_action(), cfun_exec_stage(), game_lua_kernel::cfun_wml_action(), gctm(), ai::get_engine(), getiofile(), impl_formula_collect(), impl_formula_tostring(), lua_common::impl_gettext(), impl_name_generator_call(), impl_name_generator_collect(), lua_common::impl_tstring_collect(), lua_common::impl_tstring_eq(), lua_common::impl_tstring_le(), lua_common::impl_tstring_lt(), lua_common::impl_tstring_tostring(), impl_unit_collect(), impl_unit_get(), impl_unit_set(), lua_common::impl_vconfig_collect(), lua_common::impl_vconfig_get(), lua_common::impl_vconfig_ipairs_collect(), lua_common::impl_vconfig_pairs_collect(), lua_common::impl_vconfig_size(), game_lua_kernel::intf_erase_unit(), lua_formula_bridge::intf_eval_formula(), game_lua_kernel::intf_extract_unit(), game_lua_kernel::intf_find_vacant_tile(), game_lua_kernel::intf_match_unit(), game_lua_kernel::intf_put_recall_unit(), game_lua_kernel::intf_put_unit(), io_readline(), ll_checkclib(), lua_topointer(), luaL_testudata(), luaW_tounit(), luaW_tounit_ptr(), and pmain().
Definition at line 243 of file lapi.cpp.
References index2addr(), isvalid, LUA_TNONE, and ttypenv.
Referenced by game_lua_kernel::apply_effect(), mapgen_lua_kernel::create_map(), mapgen_lua_kernel::create_scenario(), db_getuservalue(), db_setmetatable(), db_setuservalue(), finalreport(), findfield(), g_read(), g_write(), lua_rng::impl_rng_destroy(), lua_cpp::intf_cleanup(), lua_map_location::intf_get_direction(), lua_gui2::intf_set_dialog_visible(), application_lua_kernel::load_script_from_file(), application_lua_kernel::load_script_from_string(), lua_isstring(), luaB_rawlen(), luaB_select(), luaB_setmetatable(), luaL_checkany(), luaL_checktype(), luaL_tolstring(), luaW_checkvariable(), luaW_toconfig(), luaW_tofaivariant(), luaW_toscalar(), luaW_totstring(), luaW_tovconfig(), maxn(), lua_gui2::show_message_dialog(), str_gsub(), and lua_common::tstring_concat_aux().
Definition at line 249 of file lapi.cpp.
References ttypename, and UNUSED.
Referenced by game_lua_kernel::apply_effect(), mapgen_lua_kernel::create_map(), mapgen_lua_kernel::create_scenario(), lua_rng::impl_rng_destroy(), lua_cpp::intf_cleanup(), intf_find_path(), lua_map_location::intf_get_direction(), application_lua_kernel::load_script_from_file(), application_lua_kernel::load_script_from_string(), luaW_checkvariable(), lua_gui2::show_message_dialog(), and tag_error().
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().
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_().
Definition at line 106 of file lapi.cpp.
References api_check, api_checknelems, lua_State::ci, G, i, lua_lock, lua_unlock, setobj2s, CallInfo::top, and lua_State::top.
Referenced by auxresume(), db_gethook(), db_getinfo(), db_getlocal(), db_sethook(), db_setlocal(), luaB_cocreate(), and treatstackoption().
Definition at line 200 of file lapi.cpp.
References api_checkvalidindex, lua_State::ci, clCvalue, CallInfo::func, index2addr(), LUA_REGISTRYINDEX, luaC_barrier, and setobj.
Referenced by lua_copy(), and lua_replace().