aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-05-29 15:01:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-05-29 15:01:50 -0300
commit950fbcb971f495144804c03f2a9e235dbd3e4837 (patch)
treeb190c18b00b349c0ce04b1f5795adb1e118b4a31 /ltable.c
parentb2d4d0642849319f90df48c067ba71c32d763523 (diff)
downloadlua-950fbcb971f495144804c03f2a9e235dbd3e4837.tar.gz
lua-950fbcb971f495144804c03f2a9e235dbd3e4837.tar.bz2
lua-950fbcb971f495144804c03f2a9e235dbd3e4837.zip
detail ('l_castU2S' should only be used over lua_Unsigned values)
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 be8f67f0..7113f0ff 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.134 2018/02/23 13:13:31 roberto Exp roberto $ 2** $Id: ltable.c,v 2.135 2018/02/26 14:16:05 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*/
@@ -769,7 +769,7 @@ lua_Unsigned luaH_getn (Table *t) {
769 return i; 769 return i;
770 } 770 }
771 else { /* 'j' is zero or present in table */ 771 else { /* 'j' is zero or present in table */
772 if (isdummy(t) || isempty(luaH_getint(t, l_castU2S(j + 1)))) 772 if (isdummy(t) || isempty(luaH_getint(t, cast(lua_Integer, j + 1))))
773 return j; /* 'j + 1' is absent... */ 773 return j; /* 'j + 1' is absent... */
774 else /* 'j + 1' is also present */ 774 else /* 'j + 1' is also present */
775 return hash_search(t, j); 775 return hash_search(t, j);