From 27478643ba8cef82a2cd6c4a5346e5d5446b425a Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Fri, 7 Nov 2014 15:31:56 -0500 Subject: [PATCH] add comment to prevent #6058 from recurring (see commit 4b4565fdd68f2fb1ab839ab409963a19201df1d4) --- base/string.jl | 1 + 1 file changed, 1 insertion(+) 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)