Skip to content

Commit

Permalink
hashing of general objects was far too simple (fixes #20744)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Feb 23, 2017
1 parent 4275c74 commit df00880
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/hashing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hash(w::WeakRef, h::UInt) = hash(w.value, h)

## hashing general objects ##

hash(x::ANY, h::UInt) = 3*object_id(x) - h
hash(x::ANY, h::UInt) = hash_uint(3*object_id(x) - h)

## core data hashing functions ##

Expand Down Expand Up @@ -55,7 +55,6 @@ end

## symbol & expression hashing ##

hash(x::Symbol, h::UInt) = 3*object_id(x) - h
if UInt === UInt64
hash(x::Expr, h::UInt) = hash(x.args, hash(x.head, h + 0x83c7900696d26dc6))
else
Expand Down

0 comments on commit df00880

Please sign in to comment.