| 308 | |
| 309 | |
| 310 | TStatus luaE_resetthread (lua_State *L, TStatus status) { |
| 311 | resetCI(L); |
| 312 | if (status == LUA_YIELD) |
| 313 | status = LUA_OK; |
| 314 | status = luaD_closeprotected(L, 1, status); |
| 315 | if (status != LUA_OK) /* errors? */ |
| 316 | luaD_seterrorobj(L, status, L->stack.p + 1); |
| 317 | else |
| 318 | L->top.p = L->stack.p + 1; |
| 319 | luaD_reallocstack(L, cast_int(L->ci->top.p - L->stack.p), 0); |
| 320 | return status; |
| 321 | } |
| 322 | |
| 323 | |
| 324 | LUA_API int lua_closethread (lua_State *L, lua_State *from) { |
no test coverage detected