Use 64-bit TommyDS hash functions on 64-bit architectures
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run

This commit is contained in:
Andrea Mazzoleni 2026-10-07 19:13:27 +02:00
parent 8e7b4c6c8f
commit 85058c932c
5 changed files with 42 additions and 18 deletions

View file

@ -30,9 +30,13 @@ struct snapraid_pool* pool_alloc(const char* dir, const char* name, const char*
return pool;
}
static inline tommy_uint32_t pool_hash(const char* file)
static inline tommy_hash_t pool_hash(const char* file)
{
#if TOMMY_SIZE_BIT == 64
return tommy_hash_u64(0, file, strlen(file));
#else
return tommy_hash_u32(0, file, strlen(file));
#endif
}
static void pool_free(void* void_pool)