diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-06-17 15:20:12 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-06-17 15:20:12 +0100 |
commit | dc5d99e5cf918d594f52dfce7c7250eb1da8c766 (patch) | |
tree | 5d98e3335b3d1d76432e3c534b697fa84ea5ef34 /contrib | |
parent | c477b4b5252adb3150ec7dfb761383e3e619453c (diff) | |
download | rspamd-dc5d99e5cf918d594f52dfce7c7250eb1da8c766.tar.gz rspamd-dc5d99e5cf918d594f52dfce7c7250eb1da8c766.zip |
[Minor] Add utility macros for static hash tables
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libucl/khash.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/libucl/khash.h b/contrib/libucl/khash.h index 6085aff9d..1499d75a9 100644 --- a/contrib/libucl/khash.h +++ b/contrib/libucl/khash.h @@ -467,6 +467,7 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key) @return Pointer to the hash table [khash_t(name)*] */ #define kh_init(name) kh_init_##name() +#define kh_static_init(name, h) kh_static_init_##name(h) /*! @function @abstract Destroy a hash table. @@ -474,6 +475,7 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key) @param h Pointer to the hash table [khash_t(name)*] */ #define kh_destroy(name, h) kh_destroy_##name(h) +#define kh_static_destroy(name, h) kh_static_destroy_##name(h) /*! @function @abstract Reset a hash table without deallocating memory. |