diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-15 13:32:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-15 13:32:49 -0300 |
commit | 037a70dfea9de66e8d27c8d3ce2ed9f159a1b094 (patch) | |
tree | a31c77b6da44e543a1ec01f916e31d99fb64b238 /ltable.c | |
parent | 8f961da3dbf8c45389d1431e6dff8e44e41f1a57 (diff) | |
download | lua-037a70dfea9de66e8d27c8d3ce2ed9f159a1b094.tar.gz lua-037a70dfea9de66e8d27c8d3ce2ed9f159a1b094.tar.bz2 lua-037a70dfea9de66e8d27c8d3ce2ed9f159a1b094.zip |
cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from
outside (mostly for testing)
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.86 2014/04/13 21:11:19 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.87 2014/04/15 14:28:20 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 | */ |
@@ -472,7 +472,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { | |||
472 | */ | 472 | */ |
473 | const TValue *luaH_getint (Table *t, lua_Integer key) { | 473 | const TValue *luaH_getint (Table *t, lua_Integer key) { |
474 | /* (1 <= key && key <= t->sizearray) */ | 474 | /* (1 <= key && key <= t->sizearray) */ |
475 | if (cast_s2u(key - 1) < cast(unsigned int, t->sizearray)) | 475 | if (l_castS2U(key - 1) < cast(unsigned int, t->sizearray)) |
476 | return &t->array[key - 1]; | 476 | return &t->array[key - 1]; |
477 | else { | 477 | else { |
478 | Node *n = hashint(t, key); | 478 | Node *n = hashint(t, key); |