diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-08-07 16:14:30 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-08-07 16:14:30 -0300 |
commit | dfe2f1eeff07b0fc42f6a4255624e704d9c9beb5 (patch) | |
tree | 8587dd2e153ee6a3ca56256d30ba2c994e60ecaf /ltable.c | |
parent | ca7e5b5cb62246653647753f5a6e7fa85e8f030d (diff) | |
download | lua-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | } |