MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaB_coresume

Function luaB_coresume

lua/lbaselib.c:551–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549
550
551static 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
569static int luaB_auxwrap (lua_State *L) {

Callers

nothing calls this directly

Calls 5

lua_tothreadFunction · 0.85
auxresumeFunction · 0.85
lua_gettopFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_insertFunction · 0.85

Tested by

no test coverage detected