aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-08-07 16:14:30 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-08-07 16:14:30 -0300
commitdfe2f1eeff07b0fc42f6a4255624e704d9c9beb5 (patch)
tree8587dd2e153ee6a3ca56256d30ba2c994e60ecaf /ltable.c
parentca7e5b5cb62246653647753f5a6e7fa85e8f030d (diff)
downloadlua-dfe2f1eeff07b0fc42f6a4255624e704d9c9beb5.tar.gz
lua-dfe2f1eeff07b0fc42f6a4255624e704d9c9beb5.tar.bz2
lua-dfe2f1eeff07b0fc42f6a4255624e704d9c9beb5.zip
macros luai_num* take a state L (when available) as argument, to allow
them to generate errors (and other facilities)
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltable.c b/ltable.c
index b3ad833c..a29eb030 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.32 2006/01/18 11:49:02 roberto Exp roberto $ 2** $Id: ltable.c,v 2.33 2006/07/11 15:53:29 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -494,7 +494,7 @@ TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {
494 return cast(TValue *, p); 494 return cast(TValue *, p);
495 else { 495 else {
496 if (ttisnil(key)) luaG_runerror(L, "table index is nil"); 496 if (ttisnil(key)) luaG_runerror(L, "table index is nil");
497 else if (ttisnumber(key) && luai_numisnan(nvalue(key))) 497 else if (ttisnumber(key) && luai_numisnan(L, nvalue(key)))
498 luaG_runerror(L, "table index is NaN"); 498 luaG_runerror(L, "table index is NaN");
499 return newkey(L, t, key); 499 return newkey(L, t, key);
500 } 500 }