diff options
author | Li Jin <dragon-fly@qq.com> | 2022-12-02 10:40:09 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-12-02 10:40:09 +0800 |
commit | 298b18dbe852300199cc529c942a181bead5f135 (patch) | |
tree | f4b5ae89b6920fa0a12c693118f85334f19754f8 /src/3rdParty/lua/ltable.c | |
parent | a6a65ba26a9d320611abcbfba49fa724edfb4dad (diff) | |
download | yuescript-298b18dbe852300199cc529c942a181bead5f135.tar.gz yuescript-298b18dbe852300199cc529c942a181bead5f135.tar.bz2 yuescript-298b18dbe852300199cc529c942a181bead5f135.zip |
update Lua.
Diffstat (limited to 'src/3rdParty/lua/ltable.c')
-rw-r--r-- | src/3rdParty/lua/ltable.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/3rdParty/lua/ltable.c b/src/3rdParty/lua/ltable.c index 1b1cd24..cc7993e 100644 --- a/src/3rdParty/lua/ltable.c +++ b/src/3rdParty/lua/ltable.c | |||
@@ -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); |
@@ -975,6 +975,4 @@ Node *luaH_mainposition (const Table *t, const TValue *key) { | |||
975 | return mainpositionTV(t, key); | 975 | return mainpositionTV(t, key); |
976 | } | 976 | } |
977 | 977 | ||
978 | int luaH_isdummy (const Table *t) { return isdummy(t); } | ||
979 | |||
980 | #endif | 978 | #endif |