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

Commitb1ce6c2

Browse files
committed
Doc: clarify a critical and undocumented aspect of simplehash.h.
I just got burnt by trying to use pg_malloc instead of pg_malloc0with this. Save the next hacker some time by not leaving thisAPI detail undocumented.
1 parent0c04342 commitb1ce6c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/include/lib/simplehash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* - SH_SCOPE - in which scope (e.g. extern, static inline) do function
4242
*declarations reside
4343
* - SH_RAW_ALLOCATOR - if defined, memory contexts are not used; instead,
44-
* use this to allocate bytes
44+
* use this to allocate bytes. The allocator must zero the returned space.
4545
* - SH_USE_NONDEFAULT_ALLOCATOR - if defined no element allocator functions
4646
*are defined, so you can supply your own
4747
* The following parameters are only relevant when SH_DEFINE is defined:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp