aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-01-31 11:09:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-01-31 11:09:53 -0300
commit46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e (patch)
tree7e1ae9b55536171511506532a04f4ebe6dc764b0 /lstate.c
parent69c7139ff88bf26e05d80bf19d0351e5c88d13a3 (diff)
downloadlua-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstate.c b/lstate.c
index 4864a979..7770e314 100644
--- a/lstate.c
+++ b/lstate.c
@@ -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);