diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-01-31 11:09:53 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-01-31 11:09:53 -0300 |
commit | 46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e (patch) | |
tree | 7e1ae9b55536171511506532a04f4ebe6dc764b0 /lstate.c | |
parent | 69c7139ff88bf26e05d80bf19d0351e5c88d13a3 (diff) | |
download | lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.tar.gz lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.tar.bz2 lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.zip |
Clearer distinction between types and tags
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -318,7 +318,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { | |||
318 | /* create new thread */ | 318 | /* create new thread */ |
319 | L1 = &cast(LX *, luaM_newobject(L, LUA_TTHREAD, sizeof(LX)))->l; | 319 | L1 = &cast(LX *, luaM_newobject(L, LUA_TTHREAD, sizeof(LX)))->l; |
320 | L1->marked = luaC_white(g); | 320 | L1->marked = luaC_white(g); |
321 | L1->tt = LUA_TTHREAD; | 321 | L1->tt = LUA_VTHREAD; |
322 | /* link it on list 'allgc' */ | 322 | /* link it on list 'allgc' */ |
323 | L1->next = g->allgc; | 323 | L1->next = g->allgc; |
324 | g->allgc = obj2gco(L1); | 324 | g->allgc = obj2gco(L1); |
@@ -382,7 +382,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
382 | if (l == NULL) return NULL; | 382 | if (l == NULL) return NULL; |
383 | L = &l->l.l; | 383 | L = &l->l.l; |
384 | g = &l->g; | 384 | g = &l->g; |
385 | L->tt = LUA_TTHREAD; | 385 | L->tt = LUA_VTHREAD; |
386 | g->currentwhite = bitmask(WHITE0BIT); | 386 | g->currentwhite = bitmask(WHITE0BIT); |
387 | L->marked = luaC_white(g); | 387 | L->marked = luaC_white(g); |
388 | preinit_thread(L, g); | 388 | preinit_thread(L, g); |