Skip to content

Commit

Permalink
move hash(WeakRef) into base/hashing.jl also (not needed so early).
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Apr 28, 2014
1 parent 660c018 commit 04908d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ isequal(w::WeakRef, v::WeakRef) = isequal(w.value, v.value)
isequal(w::WeakRef, v) = isequal(w.value, v)
isequal(w, v::WeakRef) = isequal(w, v.value)

hash(w::WeakRef, h::Uint) = hash(w.value, h)

function finalizer(o::ANY, f::Union(Function,Ptr))
if isimmutable(o)
error("objects of type ", typeof(o), " cannot be finalized")
Expand Down
1 change: 1 addition & 0 deletions base/hashing.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## hashing a single value ##

hash(x::Any) = hash(x, zero(Uint))
hash(w::WeakRef, h::Uint) = hash(w.value, h)

## core data hashing functions ##

Expand Down

0 comments on commit 04908d4

Please sign in to comment.