v6-0003-Add-UINT64CONST-not-sure-when-we-actually-need-th.patch

text/x-patch

Filename: v6-0003-Add-UINT64CONST-not-sure-when-we-actually-need-th.patch
Type: text/x-patch
Part: 1
Message: Re: Change GUC hashtable to use simplehash?

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v6-0003
Subject: Add UINT64CONST (not sure when we actually need that)
File+
src/include/common/hashfn_unstable.h 3 3
From 4b2080bee986da18077fe2055558e49ab7752086 Mon Sep 17 00:00:00 2001
From: John Naylor <john.naylor@postgresql.org>
Date: Sat, 9 Dec 2023 16:14:04 +0700
Subject: [PATCH v6 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 e5288ae723..b278c72f90 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