diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-10-19 16:29:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-10-19 16:29:54 -0300 |
commit | 14d2803e55f0bbc2b09890a3b30afbb063ec973d (patch) | |
tree | fd99577f3745763e67e02b34cb842f2604ce5aac /ltable.c | |
parent | 7f12bf40c401ea465c792156be31bf4a38a7499f (diff) | |
download | lua-14d2803e55f0bbc2b09890a3b30afbb063ec973d.tar.gz lua-14d2803e55f0bbc2b09890a3b30afbb063ec973d.tar.bz2 lua-14d2803e55f0bbc2b09890a3b30afbb063ec973d.zip |
Details
Some cast operations rewritten to use respective macros.
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -107,7 +107,7 @@ static const TValue absentkey = {ABSTKEYCONSTANT}; | |||
107 | */ | 107 | */ |
108 | static Node *hashint (const Table *t, lua_Integer i) { | 108 | static Node *hashint (const Table *t, lua_Integer i) { |
109 | lua_Unsigned ui = l_castS2U(i); | 109 | lua_Unsigned ui = l_castS2U(i); |
110 | if (ui <= (unsigned int)INT_MAX) | 110 | if (ui <= cast_uint(INT_MAX)) |
111 | return hashmod(t, cast_int(ui)); | 111 | return hashmod(t, cast_int(ui)); |
112 | else | 112 | else |
113 | return hashmod(t, ui); | 113 | return hashmod(t, ui); |
@@ -488,7 +488,7 @@ static void setnodevector (lua_State *L, Table *t, unsigned int size) { | |||
488 | luaG_runerror(L, "table overflow"); | 488 | luaG_runerror(L, "table overflow"); |
489 | size = twoto(lsize); | 489 | size = twoto(lsize); |
490 | t->node = luaM_newvector(L, size, Node); | 490 | t->node = luaM_newvector(L, size, Node); |
491 | for (i = 0; i < (int)size; i++) { | 491 | for (i = 0; i < cast_int(size); i++) { |
492 | Node *n = gnode(t, i); | 492 | Node *n = gnode(t, i); |
493 | gnext(n) = 0; | 493 | gnext(n) = 0; |
494 | setnilkey(n); | 494 | setnilkey(n); |