diff options
Diffstat (limited to 'ltable.c')
| -rw-r--r-- | ltable.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.c,v 2.46 2009/11/26 11:39:20 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.47 2009/12/17 15:46:44 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 | */ |
| @@ -31,6 +31,7 @@ | |||
| 31 | #include "lmem.h" | 31 | #include "lmem.h" |
| 32 | #include "lobject.h" | 32 | #include "lobject.h" |
| 33 | #include "lstate.h" | 33 | #include "lstate.h" |
| 34 | #include "lstring.h" | ||
| 34 | #include "ltable.h" | 35 | #include "ltable.h" |
| 35 | 36 | ||
| 36 | 37 | ||
| @@ -452,7 +453,7 @@ const TValue *luaH_getint (Table *t, int key) { | |||
| 452 | const TValue *luaH_getstr (Table *t, TString *key) { | 453 | const TValue *luaH_getstr (Table *t, TString *key) { |
| 453 | Node *n = hashstr(t, key); | 454 | Node *n = hashstr(t, key); |
| 454 | do { /* check whether `key' is somewhere in the chain */ | 455 | do { /* check whether `key' is somewhere in the chain */ |
| 455 | if (ttisstring(gkey(n)) && rawtsvalue(gkey(n)) == key) | 456 | if (ttisstring(gkey(n)) && eqstr(rawtsvalue(gkey(n)), key)) |
| 456 | return gval(n); /* that's it */ | 457 | return gval(n); /* that's it */ |
| 457 | else n = gnext(n); | 458 | else n = gnext(n); |
| 458 | } while (n); | 459 | } while (n); |
