agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH v13 03/18] WIP: Add SKIPVALID flag for more integration 145+ messages / 2 participants [nested] [flat]
* [PATCH v13 03/18] WIP: Add SKIPVALID flag for more integration @ 2020-10-30 21:23 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 145+ messages in thread From: Justin Pryzby @ 2020-10-30 21:23 UTC (permalink / raw) XXX: this breaks progress reporting? --- src/backend/commands/indexcmds.c | 36 +++++++++++++++----------------- src/include/catalog/index.h | 1 + 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index d6567ec231..10d4da136f 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -1628,40 +1628,33 @@ DefineIndex(Oid relationId, return address; } -/* Reindex invalid child indexes created earlier */ +/* + * Reindex invalid child indexes created earlier thereby validating + * the parent index. + */ static void reindex_invalid_child_indexes(Oid indexRelationId) { - ListCell *lc; - int npart = 0; ReindexParams params = { - .options = REINDEXOPT_CONCURRENTLY + .options = REINDEXOPT_CONCURRENTLY | REINDEXOPT_SKIPVALID }; - PreventInTransactionBlock(true, "REINDEX INDEX"); - - foreach (lc, find_inheritance_children(indexRelationId, ShareLock)) - { - Oid partoid = lfirst_oid(lc); - - if (!get_index_isvalid(partoid) && - RELKIND_HAS_STORAGE(get_rel_relkind(partoid))) - ReindexRelationConcurrently(partoid, ¶ms); - - pgstat_progress_update_param(PROGRESS_CREATEIDX_PARTITIONS_DONE, - npart++); - } - /* * CIC needs to mark a partitioned index as VALID, which itself * requires setting READY, which is unset for CIC (even though * it's meaningless for an index without storage). * This must be done only while holding a lock which precludes adding * partitions. - * See also: validatePartitionedIndex(). */ CommandCounterIncrement(); index_set_state_flags(indexRelationId, INDEX_CREATE_SET_READY); + + /* + * Process each partition listed in a separate transaction. Note that + * this commits and then starts a new transaction immediately. + */ + ReindexPartitions(indexRelationId, ¶ms, true); + CommandCounterIncrement(); index_set_state_flags(indexRelationId, INDEX_CREATE_SET_VALID); } @@ -3085,6 +3078,11 @@ ReindexPartitions(Oid relid, ReindexParams *params, bool isTopLevel) if (!RELKIND_HAS_STORAGE(partkind)) continue; + /* Skip invalid indexes, if requested */ + if ((params->options & REINDEXOPT_SKIPVALID) != 0 && + get_index_isvalid(partoid)) + continue; + Assert(partkind == RELKIND_INDEX || partkind == RELKIND_RELATION); diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index e22d506436..994fe94fa1 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -42,6 +42,7 @@ typedef struct ReindexParams #define REINDEXOPT_REPORT_PROGRESS 0x02 /* report pgstat progress */ #define REINDEXOPT_MISSING_OK 0x04 /* skip missing relations */ #define REINDEXOPT_CONCURRENTLY 0x08 /* concurrent mode */ +#define REINDEXOPT_SKIPVALID 0x10 /* skip valid indexes */ /* state info for validate_index bulkdelete callback */ typedef struct ValidateIndexState -- 2.17.0 --QTprm0S8XgL7H0Dt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v13-0004-ReindexPartitions-to-set-indisvalid.patch" ^ permalink raw reply [nested|flat] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ messages in thread
end of thread, other threads:[~2026-07-01 10:36 UTC | newest] Thread overview: 145+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-10-30 21:23 [PATCH v13 03/18] WIP: Add SKIPVALID flag for more integration Justin Pryzby <[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]> 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]> 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]> 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