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. --- lcode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index 72a8820b..332fdd00 100644 --- a/lcode.c +++ b/lcode.c @@ -678,22 +678,22 @@ static void luaK_float (FuncState *fs, int reg, lua_Number f) { */ static void const2exp (TValue *v, expdesc *e) { switch (ttypetag(v)) { - case LUA_TNUMINT: + case LUA_VNUMINT: e->k = VKINT; e->u.ival = ivalue(v); break; - case LUA_TNUMFLT: + case LUA_VNUMFLT: e->k = VKFLT; e->u.nval = fltvalue(v); break; - case LUA_TFALSE: + case LUA_VFALSE: e->k = VFALSE; break; - case LUA_TTRUE: + case LUA_VTRUE: e->k = VTRUE; break; - case LUA_TNIL: + case LUA_VNIL: e->k = VNIL; break; - case LUA_TSHRSTR: case LUA_TLNGSTR: + case LUA_VSHRSTR: case LUA_VLNGSTR: e->k = VKSTR; e->u.strval = tsvalue(v); break; default: lua_assert(0); -- cgit v1.2.3-55-g6feb