aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-03 15:39:14 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-03 15:39:14 -0300
commitfa075b79530af1cbc977349f2e467d69ce01202c (patch)
tree300e10cd086a9812331b954d46552dbf420b0a8a /ltable.c
parent08a077d673b25cf1fbfe21794f240f4ff4999667 (diff)
parent7923dbbf72da303ca1cca17efd24725668992f15 (diff)
downloadlua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.gz
lua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.bz2
lua-fa075b79530af1cbc977349f2e467d69ce01202c.zip
Merge branch 'master' into newarray
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ltable.c b/ltable.c
index b7362a36..8c2bc3b2 100644
--- a/ltable.c
+++ b/ltable.c
@@ -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*/
739void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { 739static 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)))