| 406 | |
| 407 | |
| 408 | static void finishCcall (lua_State *L) { |
| 409 | CallInfo *ci = L->ci; |
| 410 | int n; |
| 411 | lua_assert(ci->u.c.k != NULL); /* must have a continuation */ |
| 412 | lua_assert(L->nny == 0); |
| 413 | if (ci->callstatus & CIST_YPCALL) { /* was inside a pcall? */ |
| 414 | ci->callstatus &= ~CIST_YPCALL; /* finish 'lua_pcall' */ |
| 415 | L->errfunc = ci->u.c.old_errfunc; |
| 416 | } |
| 417 | /* finish 'lua_callk'/'lua_pcall' */ |
| 418 | adjustresults(L, ci->nresults); |
| 419 | /* call continuation function */ |
| 420 | if (!(ci->callstatus & CIST_STAT)) /* no call status? */ |
| 421 | ci->u.c.status = LUA_YIELD; /* 'default' status */ |
| 422 | lua_assert(ci->u.c.status != LUA_OK); |
| 423 | ci->callstatus = (ci->callstatus & ~(CIST_YPCALL | CIST_STAT)) | CIST_YIELDED; |
| 424 | lua_unlock(L); |
| 425 | n = (*ci->u.c.k)(L); |
| 426 | lua_lock(L); |
| 427 | api_checknelems(L, n); |
| 428 | /* finish 'luaD_precall' */ |
| 429 | luaD_poscall(L, L->top - n); |
| 430 | } |
| 431 | |
| 432 | |
| 433 | static void unroll (lua_State *L, void *ud) { |
no test coverage detected