aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-04-15 11:29:30 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-04-15 11:29:30 -0300
commit8f961da3dbf8c45389d1431e6dff8e44e41f1a57 (patch)
treeee67fa31c29eab0569c35c62b17f43092f60d940 /ltable.c
parent5c46b7b8cf3a71cce5572b1fca84542e24723efd (diff)
downloadlua-8f961da3dbf8c45389d1431e6dff8e44e41f1a57.tar.gz
lua-8f961da3dbf8c45389d1431e6dff8e44e41f1a57.tar.bz2
lua-8f961da3dbf8c45389d1431e6dff8e44e41f1a57.zip
macros cast_integer/cast_unsigned replaced by cast_u2s/cast_s2u, that
should be used only between lua_Integer and lua_Unsigned
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltable.c b/ltable.c
index 3d4f3c38..520ba98c 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.85 2014/04/01 14:39:55 roberto Exp roberto $ 2** $Id: ltable.c,v 2.86 2014/04/13 21:11:19 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*/
473const TValue *luaH_getint (Table *t, lua_Integer key) { 473const TValue *luaH_getint (Table *t, lua_Integer key) {
474 /* (1 <= key && key <= t->sizearray) */ 474 /* (1 <= key && key <= t->sizearray) */
475 if (cast_unsigned(key - 1) < cast_unsigned(t->sizearray)) 475 if (cast_s2u(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);