#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
Go to the source code of this file.
Classes | |
struct | LoadF |
struct | LoadS |
Macros | |
#define | lauxlib_c |
#define | LUA_LIB |
#define | LEVELS1 12 /* size of the first part of the stack */ |
#define | LEVELS2 10 /* size of the second part of the stack */ |
#define | inspectstat(stat, what) /* no op */ |
#define | buffonstack(B) ((B)->b != (B)->initb) |
#define | freelist 0 |
Typedefs | |
typedef struct LoadF | LoadF |
typedef struct LoadS | LoadS |
#define buffonstack | ( | B | ) | ((B)->b != (B)->initb) |
Definition at line 433 of file lauxlib.cpp.
Referenced by luaL_addvalue(), luaL_prepbuffsize(), and luaL_pushresult().
#define freelist 0 |
Definition at line 521 of file lauxlib.cpp.
Referenced by luaL_ref(), and luaL_unref().
#define inspectstat | ( | stat, | |
what | |||
) | /* no op */ |
Definition at line 242 of file lauxlib.cpp.
Referenced by luaL_execresult().
#define lauxlib_c |
Definition at line 18 of file lauxlib.cpp.
Definition at line 33 of file lauxlib.cpp.
Referenced by luaL_traceback().
#define LEVELS2 10 /* size of the second part of the stack */ |
Definition at line 34 of file lauxlib.cpp.
Referenced by luaL_traceback().
#define LUA_LIB |
Definition at line 19 of file lauxlib.cpp.
Definition at line 100 of file lauxlib.cpp.
References lua_getstack().
Referenced by luaL_traceback().
Definition at line 589 of file lauxlib.cpp.
References LUA_ERRFILE, lua_pushfstring(), lua_remove(), and lua_tostring.
Referenced by luaL_loadfilex().
Definition at line 42 of file lauxlib.cpp.
References lua_concat(), lua_insert(), lua_istable, lua_next(), lua_pop, lua_pushliteral, lua_pushnil(), lua_rawequal(), lua_remove(), LUA_TSTRING, and lua_type().
Referenced by pushglobalfuncname().
Definition at line 571 of file lauxlib.cpp.
References LoadF::buff, LoadF::f, and LoadF::n.
Referenced by luaL_loadfilex().
Definition at line 674 of file lauxlib.cpp.
References LoadS::s, and LoadS::size.
Referenced by luaL_loadbufferx().
Definition at line 921 of file lauxlib.cpp.
Referenced by luaL_newstate().
Definition at line 799 of file lauxlib.cpp.
References luaL_Reg::name.
Referenced by luaL_openlib().
LUALIB_API void luaL_addlstring | ( | luaL_Buffer * | B, |
const char * | s, | ||
size_t | l | ||
) |
Definition at line 461 of file lauxlib.cpp.
References luaL_addsize, and luaL_prepbuffsize().
Referenced by add_s(), luaL_addstring(), luaL_addvalue(), luaL_gsub(), os_date(), str_gsub(), tconcat(), and writer().
LUALIB_API void luaL_addstring | ( | luaL_Buffer * | B, |
const char * | s | ||
) |
Definition at line 468 of file lauxlib.cpp.
References luaL_addlstring().
Referenced by addquoted(), and luaL_gsub().
LUALIB_API void luaL_addvalue | ( | luaL_Buffer * | B | ) |
Definition at line 487 of file lauxlib.cpp.
References buffonstack, luaL_Buffer::L, lua_insert(), lua_remove(), lua_tolstring(), and luaL_addlstring().
Referenced by add_s(), add_value(), addfield(), findloader(), searchpath(), and str_format().
LUALIB_API int luaL_argerror | ( | lua_State * | L, |
int | narg, | ||
const char * | extramsg | ||
) |
Definition at line 152 of file lauxlib.cpp.
References lua_getinfo(), lua_getstack(), LUA_QS, lua_tostring, luaL_error(), lua_Debug::name, lua_Debug::namewhat, and pushglobalfuncname().
Referenced by ai::cfun_ai_get_suitable_keep(), checkoption(), db_getinfo(), db_getlocal(), db_setlocal(), db_setuservalue(), find_widget(), g_read(), impl_context_accessor(), game_lua_kernel::impl_game_config_set(), impl_race_get(), impl_side_set(), impl_unit_attack_get(), impl_unit_attack_set(), impl_unit_attacks_get(), impl_unit_attacks_len(), impl_unit_get(), impl_unit_set(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_type_get(), impl_unit_variables_get(), impl_unit_variables_set(), lua_gui2::intf_add_dialog_tree_node(), intf_add_known_unit(), intf_add_modification(), intf_compare_versions(), game_lua_kernel::intf_erase_unit(), game_lua_kernel::intf_extract_unit(), game_lua_kernel::intf_find_cost_map(), intf_find_path(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), lua_map_location::intf_get_adjacent_tiles(), lua_gui2::intf_get_dialog_value(), lua_map_location::intf_get_direction(), lua_map_location::intf_get_in_basis_N_NE(), game_lua_kernel::intf_get_side_variable(), game_lua_kernel::intf_get_starting_location(), game_lua_kernel::intf_get_time_of_day(), game_lua_kernel::intf_get_unit(), game_lua_kernel::intf_highlight_hex(), game_lua_kernel::intf_match_unit(), intf_name_generator(), lua_map_location::intf_parse_direction(), game_lua_kernel::intf_put_recall_unit(), game_lua_kernel::intf_put_unit(), intf_random(), game_lua_kernel::intf_random(), lua_fileops::intf_read_file(), lua_gui2::intf_remove_dialog_item(), lua_kernel_base::intf_require(), game_lua_kernel::intf_select_unit(), 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(), game_lua_kernel::intf_set_side_variable(), game_lua_kernel::intf_set_time_of_day(), game_lua_kernel::intf_set_variable(), game_lua_kernel::intf_simulate_combat(), intf_synchronize_choice(), intf_synchronize_choices(), intf_transform_unit(), lua_map_location::intf_vector_negation(), lua_map_location::intf_write_direction(), load_fake_units(), lua_fileops::load_file(), lua_check_impl::lua_check(), luaL_checkany(), luaL_checkoption(), game_lua_kernel::run_wml_conditional(), lua_gui2::show_message_dialog(), str_format(), and typeerror().
LUALIB_API void luaL_buffinit | ( | lua_State * | L, |
luaL_Buffer * | B | ||
) |
Definition at line 498 of file lauxlib.cpp.
References luaL_Buffer::b, luaL_Buffer::initb, luaL_Buffer::L, LUAL_BUFFERSIZE, luaL_Buffer::n, and luaL_Buffer::size.
Referenced by findloader(), lua_fileops::intf_read_file(), luaL_buffinitsize(), luaL_gsub(), os_date(), read_all(), read_chars(), read_line(), searchpath(), str_dump(), str_format(), str_gsub(), and tconcat().
LUALIB_API char* luaL_buffinitsize | ( | lua_State * | L, |
luaL_Buffer * | B, | ||
size_t | sz | ||
) |
Definition at line 506 of file lauxlib.cpp.
References luaL_buffinit(), and luaL_prepbuffsize().
Referenced by str_char(), str_lower(), str_rep(), str_reverse(), and str_upper().
LUALIB_API int luaL_callmeta | ( | lua_State * | L, |
int | obj, | ||
const char * | event | ||
) |
Definition at line 717 of file lauxlib.cpp.
References lua_absindex(), lua_call, lua_pushvalue(), and luaL_getmetafield().
Referenced by luaL_tolstring(), and traceback().
LUALIB_API void luaL_checkany | ( | lua_State * | L, |
int | narg | ||
) |
Definition at line 353 of file lauxlib.cpp.
References LUA_TNONE, lua_type(), and luaL_argerror().
Referenced by db_getmetatable(), db_setlocal(), db_setupvalue(), io_type(), luaB_getmetatable(), luaB_pcall(), luaB_rawequal(), luaB_rawget(), luaB_rawset(), luaB_tonumber(), luaB_tostring(), and luaB_type().
LUALIB_API lua_Integer luaL_checkinteger | ( | lua_State * | L, |
int | narg | ||
) |
Definition at line 391 of file lauxlib.cpp.
References d, LUA_TNUMBER, lua_tointegerx(), and tag_error().
Referenced by impl_unit_attacks_get(), lua_common::impl_vconfig_ipairs_iter(), lua_gui2::intf_add_dialog_tree_node(), game_lua_kernel::intf_delay(), 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_get_side_variable(), game_lua_kernel::intf_match_side(), game_lua_kernel::intf_put_unit(), lua_gui2::intf_remove_dialog_item(), lua_gui2::intf_set_dialog_canvas(), lua_gui2::intf_set_dialog_value(), game_lua_kernel::intf_set_side_variable(), lua_check_impl::lua_check(), lua_round(), luaL_optinteger(), and str_sub().
LUALIB_API const char* luaL_checklstring | ( | lua_State * | L, |
int | narg, | ||
size_t * | len | ||
) |
Definition at line 359 of file lauxlib.cpp.
References lua_tolstring(), LUA_TSTRING, and tag_error().
Referenced by addquoted(), g_write(), lua_common::intf_textdomain(), luaB_tonumber(), luaL_optlstring(), str_byte(), str_find_aux(), str_format(), str_gsub(), str_len(), str_lower(), str_rep(), str_reverse(), str_sub(), and str_upper().
LUALIB_API lua_Number luaL_checknumber | ( | lua_State * | L, |
int | narg | ||
) |
Definition at line 377 of file lauxlib.cpp.
References d, LUA_TNUMBER, lua_tonumberx(), and tag_error().
Referenced by impl_side_set(), game_lua_kernel::intf_find_path(), lua_check_impl::lua_check(), luaL_optnumber(), 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(), os_date(), os_difftime(), and str_format().
LUALIB_API int luaL_checkoption | ( | lua_State * | L, |
int | narg, | ||
const char * | def, | ||
const char *const | lst[] | ||
) |
Definition at line 322 of file lauxlib.cpp.
References i, lua_pushfstring(), LUA_QS, luaL_argerror(), luaL_checkstring, and luaL_optstring.
Referenced by f_seek(), f_setvbuf(), luaB_collectgarbage(), and os_setlocale().
LUALIB_API void luaL_checkstack | ( | lua_State * | L, |
int | space, | ||
const char * | msg | ||
) |
Definition at line 335 of file lauxlib.cpp.
References lua_checkstack(), LUA_MINSTACK, and luaL_error().
Referenced by dotty(), g_read(), generic_reader(), getargs(), luaL_setfuncs(), push_captures(), lua_cpp::set_functions(), sort(), and str_byte().
LUALIB_API void luaL_checktype | ( | lua_State * | L, |
int | narg, | ||
int | t | ||
) |
Definition at line 347 of file lauxlib.cpp.
References lua_type(), and tag_error().
Referenced by auxupvalue(), checkupval(), db_sethook(), db_setuservalue(), ipairsaux(), ll_seeall(), luaB_cocreate(), luaB_load(), luaB_next(), luaB_rawget(), luaB_rawset(), luaB_setmetatable(), maxn(), os_time(), pairsmeta(), lua_gui2::show_message_dialog(), sort(), str_dump(), tconcat(), and unpack().
LUALIB_API void* luaL_checkudata | ( | lua_State * | L, |
int | ud, | ||
const char * | tname | ||
) |
Definition at line 307 of file lauxlib.cpp.
References luaL_testudata(), and typeerror().
Referenced by lua_rng::impl_rng_draw(), lua_rng::impl_rng_seed(), impl_side_get(), impl_side_set(), lua_common::impl_vconfig_ipairs_iter(), lua_common::impl_vconfig_pairs_iter(), lua_cpp::intf_closure_dispatcher(), lua_cpp::intf_dispatcher(), and lua_cpp::intf_tostring().
LUALIB_API lua_Unsigned luaL_checkunsigned | ( | lua_State * | L, |
int | narg | ||
) |
Definition at line 400 of file lauxlib.cpp.
References d, LUA_TNUMBER, lua_tounsignedx(), and tag_error().
Referenced by andaux(), b_arshift(), b_extract(), b_lshift(), b_not(), b_or(), b_replace(), b_rot(), b_rshift(), b_xor(), luaL_optunsigned(), and math_randomseed().
LUALIB_API void luaL_checkversion_ | ( | lua_State * | L, |
lua_Number | ver | ||
) |
Definition at line 946 of file lauxlib.cpp.
References lua_pop, lua_pushnumber(), lua_tointeger, lua_tounsigned, lua_version(), and luaL_error().
LUALIB_API int luaL_error | ( | lua_State * | L, |
const char * | fmt, | ||
... | |||
) |
Definition at line 198 of file lauxlib.cpp.
References lua_concat(), lua_error(), lua_pushvfstring(), and luaL_where().
Referenced by add_s(), add_value(), addfield(), auxsort(), capture_to_close(), check_capture(), checkload(), classend(), fieldargs(), find_widget(), findfile(), findloader(), generic_reader(), getfield(), getiofile(), impl_context_accessor(), impl_context_backend(), game_lua_kernel::intf_erase_unit(), game_lua_kernel::intf_extract_unit(), lua_map_location::intf_get_direction(), game_lua_kernel::intf_put_recall_unit(), game_lua_kernel::intf_put_unit(), lua_fileops::intf_read_file(), io_readline(), lstop(), luaB_assert(), luaB_print(), luaB_setmetatable(), luaL_argerror(), luaL_checkstack(), luaL_checkversion_(), luaL_len(), luaL_prepbuffsize(), luaL_pushmodule(), match(), matchbalance(), math_random(), opencheck(), os_tmpname(), push_onecapture(), scanformat(), set_env(), start_capture(), str_byte(), str_dump(), str_format(), str_rep(), tinsert(), tofile(), and unpack().
LUALIB_API int luaL_execresult | ( | lua_State * | L, |
int | stat | ||
) |
Definition at line 249 of file lauxlib.cpp.
References inspectstat, lua_pushboolean(), lua_pushinteger(), lua_pushnil(), lua_pushstring(), luaL_fileresult(), and what().
Referenced by io_pclose(), and os_execute().
LUALIB_API int luaL_fileresult | ( | lua_State * | L, |
int | stat, | ||
const char * | fname | ||
) |
Definition at line 209 of file lauxlib.cpp.
References lua_pushboolean(), lua_pushfstring(), lua_pushinteger(), lua_pushnil(), and lua_pushstring().
Referenced by f_flush(), f_seek(), f_setvbuf(), g_read(), g_write(), io_fclose(), io_flush(), io_open(), io_popen(), io_tmpfile(), luaL_execresult(), os_remove(), and os_rename().
Definition at line 769 of file lauxlib.cpp.
References e, lua_createtable(), lua_isnil, lua_istable, lua_pop, lua_pushlstring(), lua_pushvalue(), lua_rawget(), lua_remove(), and lua_settable().
Referenced by luaL_pushmodule().
LUALIB_API int luaL_getmetafield | ( | lua_State * | L, |
int | obj, | ||
const char * | event | ||
) |
Definition at line 701 of file lauxlib.cpp.
References lua_getmetatable(), lua_isnil, lua_pop, lua_pushstring(), lua_rawget(), and lua_remove().
Referenced by game_lua_kernel::apply_effect(), luaB_getmetatable(), luaB_setmetatable(), luaL_callmeta(), and pairsmeta().
LUALIB_API int luaL_getsubtable | ( | lua_State * | L, |
int | idx, | ||
const char * | fname | ||
) |
Definition at line 868 of file lauxlib.cpp.
References lua_absindex(), lua_getfield(), lua_istable, lua_newtable, lua_pop, lua_pushvalue(), and lua_setfield().
Referenced by luaL_openlibs(), luaL_requiref(), and luaopen_package().
LUALIB_API const char* luaL_gsub | ( | lua_State * | L, |
const char * | s, | ||
const char * | p, | ||
const char * | r | ||
) |
Definition at line 904 of file lauxlib.cpp.
References lua_tostring, luaL_addlstring(), luaL_addstring(), luaL_buffinit(), and luaL_pushresult().
Referenced by loadfunc(), searchpath(), and setpath().
LUALIB_API int luaL_len | ( | lua_State * | L, |
int | idx | ||
) |
Definition at line 727 of file lauxlib.cpp.
References int(), lua_len(), lua_pop, lua_tointegerx(), and luaL_error().
Referenced by gctm(), ll_addtoclib(), tconcat(), and unpack().
LUALIB_API int luaL_loadbufferx | ( | lua_State * | L, |
const char * | buff, | ||
size_t | size, | ||
const char * | name, | ||
const char * | mode | ||
) |
Definition at line 684 of file lauxlib.cpp.
References getS(), lua_load(), LoadS::s, and LoadS::size.
Referenced by luaB_load().
LUALIB_API int luaL_loadfilex | ( | lua_State * | L, |
const char * | filename, | ||
const char * | mode | ||
) |
Definition at line 632 of file lauxlib.cpp.
References LoadF::buff, c, errfile(), LoadF::f, getF(), lua_gettop(), lua_load(), lua_pushfstring(), lua_pushliteral, lua_remove(), lua_settop(), LUA_SIGNATURE, lua_tostring, LoadF::n, and skipcomment().
Referenced by luaB_loadfile().
LUALIB_API int luaL_loadstring | ( | lua_State * | L, |
const char * | s | ||
) |
Definition at line 693 of file lauxlib.cpp.
References luaL_loadbuffer.
Referenced by ai::lua_ai_context::create(), ai::lua_ai_action_handler::create(), application_lua_kernel::load_script_from_string(), and lua_kernel_base::load_string().
LUALIB_API int luaL_newmetatable | ( | lua_State * | L, |
const char * | tname | ||
) |
Definition at line 274 of file lauxlib.cpp.
References lua_isnil, lua_newtable, lua_pop, lua_pushvalue(), LUA_REGISTRYINDEX, lua_setfield(), and luaL_getmetatable.
Referenced by createmeta(), lua_common::impl_vconfig_ipairs(), lua_common::impl_vconfig_pairs(), lua_rng::load_tables(), lua_kernel_base::lua_kernel_base(), lua_common::register_gettext_metatable(), lua_cpp::register_metatable(), lua_unit_type::register_metatable(), lua_race::register_metatable(), lua_team::register_metatable(), lua_common::register_tstring_metatable(), and lua_common::register_vconfig_metatable().
LUALIB_API lua_State* luaL_newstate | ( | void | ) |
Definition at line 939 of file lauxlib.cpp.
References l_alloc(), lua_atpanic(), lua_newstate(), and panic().
Referenced by main().
LUALIB_API void luaL_openlib | ( | lua_State * | L, |
const char * | libname, | ||
const luaL_Reg * | l, | ||
int | nup | ||
) |
Definition at line 829 of file lauxlib.cpp.
References libsize(), lua_insert(), lua_pop, luaL_checkversion, luaL_pushmodule(), and luaL_setfuncs().
LUALIB_API lua_Integer luaL_optinteger | ( | lua_State * | L, |
int | narg, | ||
lua_Integer | def | ||
) |
Definition at line 409 of file lauxlib.cpp.
References luaL_checkinteger(), and luaL_opt.
Referenced by f_setvbuf(), intf_name_generator(), str_byte(), str_find_aux(), str_gsub(), and str_sub().
LUALIB_API const char* luaL_optlstring | ( | lua_State * | L, |
int | narg, | ||
const char * | def, | ||
size_t * | len | ||
) |
Definition at line 366 of file lauxlib.cpp.
References lua_isnoneornil, and luaL_checklstring().
LUALIB_API lua_Number luaL_optnumber | ( | lua_State * | L, |
int | narg, | ||
lua_Number | def | ||
) |
Definition at line 386 of file lauxlib.cpp.
References luaL_checknumber(), and luaL_opt.
Referenced by f_seek(), and os_difftime().
LUALIB_API lua_Unsigned luaL_optunsigned | ( | lua_State * | L, |
int | narg, | ||
lua_Unsigned | def | ||
) |
Definition at line 415 of file lauxlib.cpp.
References luaL_checkunsigned(), and luaL_opt.
LUALIB_API char* luaL_prepbuffsize | ( | luaL_Buffer * | B, |
size_t | sz | ||
) |
Definition at line 439 of file lauxlib.cpp.
References luaL_Buffer::b, buffonstack, luaL_Buffer::L, lua_newuserdata(), lua_remove(), luaL_error(), luaL_Buffer::n, and luaL_Buffer::size.
Referenced by lua_fileops::intf_read_file(), luaL_addlstring(), luaL_buffinitsize(), read_all(), read_chars(), and str_format().
LUALIB_API void luaL_pushmodule | ( | lua_State * | L, |
const char * | modname, | ||
int | sizehint | ||
) |
Definition at line 812 of file lauxlib.cpp.
References lua_getfield(), lua_istable, lua_pop, lua_pushglobaltable, lua_pushvalue(), LUA_QS, LUA_REGISTRYINDEX, lua_remove(), lua_setfield(), luaL_error(), and luaL_findtable().
Referenced by ll_module(), and luaL_openlib().
LUALIB_API void luaL_pushresult | ( | luaL_Buffer * | B | ) |
Definition at line 473 of file lauxlib.cpp.
References luaL_Buffer::b, buffonstack, luaL_Buffer::L, lua_pushlstring(), lua_remove(), and luaL_Buffer::n.
Referenced by findloader(), lua_fileops::intf_read_file(), luaL_gsub(), luaL_pushresultsize(), os_date(), read_all(), read_chars(), read_line(), searchpath(), str_dump(), str_format(), str_gsub(), and tconcat().
LUALIB_API void luaL_pushresultsize | ( | luaL_Buffer * | B, |
size_t | sz | ||
) |
Definition at line 481 of file lauxlib.cpp.
References luaL_addsize, and luaL_pushresult().
Referenced by str_char(), str_lower(), str_rep(), str_reverse(), and str_upper().
LUALIB_API int luaL_ref | ( | lua_State * | L, |
int | t | ||
) |
Definition at line 524 of file lauxlib.cpp.
References freelist, int(), lua_absindex(), lua_isnil, lua_pop, lua_rawgeti(), lua_rawlen(), lua_rawseti(), LUA_REFNIL, and lua_tointeger.
Referenced by ai::lua_object< T >::to_type(), and ai::unit_advancements_aspect::unit_advancements_aspect().
LUALIB_API void luaL_requiref | ( | lua_State * | L, |
const char * | modname, | ||
lua_CFunction | openf, | ||
int | glb | ||
) |
Definition at line 888 of file lauxlib.cpp.
References lua_call, lua_pop, lua_pushcfunction, lua_pushstring(), lua_pushvalue(), LUA_REGISTRYINDEX, lua_setfield(), lua_setglobal(), and luaL_getsubtable().
Referenced by lua_kernel_base::lua_kernel_base(), and luaL_openlibs().
LUALIB_API void luaL_setfuncs | ( | lua_State * | L, |
const luaL_Reg * | l, | ||
int | nup | ||
) |
Definition at line 850 of file lauxlib.cpp.
References luaL_Reg::func, i, lua_pop, lua_pushcclosure(), lua_pushvalue(), lua_setfield(), luaL_checkstack(), luaL_checkversion, and luaL_Reg::name.
Referenced by createmeta(), game_lua_kernel::game_lua_kernel(), lua_rng::load_tables(), lua_kernel_base::lua_kernel_base(), luaL_openlib(), luaopen_base(), luaopen_package(), mapgen_lua_kernel::mapgen_lua_kernel(), lua_common::register_gettext_metatable(), lua_race::register_metatable(), lua_team::register_metatable(), lua_common::register_tstring_metatable(), and lua_common::register_vconfig_metatable().
LUALIB_API void luaL_setmetatable | ( | lua_State * | L, |
const char * | tname | ||
) |
Definition at line 286 of file lauxlib.cpp.
References lua_setmetatable(), and luaL_getmetatable.
Referenced by lua_rng::impl_rng_create(), lua_common::impl_tstring_concat(), lua_common::intf_textdomain(), luaW_pushrace(), luaW_pushteam(), luaW_pushtstring(), luaW_pushunittype(), luaW_pushvconfig(), newprefile(), and lua_cpp::push_function().
LUALIB_API void* luaL_testudata | ( | lua_State * | L, |
int | ud, | ||
const char * | tname | ||
) |
Definition at line 292 of file lauxlib.cpp.
References lua_getmetatable(), lua_pop, lua_rawequal(), lua_touserdata(), and luaL_getmetatable.
Referenced by lua_rng::impl_rng_destroy(), impl_unit_attacks_get(), lua_cpp::intf_cleanup(), io_type(), luaL_checkudata(), luaW_checkvariable(), luaW_toconfig(), luaW_toscalar(), luaW_totstring(), luaW_tovconfig(), and lua_common::tstring_concat_aux().
LUALIB_API const char* luaL_tolstring | ( | lua_State * | L, |
int | idx, | ||
size_t * | len | ||
) |
Definition at line 739 of file lauxlib.cpp.
References lua_pushfstring(), lua_pushliteral, lua_pushstring(), lua_pushvalue(), LUA_TBOOLEAN, LUA_TNIL, LUA_TNUMBER, lua_toboolean(), lua_tolstring(), lua_topointer(), LUA_TSTRING, lua_type(), luaL_callmeta(), and luaL_typename.
Referenced by luaB_tostring(), and str_format().
LUALIB_API void luaL_traceback | ( | lua_State * | L, |
lua_State * | L1, | ||
const char * | msg, | ||
int | level | ||
) |
Definition at line 115 of file lauxlib.cpp.
References countlevels(), lua_Debug::currentline, lua_Debug::istailcall, LEVELS1, LEVELS2, lua_concat(), lua_getinfo(), lua_getstack(), lua_gettop(), lua_pushfstring(), lua_pushliteral, pushfuncname(), and lua_Debug::short_src.
Referenced by db_traceback(), and traceback().
LUALIB_API int luaL_typerror | ( | lua_State * | L, |
int | narg, | ||
const char * | tname | ||
) |
Definition at line 176 of file lauxlib.cpp.
References typeerror().
Referenced by ai::cfun_ai_get_suitable_keep(), find_widget(), 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(), lua_formula_bridge::intf_compile_formula(), game_lua_kernel::intf_extract_unit(), game_lua_kernel::intf_match_unit(), lua_gui2::intf_set_dialog_visible(), luaW_checkconfig(), luaW_checklocation(), luaW_checktstring(), luaW_checkunit(), luaW_checkunit_ptr(), luaW_checkvariable(), luaW_checkvconfig(), and lua_common::tstring_concat_aux().
LUALIB_API void luaL_unref | ( | lua_State * | L, |
int | t, | ||
int | ref | ||
) |
Definition at line 545 of file lauxlib.cpp.
References freelist, lua_absindex(), lua_pushinteger(), lua_rawgeti(), and lua_rawseti().
Referenced by ai::aspect_attacks_lua::recalculate(), and ai::unit_advancements_aspect::~unit_advancements_aspect().
LUALIB_API void luaL_where | ( | lua_State * | L, |
int | level | ||
) |
Definition at line 185 of file lauxlib.cpp.
References lua_Debug::currentline, lua_getinfo(), lua_getstack(), lua_pushfstring(), lua_pushliteral, and lua_Debug::short_src.
Referenced by luaB_auxwrap(), luaB_error(), and luaL_error().
Definition at line 932 of file lauxlib.cpp.
References lua_tostring, and luai_writestringerror.
Referenced by luaD_throw(), and luaL_newstate().
Definition at line 82 of file lauxlib.cpp.
References lua_Debug::linedefined, lua_pushfstring(), lua_pushliteral, LUA_QS, lua_remove(), lua_tostring, lua_Debug::name, lua_Debug::namewhat, pushglobalfuncname(), lua_Debug::short_src, and lua_Debug::what.
Referenced by luaL_traceback().
Definition at line 66 of file lauxlib.cpp.
References findfield(), lua_copy(), lua_getinfo(), lua_gettop(), lua_pop, lua_pushglobaltable, and lua_settop().
Referenced by luaL_argerror(), and pushfuncname().
Definition at line 598 of file lauxlib.cpp.
References LoadF::buff, c, LoadF::f, and LoadF::n.
Referenced by skipcomment().
Definition at line 619 of file lauxlib.cpp.
References LoadF::f, and skipBOM().
Referenced by luaL_loadfilex().
Definition at line 180 of file lauxlib.cpp.
References lua_typename(), and typeerror().
Referenced by luaL_checkinteger(), luaL_checklstring(), luaL_checknumber(), luaL_checktype(), and luaL_checkunsigned().
Definition at line 170 of file lauxlib.cpp.
References lua_pushfstring(), luaL_argerror(), luaL_typename, and game_logic::msg().
Referenced by luaL_checkudata(), luaL_typerror(), and tag_error().