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

Function luaB_cocreate

extlibs/lua/src/lcorolib.c:91–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91static int luaB_cocreate (lua_State *L) {
92 lua_State *NL;
93 luaL_checktype(L, 1, LUA_TFUNCTION);
94 NL = lua_newthread(L);
95 lua_pushvalue(L, 1); /* move function to top */
96 lua_xmove(L, NL, 1); /* move function from L to NL */
97 return 1;
98}
99
100
101static int luaB_cowrap (lua_State *L) {

Callers 1

luaB_cowrapFunction · 0.85

Calls 4

luaL_checktypeFunction · 0.85
lua_newthreadFunction · 0.85
lua_pushvalueFunction · 0.85
lua_xmoveFunction · 0.85

Tested by

no test coverage detected