--- a/src/hash_key.c Wed Dec 24 12:00:33 2025 +0100 +++ b/src/hash_key.c Wed Dec 24 12:13:59 2025 +0100 @@ -82,56 +82,6 @@ key->hash = h; } - -uint32_t cx_hash_u32(uint32_t x) { - x = ((x >> 16) ^ x) * 0x45d9f3bu; - x = ((x >> 16) ^ x) * 0x45d9f3bu; - x = (x >> 16) ^ x; - return x; -} - -uint64_t cx_hash_u64(uint64_t x) { - x = (x ^ (x >> 30)) * UINT64_C(0xbf58476d1ce4e5b9); - x = (x ^ (x >> 27)) * UINT64_C(0x94d049bb133111eb); - x = x ^ (x >> 31); - return x; -} - -CxHashKey cx_hash_key_str(const char *str) { - CxHashKey key; - key.data = str; - key.len = str == NULL ? 0 : strlen(str); - cx_hash_murmur(&key); - return key; -} - -CxHashKey cx_hash_key_ustr(unsigned const char *str) { - CxHashKey key; - key.data = str; - key.len = str == NULL ? 0 : strlen((const char*)str); - cx_hash_murmur(&key); - return key; -} - -CxHashKey cx_hash_key_cxstr(cxstring str) { - return cx_hash_key(str.ptr, str.length); -} - -CxHashKey cx_hash_key_mutstr(cxmutstr str) { - return cx_hash_key(str.ptr, str.length); -} - -CxHashKey cx_hash_key_bytes( - const unsigned char *bytes, - size_t len -) { - CxHashKey key; - key.data = bytes; - key.len = len; - cx_hash_murmur(&key); - return key; -} - CxHashKey cx_hash_key( const void *obj, size_t len @@ -143,22 +93,6 @@ return key; } -CxHashKey cx_hash_key_u32(uint32_t x) { - CxHashKey key; - key.data = NULL; - key.len = 0; - key.hash = cx_hash_u32(x); - return key; -} - -CxHashKey cx_hash_key_u64(uint64_t x) { - CxHashKey key; - key.data = NULL; - key.len = 0; - key.hash = cx_hash_u64(x); - return key; -} - int cx_hash_key_cmp(const void *l, const void *r) { const CxHashKey *left = l; const CxHashKey *right = r;