| 928 | } |
| 929 | |
| 930 | static 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 | |
| 944 | static int dfhack_cowrap (lua_State *L) { |
| 945 | luaL_checktype(L, 1, LUA_TFUNCTION); |
nothing calls this directly
no test coverage detected