From 7416a25418fbc576fc549b9a31cc44d219501c92 Mon Sep 17 00:00:00 2001 From: John Naylor Date: Sat, 9 Dec 2023 16:14:04 +0700 Subject: [PATCH v7 03/13] Add UINT64CONST (not sure when we actually need that) fasthash*_orig left alone for now. --- src/include/common/hashfn_unstable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/common/hashfn_unstable.h b/src/include/common/hashfn_unstable.h index fbae7a5522..7ed1e5335a 100644 --- a/src/include/common/hashfn_unstable.h +++ b/src/include/common/hashfn_unstable.h @@ -56,7 +56,7 @@ static inline uint64 fasthash_mix(uint64 h) { h ^= h >> 23; - h *= 0x2127599bf4325c37ULL; + h *= UINT64CONST(0x2127599bf4325c37); h ^= h >> 47; return h; } @@ -65,7 +65,7 @@ static inline void fasthash_combine(fasthash_state* hs) { hs->hash ^= fasthash_mix(hs->accum); - hs->hash *= 0x880355f21e6d1965ULL; + hs->hash *= UINT64CONST(0x880355f21e6d1965); /* reset hash state for next input */ hs->accum = 0; @@ -79,7 +79,7 @@ fasthash_init(fasthash_state *hs, int len, uint64 seed) // since we don't know the length for a nul-terminated string // handle some other way -- maybe we can accum the length in // the state and fold it in during the finalizer (cf. xxHash3) - hs->hash = seed ^ (len * 0x880355f21e6d1965ULL); + hs->hash = seed ^ (len * UINT64CONST(0x880355f21e6d1965)); } static inline void -- 2.43.0