From 298b18dbe852300199cc529c942a181bead5f135 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 2 Dec 2022 10:40:09 +0800 Subject: update Lua. --- src/3rdParty/lua/ltable.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/3rdParty/lua/ltable.c') 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}; */ static Node *hashint (const Table *t, lua_Integer i) { lua_Unsigned ui = l_castS2U(i); - if (ui <= (unsigned int)INT_MAX) + if (ui <= cast_uint(INT_MAX)) return hashmod(t, cast_int(ui)); else return hashmod(t, ui); @@ -488,7 +488,7 @@ static void setnodevector (lua_State *L, Table *t, unsigned int size) { luaG_runerror(L, "table overflow"); size = twoto(lsize); t->node = luaM_newvector(L, size, Node); - for (i = 0; i < (int)size; i++) { + for (i = 0; i < cast_int(size); i++) { Node *n = gnode(t, i); gnext(n) = 0; setnilkey(n); @@ -975,6 +975,4 @@ Node *luaH_mainposition (const Table *t, const TValue *key) { return mainpositionTV(t, key); } -int luaH_isdummy (const Table *t) { return isdummy(t); } - #endif -- cgit v1.2.3-55-g6feb