From f4f386983ae4a04a43ce5cef982bb63ab47bfc46 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 28 Oct 2025 11:44:23 +0100 Subject: [PATCH] Use a 32 bit seed for tommy_strhash_u32 The previous 64 bit high part was anyway ignored. --- tommyds/tommyhash.c | 2 +- tommyds/tommyhash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tommyds/tommyhash.c b/tommyds/tommyhash.c index 71c4ef36..dd7546c5 100644 --- a/tommyds/tommyhash.c +++ b/tommyds/tommyhash.c @@ -165,7 +165,7 @@ tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tom return c + ((tommy_uint64_t)b << 32); } -tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key) +tommy_uint32_t tommy_strhash_u32(tommy_uint32_t init_val, const void* void_key) { const unsigned char* key = tommy_cast(const unsigned char*, void_key); tommy_uint32_t a, b, c; diff --git a/tommyds/tommyhash.h b/tommyds/tommyhash.h index e9bdba0f..0715fbec 100644 --- a/tommyds/tommyhash.h +++ b/tommyds/tommyhash.h @@ -93,7 +93,7 @@ tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tom * This function is endianness independent. * \return The hash value of 32 bits. */ -tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key); +tommy_uint32_t tommy_strhash_u32(tommy_uint32_t init_val, const void* void_key); /** * Integer reversible hash function for 32 bits.