diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-03 15:39:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-03 15:39:14 -0300 |
commit | fa075b79530af1cbc977349f2e467d69ce01202c (patch) | |
tree | 300e10cd086a9812331b954d46552dbf420b0a8a /ltable.c | |
parent | 08a077d673b25cf1fbfe21794f240f4ff4999667 (diff) | |
parent | 7923dbbf72da303ca1cca17efd24725668992f15 (diff) | |
download | lua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.gz lua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.bz2 lua-fa075b79530af1cbc977349f2e467d69ce01202c.zip |
Merge branch 'master' into newarray
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -252,7 +252,7 @@ LUAI_FUNC unsigned int luaH_realasize (const Table *t) { | |||
252 | return t->alimit; /* this is the size */ | 252 | return t->alimit; /* this is the size */ |
253 | else { | 253 | else { |
254 | unsigned int size = t->alimit; | 254 | unsigned int size = t->alimit; |
255 | /* compute the smallest power of 2 not smaller than 'n' */ | 255 | /* compute the smallest power of 2 not smaller than 'size' */ |
256 | size |= (size >> 1); | 256 | size |= (size >> 1); |
257 | size |= (size >> 2); | 257 | size |= (size >> 2); |
258 | size |= (size >> 4); | 258 | size |= (size >> 4); |
@@ -736,7 +736,8 @@ static Node *getfreepos (Table *t) { | |||
736 | ** put new key in its main position; otherwise (colliding node is in its main | 736 | ** put new key in its main position; otherwise (colliding node is in its main |
737 | ** position), new key goes to an empty position. | 737 | ** position), new key goes to an empty position. |
738 | */ | 738 | */ |
739 | void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { | 739 | static void luaH_newkey (lua_State *L, Table *t, const TValue *key, |
740 | TValue *value) { | ||
740 | Node *mp; | 741 | Node *mp; |
741 | TValue aux; | 742 | TValue aux; |
742 | if (l_unlikely(ttisnil(key))) | 743 | if (l_unlikely(ttisnil(key))) |