diff options
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))) |