agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v1 1/1] fix some commented undefs
43+ messages / 2 participants
[nested] [flat]

* [PATCH v1 1/1] fix some commented undefs
@ 2025-12-11 21:26  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Nathan Bossart @ 2025-12-11 21:26 UTC (permalink / raw)

---
 src/backend/access/nbtree/nbtsort.c | 2 +-
 src/backend/utils/adt/numeric.c     | 2 +-
 src/include/executor/execdebug.h    | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index d7695dc1108..5119db53a1b 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -69,8 +69,8 @@
 /*
  * DISABLE_LEADER_PARTICIPATION disables the leader's participation in
  * parallel index builds.  This may be useful as a debugging aid.
-#undef DISABLE_LEADER_PARTICIPATION
  */
+/* #define DISABLE_LEADER_PARTICIPATION */
 
 /*
  * Status record for spooling/sorting phase.  (Note we may have two of
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index 2460698df01..a42a2948121 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -48,8 +48,8 @@
  * Uncomment the following to enable compilation of dump_numeric()
  * and dump_var() and to get a dump of any result produced by make_result().
  * ----------
-#define NUMERIC_DEBUG
  */
+/* #define NUMERIC_DEBUG */
 
 
 /* ----------
diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h
index e5d27fb6c9a..d999a907e77 100644
--- a/src/include/executor/execdebug.h
+++ b/src/include/executor/execdebug.h
@@ -34,22 +34,22 @@
  *		EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the
  *		nest loop node by NL_printf() and ENL_printf() in nodeNestloop.c
  * ----------------
-#undef EXEC_NESTLOOPDEBUG
  */
+/* #define EXEC_NESTLOOPDEBUG */
 
 /* ----------------
  *		EXEC_SORTDEBUG is a flag which turns on debugging of
  *		the ExecSort() stuff by SO_printf() in nodeSort.c
  * ----------------
-#undef EXEC_SORTDEBUG
  */
+/* #define EXEC_SORTDEBUG */
 
 /* ----------------
  *		EXEC_MERGEJOINDEBUG is a flag which turns on debugging of
  *		the ExecMergeJoin() stuff by MJ_printf() in nodeMergejoin.c
  * ----------------
-#undef EXEC_MERGEJOINDEBUG
  */
+/* #define EXEC_MERGEJOINDEBUG */
 
 /* ----------------------------------------------------------------
  *		#defines controlled by above definitions
-- 
2.39.5 (Apple Git-154)


--6vjI3TbFXYVKYNF4--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread

* [PATCH v1 2/2] Collapse SH_CREATE() into a single definition
@ 2026-07-01 10:36  Jonathan Gonzalez V. <[email protected]>
  0 siblings, 0 replies; 43+ messages in thread

From: Jonathan Gonzalez V. @ 2026-07-01 10:36 UTC (permalink / raw)

The function had two conditional definitions that make lcov v2.x fail.
---
 src/include/lib/simplehash.h | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index 15af488abfb..cda4347e60b 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -138,6 +138,14 @@
 #define SH_INSERT_HASH_INTERNAL SH_MAKE_NAME(insert_hash_internal)
 #define SH_LOOKUP_HASH_INTERNAL SH_MAKE_NAME(lookup_hash_internal)
 
+#ifdef SH_RAW_ALLOCATOR
+/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS uint32 nelements, void *private_data
+#else
+/*  <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements, void *private_data) */
+#define SH_CREATE_PARAMETERS MemoryContext ctx, uint32 nelements, void *private_data
+#endif
+
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE
 
@@ -186,17 +194,7 @@ typedef struct SH_ITERATOR
 }			SH_ITERATOR;
 
 /* externally visible function prototypes */
-#ifdef SH_RAW_ALLOCATOR
-/* <prefix>_hash <prefix>_create(uint32 nelements, void *private_data) */
-SH_SCOPE	SH_TYPE *SH_CREATE(uint32 nelements, void *private_data);
-#else
-/*
- * <prefix>_hash <prefix>_create(MemoryContext ctx, uint32 nelements,
- *								 void *private_data)
- */
-SH_SCOPE	SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements,
-							   void *private_data);
-#endif
+SH_SCOPE	SH_TYPE *SH_CREATE(SH_CREATE_PARAMETERS);
 
 /* void <prefix>_destroy(<prefix>_hash *tb) */
 SH_SCOPE void SH_DESTROY(SH_TYPE * tb);
@@ -442,13 +440,8 @@ SH_FREE(SH_TYPE * type, void *pointer)
  * Memory other than for the array of elements will still be allocated from
  * the passed-in context.
  */
-#ifdef SH_RAW_ALLOCATOR
 SH_SCOPE	SH_TYPE *
-SH_CREATE(uint32 nelements, void *private_data)
-#else
-SH_SCOPE	SH_TYPE *
-SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data)
-#endif
+SH_CREATE(SH_CREATE_PARAMETERS)
 {
 	SH_TYPE    *tb;
 	uint64		size;
@@ -1217,6 +1210,7 @@ SH_STAT(SH_TYPE * tb)
 #undef SH_GROW_MAX_MOVE
 #undef SH_GROW_MIN_FILLFACTOR
 #undef SH_MAX_SIZE
+#undef SH_CREATE_PARAMETERS
 
 /* types */
 #undef SH_TYPE
-- 
2.53.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 43+ messages in thread


end of thread, other threads:[~2026-07-01 10:36 UTC | newest]

Thread overview: 43+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-11 21:26 [PATCH v1 1/1] fix some commented undefs Nathan Bossart <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>
2026-07-01 10:36 [PATCH v1 2/2] Collapse SH_CREATE() into a single definition Jonathan Gonzalez V. <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox