From c8e9eaf9a39d99e9648470af9c004820d2509cd2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 21 Oct 2022 10:23:18 +0100 Subject: [PATCH] Revert "Optional optimization for `g_int64_hash`" This reverts commit c1af4b2b886bd77d6d8857cf3f677edbc0d34a61, which caused a regression on big-endian architectures (all 64-bit integers would hash to zero). Partially resolves #2787 Signed-off-by: Simon McVittie --- glib/ghash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/ghash.c b/glib/ghash.c index 0e6ba4882..59fd421d9 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -2494,7 +2494,7 @@ g_int64_equal (gconstpointer v1, guint g_int64_hash (gconstpointer v) { - return (guint) ((const guint) (*(guint64 *) v >> 32)) ^ (*(const guint *) v); + return (guint) *(const gint64*) v; } /**