Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up and export crc32c function #22274

Merged
merged 14 commits into from
Jun 13, 2017
Prev Previous commit
Next Next commit
slight optimization (don't open cachefile twice for checksum)
  • Loading branch information
stevengj committed Jun 7, 2017
commit c3f5d91e9874c4b02f4974b3fd6680227597aff0
5 changes: 2 additions & 3 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,8 @@ function compilecache(name::String)
end
if success(create_expr_cache(path, cachefile, concrete_deps))
# append checksum to the end of the .ji file:
checksum = crc32c(cachefile)
open(cachefile, "a") do f
write(f, hton(checksum))
open(cachefile, "a+") do f
write(f, hton(crc32c(seekstart(f), filesize(f))))
end
else
error("Failed to precompile $name to $cachefile.")
Expand Down