| 481 | |
| 482 | |
| 483 | static void finishCcall (lua_State *L) { |
| 484 | CallInfo *ci = L->ci; |
| 485 | int n; |
| 486 | lua_assert(ci->u.c.k != NULL); /* must have a continuation */ |
| 487 | lua_assert(L->nny == 0); |
| 488 | if (ci->callstatus & CIST_YPCALL) { /* was inside a pcall? */ |
| 489 | ci->callstatus &= ~CIST_YPCALL; /* finish 'lua_pcall' */ |
| 490 | L->errfunc = ci->u.c.old_errfunc; |
| 491 | } |
| 492 | /* finish 'lua_callk'/'lua_pcall' */ |
| 493 | adjustresults(L, ci->nresults); |
| 494 | /* call continuation function */ |
| 495 | if (!(ci->callstatus & CIST_STAT)) /* no call status? */ |
| 496 | ci->u.c.status = LUA_YIELD; /* 'default' status */ |
| 497 | lua_assert(ci->u.c.status != LUA_OK); |
| 498 | ci->callstatus = (ci->callstatus & ~(CIST_YPCALL | CIST_STAT)) | CIST_YIELDED; |
| 499 | lua_unlock(L); |
| 500 | n = (*ci->u.c.k)(L); |
| 501 | lua_lock(L); |
| 502 | api_checknelems(L, n); |
| 503 | /* finish 'luaD_precall' */ |
| 504 | luaD_poscall(L, L->top - n); |
| 505 | } |
| 506 | |
| 507 | |
| 508 | static void unroll (lua_State *L, void *ud) { |
no test coverage detected