From 46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 31 Jan 2020 11:09:53 -0300 Subject: Clearer distinction between types and tags LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants. --- lstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstate.c') 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) { /* create new thread */ L1 = &cast(LX *, luaM_newobject(L, LUA_TTHREAD, sizeof(LX)))->l; L1->marked = luaC_white(g); - L1->tt = LUA_TTHREAD; + L1->tt = LUA_VTHREAD; /* link it on list 'allgc' */ L1->next = g->allgc; g->allgc = obj2gco(L1); @@ -382,7 +382,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { if (l == NULL) return NULL; L = &l->l.l; g = &l->g; - L->tt = LUA_TTHREAD; + L->tt = LUA_VTHREAD; g->currentwhite = bitmask(WHITE0BIT); L->marked = luaC_white(g); preinit_thread(L, g); -- cgit v1.2.3-55-g6feb