From 037a70dfea9de66e8d27c8d3ce2ed9f159a1b094 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 15 Apr 2014 13:32:49 -0300 Subject: cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from outside (mostly for testing) --- ltable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 520ba98c..945123af 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.86 2014/04/13 21:11:19 roberto Exp roberto $ +** $Id: ltable.c,v 2.87 2014/04/15 14:28:20 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -472,7 +472,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { */ const TValue *luaH_getint (Table *t, lua_Integer key) { /* (1 <= key && key <= t->sizearray) */ - if (cast_s2u(key - 1) < cast(unsigned int, t->sizearray)) + if (l_castS2U(key - 1) < cast(unsigned int, t->sizearray)) return &t->array[key - 1]; else { Node *n = hashint(t, key); -- cgit v1.2.3-55-g6feb