| 541 | |
| 542 | |
| 543 | static int luaB_coresume (lua_State *L) { |
| 544 | lua_State *co = lua_tothread(L, 1); |
| 545 | int r; |
| 546 | luaL_argcheck(L, co, 1, "coroutine expected"); |
| 547 | r = auxresume(L, co, lua_gettop(L) - 1); |
| 548 | if (r < 0) { |
| 549 | lua_pushboolean(L, 0); |
| 550 | lua_insert(L, -2); |
| 551 | return 2; /* return false + error message */ |
| 552 | } |
| 553 | else { |
| 554 | lua_pushboolean(L, 1); |
| 555 | lua_insert(L, -(r + 1)); |
| 556 | return r + 1; /* return true + `resume' returns */ |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | |
| 561 | static int luaB_auxwrap (lua_State *L) { |
nothing calls this directly
no test coverage detected