| 9032 | |
| 9033 | |
| 9034 | lua_State *luaE_newthread (lua_State *L) { |
| 9035 | lua_State *L1 = tostate(luaM_malloc(L, state_size(lua_State))); |
| 9036 | luaC_link(L, obj2gco(L1), LUA_TTHREAD); |
| 9037 | preinit_state(L1, G(L)); |
| 9038 | stack_init(L1, L); /* init stack */ |
| 9039 | setobj2n(L, gt(L1), gt(L)); /* share table of globals */ |
| 9040 | L1->hookmask = L->hookmask; |
| 9041 | L1->basehookcount = L->basehookcount; |
| 9042 | L1->hook = L->hook; |
| 9043 | resethookcount(L1); |
| 9044 | lua_assert(iswhite(obj2gco(L1))); |
| 9045 | return L1; |
| 9046 | } |
| 9047 | |
| 9048 | |
| 9049 | void luaE_freethread (lua_State *L, lua_State *L1) { |
no test coverage detected