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

Function set_default_handler

extlibs/sol3/include/sol/sol.hpp:18438–18453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18436
18437 template <typename T>
18438 static void set_default_handler(lua_State* L, const T& ref) {
18439 if (L == nullptr) {
18440 return;
18441 }
18442 if (!ref.valid()) {
18443#if defined(SOL_SAFE_STACK_CHECK) && SOL_SAFE_STACK_CHECK
18444 luaL_checkstack(L, 1, detail::not_enough_stack_space_generic);
18445#endif // make sure stack doesn't overflow
18446 lua_pushnil(L);
18447 lua_setglobal(L, default_handler_name());
18448 }
18449 else {
18450 ref.push(L);
18451 lua_setglobal(L, default_handler_name());
18452 }
18453 }
18454 } // namespace detail
18455} // namespace sol
18456

Callers 1

set_default_stateFunction · 0.85

Calls 6

lua_pushnilFunction · 0.85
lua_setglobalFunction · 0.85
luaL_checkstackFunction · 0.70
validMethod · 0.45
pushMethod · 0.45
lua_stateMethod · 0.45

Tested by

no test coverage detected