postgres.git / summary / log / commit / refs
commit ac8eb972f268c787bfe7579b1747c3866fced5a9
Author: Robert Haas <rhaas@postgresql.org>
Date: Tue Feb 07 21:20:05 2017 +0000
First released in: 10.0
Avoid redefining simplehash_allocate/simplehash_free.
There's no generic guard against multiple inclusion in this file,
for good reason. But these typedefs need one, as per a report
from Jeff Janes.
src/include/lib/simplehash.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index fd7063c216f..359c7b8aa0c 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -88,8 +88,11 @@
#define SH_ENTRY_HASH SH_MAKE_NAME(entry_hash)
/* Allocation function for hash table elements */
+#ifndef SIMPLEHASH_TYPEDEFS
+#define SIMPLEHASH_TYPEDEFS
typedef void *(*simplehash_allocate) (Size size, void *args);
typedef void (*simplehash_free) (void *pointer, void *args);
+#endif
/* generate forward declarations necessary to use the hash table */
#ifdef SH_DECLARE
[parent: 565903af474e]