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