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

Method SafeResume

library/LuaTools.cpp:974–989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

972}
973
974int DFHack::Lua::SafeResume(color_ostream &out, lua_State *from, lua_State *thread, int nargs, int nres, bool perr)
975{
976 AssertCoreSuspend(from);
977
978 color_ostream *cur_out = Lua::GetOutput(from);
979 set_dfhack_output(from, &out);
980
981 int rv = resume_helper(from, thread, nargs, nres);
982
983 if (!Lua::IsSuccess(rv) && perr)
984 report_error(from, &out, true);
985
986 set_dfhack_output(from, cur_out);
987
988 return rv;
989}
990
991int DFHack::Lua::SafeResume(color_ostream &out, lua_State *from, int nargs, int nres, bool perr)
992{

Callers

nothing calls this directly

Calls 7

AssertCoreSuspendFunction · 0.85
set_dfhack_outputFunction · 0.85
resume_helperFunction · 0.85
IsSuccessFunction · 0.85
report_errorFunction · 0.85
lua_gettopFunction · 0.85
lua_tothreadFunction · 0.85

Tested by

no test coverage detected