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

Function luaB_cocreate

lua/lbaselib.c:584–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582
583
584static int luaB_cocreate (lua_State *L) {
585 lua_State *NL = lua_newthread(L);
586 luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1,
587 "Lua function expected");
588 lua_pushvalue(L, 1); /* move function to top */
589 lua_xmove(L, NL, 1); /* move function from L to NL */
590 return 1;
591}
592
593
594static int luaB_cowrap (lua_State *L) {

Callers 1

luaB_cowrapFunction · 0.85

Calls 4

lua_newthreadFunction · 0.85
lua_iscfunctionFunction · 0.85
lua_pushvalueFunction · 0.85
lua_xmoveFunction · 0.85

Tested by

no test coverage detected