v9-0005-Remove-ULL.patch

application/x-patch

Filename: v9-0005-Remove-ULL.patch
Type: application/x-patch
Part: 6
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 v9-0005
Subject: Remove ULL
File+
src/include/common/hashfn_unstable.h 5 5
From 63b25e788c81bc47342f28e1e3e489fae8c61d26 Mon Sep 17 00:00:00 2001
From: John Naylor <john.naylor@postgresql.org>
Date: Thu, 14 Dec 2023 19:03:12 +0700
Subject: [PATCH v9 5/6] Remove ULL

---
 src/include/common/hashfn_unstable.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/include/common/hashfn_unstable.h b/src/include/common/hashfn_unstable.h
index a167681c86..e8ca39fed2 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 *= 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 *= 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 * 0x880355f21e6d1965);
 }
 
 static inline void
@@ -162,7 +162,7 @@ fasthash32(const unsigned char * k, int len, uint64 seed)
 // This function is generated using the framework provided.
 static inline uint64_t mix(uint64_t h) {
 	h ^= h >> 23;
-	h *= 0x2127599bf4325c37ULL;
+	h *= 0x2127599bf4325c37;
 	h ^= h >> 47;
 	return h;
 }
@@ -170,7 +170,7 @@ static inline uint64_t mix(uint64_t h) {
 static inline
 uint64_t fasthash64_orig(const void *buf, size_t len, uint64_t seed)
 {
-	const uint64_t    m = 0x880355f21e6d1965ULL;
+	const uint64_t    m = 0x880355f21e6d1965;
 	const uint64_t *pos = (const uint64_t *)buf;
 	const uint64_t *end = pos + (len / 8);
 	const unsigned char *pos2;
-- 
2.43.0