Skip to content

Commit

Permalink
add comment to prevent JuliaLang#6058 from recurring (see commit 4b4565f
Browse files Browse the repository at this point in the history
)
  • Loading branch information
stevengj authored and waTeim committed Nov 23, 2014
1 parent eecd769 commit c0886e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c0886e2

Please sign in to comment.