From dfe2f1eeff07b0fc42f6a4255624e704d9c9beb5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 7 Aug 2006 16:14:30 -0300 Subject: macros luai_num* take a state L (when available) as argument, to allow them to generate errors (and other facilities) --- ltable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index b3ad833c..a29eb030 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.32 2006/01/18 11:49:02 roberto Exp roberto $ +** $Id: ltable.c,v 2.33 2006/07/11 15:53:29 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -494,7 +494,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_numisnan(nvalue(key))) + else if (ttisnumber(key) && luai_numisnan(L, nvalue(key))) luaG_runerror(L, "table index is NaN"); return newkey(L, t, key); } -- cgit v1.2.3-55-g6feb