Skip to content

Commit

Permalink
fix _crc32c used in loading.jl (#38105)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Oct 20, 2020
1 parent 7fa2d39 commit 0a1cbec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ _crc32c(io::IO, crc::UInt32=0x00000000) = _crc32c(io, typemax(Int64), crc)
_crc32c(io::IOStream, crc::UInt32=0x00000000) = _crc32c(io, filesize(io)-position(io), crc)
_crc32c(uuid::UUID, crc::UInt32=0x00000000) =
ccall(:jl_crc32c, UInt32, (UInt32, Ref{UInt128}, Csize_t), crc, uuid.value, 16)
_crc32c(x::Integer, crc::UInt32=0x00000000) =
ccall(:jl_crc32c, UInt32, (UInt32, Vector{UInt8}, Csize_t), crc, reinterpret(UInt8, [x]), sizeof(x))
_crc32c(x::UInt64, crc::UInt32=0x00000000) =
ccall(:jl_crc32c, UInt32, (UInt32, Ref{UInt64}, Csize_t), crc, x, 8)

"""
@kwdef typedef
Expand Down
1 change: 1 addition & 0 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ end
pkg = recurse_package(n...)
@test pkg == PkgId(UUID(uuid), n[end])
@test joinpath(@__DIR__, normpath(path)) == locate_package(pkg)
@test Base.compilecache_path(pkg) == Base.compilecache_path(pkg)
end
@test identify_package("Baz") == nothing
@test identify_package("Qux") == nothing
Expand Down

0 comments on commit 0a1cbec

Please sign in to comment.