MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaB_cocreate

Function luaB_cocreate

3rd/lua-5.4.3/src/lcorolib.c:95–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95static int luaB_cocreate (lua_State *L) {
96 lua_State *NL;
97 luaL_checktype(L, 1, LUA_TFUNCTION);
98 NL = lua_newthread(L);
99 lua_pushvalue(L, 1); /* move function to top */
100 lua_xmove(L, NL, 1); /* move function from L to NL */
101 return 1;
102}
103
104
105static 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