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

Function dfhack_saferesume

library/LuaTools.cpp:918–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916}
917
918static int dfhack_saferesume (lua_State *L) {
919 lua_State *co = lua_tothread(L, 1);
920 luaL_argcheck(L, !!co, 1, "coroutine expected");
921 int r = resume_helper(L, co, lua_gettop(L) - 1, LUA_MULTRET);
922 bool ok = Lua::IsSuccess(r);
923 lua_pushboolean(L, ok);
924 lua_insert(L, 2);
925 if (!ok)
926 report_error(L);
927 return lua_gettop(L) - 1;
928}
929
930static int dfhack_coauxwrap (lua_State *L) {
931 lua_State *co = lua_tothread(L, lua_upvalueindex(1));

Callers

nothing calls this directly

Calls 6

lua_tothreadFunction · 0.85
resume_helperFunction · 0.85
lua_gettopFunction · 0.85
IsSuccessFunction · 0.85
lua_pushbooleanFunction · 0.85
report_errorFunction · 0.85

Tested by

no test coverage detected