aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/ltable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdParty/lua/ltable.c')
-rw-r--r--src/3rdParty/lua/ltable.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/3rdParty/lua/ltable.c b/src/3rdParty/lua/ltable.c
index cc7993e..3fb575a 100644
--- a/src/3rdParty/lua/ltable.c
+++ b/src/3rdParty/lua/ltable.c
@@ -257,10 +257,12 @@ LUAI_FUNC unsigned int luaH_realasize (const Table *t) {
257 size |= (size >> 2); 257 size |= (size >> 2);
258 size |= (size >> 4); 258 size |= (size >> 4);
259 size |= (size >> 8); 259 size |= (size >> 8);
260#if (UINT_MAX >> 14) > 3 /* unsigned int has more than 16 bits */
260 size |= (size >> 16); 261 size |= (size >> 16);
261#if (UINT_MAX >> 30) > 3 262#if (UINT_MAX >> 30) > 3
262 size |= (size >> 32); /* unsigned int has more than 32 bits */ 263 size |= (size >> 32); /* unsigned int has more than 32 bits */
263#endif 264#endif
265#endif
264 size++; 266 size++;
265 lua_assert(ispow2(size) && size/2 < t->alimit && t->alimit < size); 267 lua_assert(ispow2(size) && size/2 < t->alimit && t->alimit < size);
266 return size; 268 return size;
@@ -660,7 +662,8 @@ static Node *getfreepos (Table *t) {
660** put new key in its main position; otherwise (colliding node is in its main 662** put new key in its main position; otherwise (colliding node is in its main
661** position), new key goes to an empty position. 663** position), new key goes to an empty position.
662*/ 664*/
663void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { 665static void luaH_newkey (lua_State *L, Table *t, const TValue *key,
666 TValue *value) {
664 Node *mp; 667 Node *mp;
665 TValue aux; 668 TValue aux;
666 if (l_unlikely(ttisnil(key))) 669 if (l_unlikely(ttisnil(key)))