MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaB_cocreate

Function luaB_cocreate

app/redis-6.2.6/deps/lua/src/lbaselib.c:577–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575
576
577static int luaB_cocreate (lua_State *L) {
578 lua_State *NL = lua_newthread(L);
579 luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1,
580 "Lua function expected");
581 lua_pushvalue(L, 1); /* move function to top */
582 lua_xmove(L, NL, 1); /* move function from L to NL */
583 return 1;
584}
585
586
587static int luaB_cowrap (lua_State *L) {

Callers 1

luaB_cowrapFunction · 0.70

Calls 4

lua_newthreadFunction · 0.70
lua_iscfunctionFunction · 0.70
lua_pushvalueFunction · 0.70
lua_xmoveFunction · 0.70

Tested by

no test coverage detected