From a1c98383fa7b4452a6fc4c395c278f3c00f4e0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1ll=20Haraldsson?= Date: Wed, 13 Aug 2025 23:17:54 +0000 Subject: [PATCH 1/2] Fix for newer Julia - Update utils.jl --- src/utils.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index d1efe22e..e715dbe5 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -579,8 +579,12 @@ struct PointerString end function Base.hash(s::PointerString, h::UInt) - h += Base.memhash_seed - ccall(Base.memhash, UInt, (Ptr{UInt8}, Csize_t, UInt32), s.ptr, s.len, h % UInt32) + h + @static if isdefined(Base, :hash_bytes) + GC.@preserve s.ptr Base.hash_bytes(s.str), s.len, UInt64(h), Base.HASH_SECRET) % UInt + else + h += Base.memhash_seed + ccall(Base.memhash, UInt, (Ptr{UInt8}, Csize_t, UInt32), s.ptr, s.len, h % UInt32) + h + end end import Base: == From 62574669326ac3481410cfa73b4209e24cb22fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1ll=20Haraldsson?= Date: Wed, 13 Aug 2025 23:26:50 +0000 Subject: [PATCH 2/2] Update utils.jl --- src/utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.jl b/src/utils.jl index e715dbe5..475fa41b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -580,7 +580,7 @@ end function Base.hash(s::PointerString, h::UInt) @static if isdefined(Base, :hash_bytes) - GC.@preserve s.ptr Base.hash_bytes(s.str), s.len, UInt64(h), Base.HASH_SECRET) % UInt + GC.@preserve s.ptr Base.hash_bytes(s.str, s.len, UInt64(h), Base.HASH_SECRET) % UInt else h += Base.memhash_seed ccall(Base.memhash, UInt, (Ptr{UInt8}, Csize_t, UInt32), s.ptr, s.len, h % UInt32) + h