From 8e48ebb638594bdf38e992e042a256a713856c18 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 24 Oct 2005 15:37:52 -0200 Subject: no more L in numer-operator macros (some functions that use those macros have no access to L) --- ltable.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 73b59328..b640a809 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.25 2005/05/31 14:25:18 roberto Exp roberto $ +** $Id: ltable.c,v 2.26 2005/07/11 14:01:37 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -120,7 +120,7 @@ static int arrayindex (const TValue *key) { lua_Number n = nvalue(key); int k; lua_number2int(k, n); - if (luai_numeq(L, cast(lua_Number, k), nvalue(key))) + if (luai_numeq(cast(lua_Number, k), nvalue(key))) return k; } return -1; /* `key' did not match some condition */ @@ -437,7 +437,7 @@ const TValue *luaH_getnum (Table *t, int key) { lua_Number nk = cast(lua_Number, key); Node *n = hashnum(t, nk); do { /* check whether `key' is somewhere in the chain */ - if (ttisnumber(gkey(n)) && luai_numeq(L, nvalue(gkey(n)), nk)) + if (ttisnumber(gkey(n)) && luai_numeq(nvalue(gkey(n)), nk)) return gval(n); /* that's it */ else n = gnext(n); } while (n); @@ -471,7 +471,7 @@ const TValue *luaH_get (Table *t, const TValue *key) { int k; lua_Number n = nvalue(key); lua_number2int(k, n); - if (luai_numeq(L, cast(lua_Number, k), nvalue(key))) /* index is int? */ + if (luai_numeq(cast(lua_Number, k), nvalue(key))) /* index is int? */ return luaH_getnum(t, k); /* use specialized version */ /* else go through */ } @@ -495,7 +495,7 @@ TValue *luaH_set (lua_State *L, Table *t, const TValue *key) { return cast(TValue *, p); else { if (ttisnil(key)) luaG_runerror(L, "table index is nil"); - else if (ttisnumber(key) && !luai_numeq(L, nvalue(key), nvalue(key))) + else if (ttisnumber(key) && !luai_numeq(nvalue(key), nvalue(key))) luaG_runerror(L, "table index is NaN"); return newkey(L, t, key); } -- cgit v1.2.3-55-g6feb