| 575 | |
| 576 | |
| 577 | static int luaB_cocreate (lua_State *L) { |
| 578 | lua_State *NL = lua_newthread(L); |
| 579 | luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, |
| 580 | "Lua function expected"); |
| 581 | lua_pushvalue(L, 1); /* move function to top */ |
| 582 | lua_xmove(L, NL, 1); /* move function from L to NL */ |
| 583 | return 1; |
| 584 | } |
| 585 | |
| 586 | |
| 587 | static int luaB_cowrap (lua_State *L) { |
no test coverage detected