From 887458511122db05b59d982b0c17c129f2705e2e Mon Sep 17 00:00:00 2001 From: jverzani Date: Wed, 20 Sep 2023 08:47:51 -0400 Subject: [PATCH] rm hashsalt --- src/PyCall.jl | 4 ++-- src/precompile.jl | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PyCall.jl b/src/PyCall.jl index 7fc9f2a8..a92cce8f 100644 --- a/src/PyCall.jl +++ b/src/PyCall.jl @@ -271,9 +271,9 @@ end # computing hashes of PyObjects const pysalt = hash("PyCall.PyObject") # "salt" to mix in to PyObject hashes -hashsalt(x) = hash(x, pysalt) -function hash(o::PyObject, salt::UInt64=pysalt) +function hash(o::PyObject, salt::UInt=zero(UInt)) + salt ⊻= pysalt if ispynull(o) hash(C_NULL, salt) elseif is_pyjlwrap(o) diff --git a/src/precompile.jl b/src/precompile.jl index cdd75906..3cf0aac3 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -372,7 +372,6 @@ precompile(Tuple{typeof(getproperty), PyDict{Int64, String, true}, Symbol}) precompile(Tuple{typeof(getproperty), PyError, Symbol}) precompile(Tuple{typeof(getproperty), PyObject, String}) precompile(Tuple{typeof(hash), PyObject}) -precompile(Tuple{typeof(hashsalt), Function}) precompile(Tuple{typeof(hasproperty), PyObject, String}) precompile(Tuple{typeof(hasproperty), PyObject, Symbol}) precompile(Tuple{typeof(hassym), Ptr{Nothing}, Symbol}) @@ -528,4 +527,4 @@ precompile(Tuple{typeof(unsafe_load), Ptr{Ptr{PyObject_struct}}}) precompile(Tuple{typeof(weakref_callback), Ptr{PyObject_struct}, Ptr{PyObject_struct}}) precompile(Tuple{typeof(xor), Int64, PyObject}) precompile(Tuple{typeof(xor), PyObject, Int64}) -precompile(Tuple{typeof(xor), PyObject, PyObject}) \ No newline at end of file +precompile(Tuple{typeof(xor), PyObject, PyObject})