diff --git a/base/string.jl b/base/string.jl index 07100f2b1d3a4..7640a53940c57 100644 --- a/base/string.jl +++ b/base/string.jl @@ -661,6 +661,7 @@ const memhash_seed = UInt === UInt64 ? 0x71e729fd56419c81 : 0x56419c81 function hash{T<:ByteString}(s::Union(T,SubString{T}), h::UInt) h += memhash_seed + # note: use pointer(s) here (see #6058). ccall(memhash, UInt, (Ptr{UInt8}, Csize_t, UInt32), pointer(s), sizeof(s), h % UInt32) + h end hash(s::AbstractString, h::UInt) = hash(bytestring(s), h)