diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.53 2011/04/19 16:22:13 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.54 2011/04/28 14:00:11 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -23,6 +23,7 @@ | |||
23 | #include "lparser.h" | 23 | #include "lparser.h" |
24 | #include "lstring.h" | 24 | #include "lstring.h" |
25 | #include "ltable.h" | 25 | #include "ltable.h" |
26 | #include "lvm.h" | ||
26 | 27 | ||
27 | 28 | ||
28 | #define hasjumps(e) ((e)->t != (e)->f) | 29 | #define hasjumps(e) ((e)->t != (e)->f) |
@@ -295,7 +296,7 @@ static int addk (FuncState *fs, TValue *key, TValue *v) { | |||
295 | if (ttisnumber(idx)) { | 296 | if (ttisnumber(idx)) { |
296 | lua_Number n = nvalue(idx); | 297 | lua_Number n = nvalue(idx); |
297 | lua_number2int(k, n); | 298 | lua_number2int(k, n); |
298 | if (luaO_rawequalObj(&f->k[k], v)) | 299 | if (luaV_rawequalObj(&f->k[k], v)) |
299 | return k; | 300 | return k; |
300 | /* else may be a collision (e.g., between 0.0 and "\0\0\0\0\0\0\0\0"); | 301 | /* else may be a collision (e.g., between 0.0 and "\0\0\0\0\0\0\0\0"); |
301 | go through and create a new entry for this value */ | 302 | go through and create a new entry for this value */ |