| 534 | |
| 535 | |
| 536 | static int recover (lua_State *L, int status) { |
| 537 | StkId oldtop; |
| 538 | CallInfo *ci = findpcall(L); |
| 539 | if (ci == NULL) return 0; /* no recovery point */ |
| 540 | /* "finish" luaD_pcall */ |
| 541 | oldtop = restorestack(L, ci->extra); |
| 542 | luaF_close(L, oldtop); |
| 543 | seterrorobj(L, status, oldtop); |
| 544 | L->ci = ci; |
| 545 | L->allowhook = ci->u.c.old_allowhook; |
| 546 | L->nny = 0; /* should be zero to be yieldable */ |
| 547 | luaD_shrinkstack(L); |
| 548 | L->errfunc = ci->u.c.old_errfunc; |
| 549 | ci->callstatus |= CIST_STAT; /* call has error status */ |
| 550 | ci->u.c.status = status; /* (here it is) */ |
| 551 | return 1; /* continue running the coroutine */ |
| 552 | } |
| 553 | |
| 554 | |
| 555 | /* |
no test coverage detected