Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b1ce6c2

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_malloc0 with this. Save the next hacker some time by not leaving this API detail undocumented.
1 parent 0c04342 commit b1ce6c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/lib/simplehash.h

+1-1
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)