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

Commite1724af

Browse files
Fix comments for the dshash_parameters struct.
A recent commit added a copy_function member to thedshash_parameters struct, but it missed updating a couple ofcomments that refer to the function pointer members of this struct.One of those comments also refers to a tranche_name member and non-arg variants of the function pointer members, all of which wereeither removed during development or removed shortly after dshashtable support was committed.Oversights in commits8c0d7ba,d7694fc, and42a1de3.Discussion:https://postgr.es/m/20240227045213.GA2329190%40nathanxps13
1 parent92d2ab7 commite1724af

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

‎src/backend/lib/dshash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static inline void copy_key(dshash_table *hash_table, void *dest,
202202
* Create a new hash table backed by the given dynamic shared area, with the
203203
* given parameters. The returned object is allocated in backend-local memory
204204
* using the current MemoryContext. 'arg' will be passed through to the
205-
* compareandhash functions.
205+
* compare, hash,andcopy functions.
206206
*/
207207
dshash_table*
208208
dshash_create(dsa_area*area,constdshash_parameters*params,void*arg)

‎src/include/lib/dshash.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ typedef void (*dshash_copy_function) (void *dest, const void *src, size_t size,
4343

4444
/*
4545
* The set of parameters needed to create or attach to a hash table. The
46-
*memberstranche_idand tranche_name donot need to be initialized when
47-
*attaching to anexisting hash table.
46+
* tranche_idmember doesnot need to be initialized when attaching to an
47+
* existing hash table.
4848
*
49-
* Compare and hash functions must be supplied even when attaching, because we
50-
* can't safely share function pointers between backends in general. Either
51-
* the arg variants or the non-arg variants should be supplied; the other
52-
* function pointers should be NULL. If the arg variants are supplied then the
53-
* user data pointer supplied to the create and attach functions will be
54-
* passed to the hash and compare functions.
49+
* Compare, hash, and copy functions must be supplied even when attaching,
50+
* because we can't safely share function pointers between backends in general.
51+
* The user data pointer supplied to the create and attach functions will be
52+
* passed to these functions.
5553
*/
5654
typedefstructdshash_parameters
5755
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp