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

Commit ac8eb97

Browse files
committed
Avoid redefining simplehash_allocate/simplehash_free.
There's no generic guard against multiple inclusion in this file, for good reason. But these typedefs need one, as per a report from Jeff Janes.
1 parent 565903a commit ac8eb97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/include/lib/simplehash.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@
8888
#define SH_ENTRY_HASH SH_MAKE_NAME(entry_hash)
8989

9090
/* Allocation function for hash table elements */
91+
#ifndef SIMPLEHASH_TYPEDEFS
92+
#define SIMPLEHASH_TYPEDEFS
9193
typedef void *(*simplehash_allocate) (Size size, void *args);
9294
typedef void (*simplehash_free) (void *pointer, void *args);
95+
#endif
9396

9497
/* generate forward declarations necessary to use the hash table */
9598
#ifdef SH_DECLARE

0 commit comments

Comments
 (0)