MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luajit_exception_handler

Function luajit_exception_handler

extlibs/sol3/include/sol/sol.hpp:14573–14588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14571 }
14572
14573 inline void luajit_exception_handler(lua_State* L, int (*handler)(lua_State*, lua_CFunction) = detail::c_trampoline) {
14574#if defined(SOL_LUAJIT) && (!defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) || !(SOL_EXCEPTIONS_SAFE_PROPAGATION))
14575 if (L == nullptr) {
14576 return;
14577 }
14578#if defined(SOL_SAFE_STACK_CHECK) && SOL_SAFE_STACK_CHECK
14579 luaL_checkstack(L, 1, detail::not_enough_stack_space_generic);
14580#endif // make sure stack doesn't overflow
14581 lua_pushlightuserdata(L, (void*)handler);
14582 auto pn = pop_n(L, 1);
14583 luaJIT_setmode(L, -1, LUAJIT_MODE_WRAPCFUNC | LUAJIT_MODE_ON);
14584#else
14585 (void)L;
14586 (void)handler;
14587#endif
14588 }
14589
14590 inline void luajit_exception_off(lua_State* L) {
14591#if defined(SOL_LUAJIT)

Callers 1

set_default_stateFunction · 0.85

Calls 3

lua_pushlightuserdataFunction · 0.85
pop_nFunction · 0.85
luaL_checkstackFunction · 0.70

Tested by

no test coverage detected