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

Function dfhack_coauxwrap

library/LuaTools.cpp:930–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928}
929
930static int dfhack_coauxwrap (lua_State *L) {
931 lua_State *co = lua_tothread(L, lua_upvalueindex(1));
932 int r = resume_helper(L, co, lua_gettop(L), LUA_MULTRET);
933 if (Lua::IsSuccess(r))
934 return lua_gettop(L);
935 else
936 {
937 if (lua_checkstack(L, LUA_MINSTACK))
938 convert_to_exception(L, 1);
939
940 return lua_error(L);
941 }
942}
943
944static int dfhack_cowrap (lua_State *L) {
945 luaL_checktype(L, 1, LUA_TFUNCTION);

Callers

nothing calls this directly

Calls 7

lua_tothreadFunction · 0.85
resume_helperFunction · 0.85
lua_gettopFunction · 0.85
IsSuccessFunction · 0.85
lua_checkstackFunction · 0.85
convert_to_exceptionFunction · 0.85
lua_errorFunction · 0.85

Tested by

no test coverage detected