From 5037196f6fddb828056578b1c0d352cdef672d6a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 5 Aug 2002 11:50:39 -0300 Subject: new macros `ttis*' --- lcode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index eadaef52..cd976cf0 100644 --- a/lcode.c +++ b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 1.107 2002/06/12 14:51:31 roberto Exp roberto $ +** $Id: lcode.c,v 1.108 2002/06/13 13:39:55 roberto Exp $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -206,7 +206,7 @@ static void freeexp (FuncState *fs, expdesc *e) { static int addk (FuncState *fs, TObject *k, TObject *v) { const TObject *index = luaH_get(fs->h, k); - if (ttype(index) == LUA_TNUMBER) { + if (ttisnumber(index)) { lua_assert(luaO_rawequalObj(&fs->f->k[cast(int, nvalue(index))], v)); return cast(int, nvalue(index)); } @@ -573,7 +573,7 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { if (op == OPR_MINUS) { luaK_exp2val(fs, e); - if (e->k == VK && ttype(&fs->f->k[e->info]) == LUA_TNUMBER) + if (e->k == VK && ttisnumber(&fs->f->k[e->info])) e->info = luaK_numberK(fs, -nvalue(&fs->f->k[e->info])); else { luaK_exp2anyreg(fs, e); -- cgit v1.2.3-55-g6feb