]> granicus.if.org Git - postgresql/commit
simplehash: Additional tweaks to make specifying an allocator work.
authorRobert Haas <rhaas@postgresql.org>
Thu, 9 Feb 2017 19:59:57 +0000 (14:59 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 9 Feb 2017 19:59:57 +0000 (14:59 -0500)
commit72257f95781af97108fa9a9e7224ec81a90e7693
treee221630989e7de61b58a27b4f9ac39128118f4cb
parent3f3d60d3bbd10f6cc118d24aadc60e96b9854576
simplehash: Additional tweaks to make specifying an allocator work.

Even if we don't emit definitions for SH_ALLOCATE and SH_FREE, we
still need prototypes.  The user can't define them before including
simplehash.h because SH_TYPE isn't available yet.

For the allocator to be able to access private_data, it needs to
become an argument to SH_CREATE.  Previously we relied on callers
to set that after returning from SH_CREATE, but SH_CREATE calls
SH_ALLOCATE before returning.

Dilip Kumar, reviewed by me.
src/backend/executor/execGrouping.c
src/backend/nodes/tidbitmap.c
src/include/lib/simplehash.h