MCPcopy Create free account
hub / github.com/defold/defold / luaB_cocreate

Function luaB_cocreate

engine/lua/src/lua/lbaselib.c:576–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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