From 1552add5193d0eb4ce747a3ca127572027b5c90a Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Tue, 20 Oct 2020 10:33:44 +0200 Subject: [PATCH] fix usage of _crc32c --- base/util.jl | 4 ++-- test/loading.jl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base/util.jl b/base/util.jl index 32f0a173eac22..0e7087890f81b 100644 --- a/base/util.jl +++ b/base/util.jl @@ -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 diff --git a/test/loading.jl b/test/loading.jl index 89bc6887e9b64..557ba587f7e68 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -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