Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17b340a

Browse files
committed
Minor clean-up in dshash.{c,h}.
For consistency with other code that deals in numbers of buckets, themacro BUCKETS_PER_PARTITION should produce a value of type size_t.Also, fix a mention of an obsolete proposed name for dshash.c thatappeared in a comment.Author: Thomas Munro, based on an observation from Amit KapilaDiscussion:https://postgr.es/m/CAA4eK1%2BBOp5aaW3aHEkg5Bptf8Ga_BkBnmA-%3DXcAXShs0yCiYQ%40mail.gmail.com
1 parent07c6e51 commit17b340a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/lib/dshash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ struct dshash_table
129129

130130
/* How many buckets are there in each partition at a given size? */
131131
#defineBUCKETS_PER_PARTITION(size_log2)\
132-
(UINT64CONST(1) << NUM_SPLITS(size_log2))
132+
(((size_t)1) << NUM_SPLITS(size_log2))
133133

134134
/* Max entries before we need to grow. Half + quarter = 75% load factor. */
135135
#defineMAX_COUNT_PER_PARTITION(hash_table)\

‎src/include/lib/dshash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ typedef struct dshash_parameters
5555
inttranche_id;/* The tranche ID to use for locks */
5656
}dshash_parameters;
5757

58-
/* Forward declaration of private types for use only bydht.c. */
58+
/* Forward declaration of private types for use only bydshash.c. */
5959
structdshash_table_item;
6060
typedefstructdshash_table_itemdshash_table_item;
6161

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp