MCPcopy Create free account
hub / github.com/DFHack/dfhack / Interrupt

Method Interrupt

library/LuaTools.cpp:521–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521bool DFHack::Lua::Interrupt (bool force)
522{
523 lua_State *L = DFHack::Core::getInstance().getLuaState(true);
524 if (L->hook != interrupt_hook && !force)
525 return false;
526 if (force)
527 lua_sethook(L, interrupt_hook, LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT, 1);
528 lstop = 1;
529 return true;
530}
531
532static int DFHACK_EXCEPTION_META_TOKEN = 0;
533

Callers

nothing calls this directly

Calls 1

lua_sethookFunction · 0.85

Tested by

no test coverage detected