| 442 | |
| 443 | |
| 444 | LUA_API int lua_yield (lua_State *L, int nresults) { |
| 445 | luai_userstateyield(L, nresults); |
| 446 | lua_lock(L); |
| 447 | if (L->nCcalls > L->baseCcalls) |
| 448 | luaG_runerror(L, "attempt to yield across metamethod/C-call boundary"); |
| 449 | L->base = L->top - nresults; /* protect stack slots below */ |
| 450 | L->status = LUA_YIELD; |
| 451 | lua_unlock(L); |
| 452 | return -1; |
| 453 | } |
| 454 | |
| 455 | |
| 456 | int luaD_pcall (lua_State *L, Pfunc func, void *u, |
no test coverage detected