Skip to content

Commit

Permalink
rm hashsalt
Browse files Browse the repository at this point in the history
  • Loading branch information
jverzani committed Sep 20, 2023
1 parent 3ffedc7 commit 8874585
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/PyCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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})
precompile(Tuple{typeof(xor), PyObject, PyObject})

0 comments on commit 8874585

Please sign in to comment.