Guest User

Untitled

a guest
Oct 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. lua_State *luaE_newthread (lua_State *L) {
  2. lua_State *L1 = tostate(luaM_malloc(L, state_size(lua_State)));
  3. luaC_link(L, obj2gco(L1), LUA_TTHREAD);
  4. preinit_state(L1, G(L));
  5. stack_init(L1, L); /* init stack */
  6. setobj2n(L, gt(L1), gt(L)); /* share table of globals */
  7. L1->hookmask = L->hookmask;
  8. L1->basehookcount = L->basehookcount;
  9. L1->hook = L->hook;
  10. resethookcount(L1);
  11. lua_assert(iswhite(obj2gco(L1)));
  12. return L1;
  13. }
Add Comment
Please, Sign In to add comment