| 916 | } |
| 917 | |
| 918 | static 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 | |
| 930 | static int dfhack_coauxwrap (lua_State *L) { |
| 931 | lua_State *co = lua_tothread(L, lua_upvalueindex(1)); |
nothing calls this directly
no test coverage detected