aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-16 11:51:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-16 11:51:16 -0300
commit2d8d5c74b5ef3d333314feede0165df7c3d13811 (patch)
tree320305677dc890ec28cc6720810967f07a20d358 /ltable.c
parent3cdd49c94a8feed94853ba3a6adaa556fb34fd8d (diff)
downloadlua-2d8d5c74b5ef3d333314feede0165df7c3d13811.tar.gz
lua-2d8d5c74b5ef3d333314feede0165df7c3d13811.tar.bz2
lua-2d8d5c74b5ef3d333314feede0165df7c3d13811.zip
Details
New year (2024->2025), typos in comments
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltable.c b/ltable.c
index 122b7f17..8df9a4fb 100644
--- a/ltable.c
+++ b/ltable.c
@@ -123,7 +123,7 @@ typedef union {
123 123
124/* 124/*
125** Common hash part for tables with empty hash parts. That allows all 125** Common hash part for tables with empty hash parts. That allows all
126** tables to have a hash part, avoding an extra check ("is there a hash 126** tables to have a hash part, avoiding an extra check ("is there a hash
127** part?") when indexing. Its sole node has an empty value and a key 127** part?") when indexing. Its sole node has an empty value and a key
128** (DEADKEY, NULL) that is different from any valid TValue. 128** (DEADKEY, NULL) that is different from any valid TValue.
129*/ 129*/
@@ -699,7 +699,7 @@ static void clearNewSlice (Table *t, unsigned oldasize, unsigned newasize) {
699** into the table, initializes the new part of the array (if any) with 699** into the table, initializes the new part of the array (if any) with
700** nils and reinserts the elements of the old hash back into the new 700** nils and reinserts the elements of the old hash back into the new
701** parts of the table. 701** parts of the table.
702** Note that if the new size for the arry part ('newasize') is equal to 702** Note that if the new size for the array part ('newasize') is equal to
703** the old one ('oldasize'), this function will do nothing with that 703** the old one ('oldasize'), this function will do nothing with that
704** part. 704** part.
705*/ 705*/
@@ -774,7 +774,7 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) {
774 nsize = ct.total - ct.na; 774 nsize = ct.total - ct.na;
775 if (ct.deleted) { /* table has deleted entries? */ 775 if (ct.deleted) { /* table has deleted entries? */
776 /* insertion-deletion-insertion: give hash some extra size to 776 /* insertion-deletion-insertion: give hash some extra size to
777 avoid constant resizings */ 777 avoid repeated resizings */
778 nsize += nsize >> 2; 778 nsize += nsize >> 2;
779 } 779 }
780 /* resize the table to new computed sizes */ 780 /* resize the table to new computed sizes */
@@ -1300,7 +1300,7 @@ lua_Unsigned luaH_getn (Table *t) {
1300 return newhint(t, binsearch(t, limit, asize)); 1300 return newhint(t, binsearch(t, limit, asize));
1301 } 1301 }
1302 } 1302 }
1303 /* last element non empty; set a hint to speed up findind that again */ 1303 /* last element non empty; set a hint to speed up finding that again */
1304 /* (keys in the hash part cannot be hints) */ 1304 /* (keys in the hash part cannot be hints) */
1305 *lenhint(t) = asize; 1305 *lenhint(t) = asize;
1306 } 1306 }