MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaB_coresume

Function luaB_coresume

deps/lua/src/lbaselib.c:543–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541
542
543static 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
561static 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