59#if defined(__aarch64__) && USE_LUAJIT
62#define INDIRECT_SCRIPTAPI_RIDX 1
64#define INDIRECT_SCRIPTAPI_RIDX 0
68#define PUSH_ERROR_HANDLER(L) \
69 (lua_rawgeti((L), LUA_REGISTRYINDEX, CUSTOM_RIDX_ERROR_HANDLER), lua_gettop((L)))
71#define PCALL_RESL(L, RES) { \
72 int result_ = (RES); \
74 script_error((L), result_, NULL, __FUNCTION__); \
115void script_error(lua_State *L,
int pcall_result,
const char *mod,
const char *fxn);
117bool script_log_unique(lua_State *L, std::string_view message, std::ostream &log_to,
118 int stack_depth = 1);
143 int stack_depth = 1,
bool once =
false);
DeprecatedHandlingMode
Definition c_internal.h:120
@ Log
Definition c_internal.h:122
@ Ignore
Definition c_internal.h:121
@ Error
Definition c_internal.h:123
std::string script_get_backtrace(lua_State *L)
Definition c_internal.cpp:13
DeprecatedHandlingMode get_deprecated_handling_mode()
Reads deprecated_lua_api_handling in settings, returns cached value.
Definition c_internal.cpp:146
RunCallbacksMode
Definition c_internal.h:83
@ RUN_CALLBACKS_MODE_OR
Definition c_internal.h:100
@ RUN_CALLBACKS_MODE_LAST
Definition c_internal.h:89
@ RUN_CALLBACKS_MODE_AND_SC
Definition c_internal.h:96
@ RUN_CALLBACKS_MODE_FIRST
Definition c_internal.h:86
@ RUN_CALLBACKS_MODE_OR_SC
Definition c_internal.h:103
@ RUN_CALLBACKS_MODE_AND
Definition c_internal.h:93
void log_deprecated(lua_State *L, std::string_view message, int stack_depth=1, bool once=false)
Handles a deprecation warning based on user settings.
Definition c_internal.cpp:165
int script_exception_wrapper(lua_State *L, lua_CFunction f)
Definition c_internal.cpp:23
void script_error(lua_State *L, int pcall_result, const char *mod, const char *fxn)
Definition c_internal.cpp:65
int script_error_handler(lua_State *L)
Definition c_internal.cpp:36
bool script_log_unique(lua_State *L, std::string_view message, std::ostream &log_to, int stack_depth=1)
Definition c_internal.cpp:128
@ CUSTOM_RIDX_ERROR_HANDLER
Definition c_internal.h:44
@ CUSTOM_RIDX_HTTP_API_LUA
Definition c_internal.h:45
@ CUSTOM_RIDX_PUSH_NODE
Definition c_internal.h:53
@ CUSTOM_RIDX_READ_VECTOR
Definition c_internal.h:50
@ CUSTOM_RIDX_READ_NODE
Definition c_internal.h:52
@ CUSTOM_RIDX_METATABLE_MAP
Definition c_internal.h:46
@ CUSTOM_RIDX_PUSH_VECTOR
Definition c_internal.h:51
@ CUSTOM_RIDX_CURRENT_MOD_NAME
Definition c_internal.h:43
@ CUSTOM_RIDX_PUSH_MOVERESULT1
Definition c_internal.h:54
@ CUSTOM_RIDX_BEFORE_
Definition c_internal.h:38
@ CUSTOM_RIDX_SCRIPTAPI
Definition c_internal.h:41
@ CUSTOM_RIDX_GLOBALS_BACKUP
Definition c_internal.h:42
void call_string_dump(lua_State *L, int idx)
Definition c_internal.cpp:185
#define idx(x, y)
Definition noise.cpp:490