MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaB_cocreate

Function luaB_cocreate

Source/Misc/lua/src/lua.c:11440–11447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11438
11439
11440static int luaB_cocreate (lua_State *L) {
11441lua_State *NL = lua_newthread(L);
11442luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1,
11443"Lua function expected");
11444lua_pushvalue(L, 1); /* move function to top */
11445lua_xmove(L, NL, 1); /* move function from L to NL */
11446return 1;
11447}
11448
11449
11450static 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