Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

Commit

Permalink
Fix build inconsistencies (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat authored and ararslan committed Sep 9, 2016
1 parent 522987e commit 8b0f045
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ else
end), zstd)
end

@BinDeps.install Dict(:libzstd => :libzstd)
@BinDeps.install Dict(:zstd => :libzstd)
6 changes: 3 additions & 3 deletions src/ZStd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Base.showerror(io::IO, ex::ZStdError) = print(io, "ZStd: " * ex.msg)

# Determine whether the input represents a zstd error, yes => throw it, no => return it
function check_zstd_error(code::Csize_t)
iserr = Bool(ccall((:ZSTD_isError, :libzstd), Cuint, (Csize_t, ), code))
iserr = Bool(ccall((:ZSTD_isError, libzstd), Cuint, (Csize_t, ), code))
if iserr
msg = unsafe_string(ccall((:ZSTD_getErrorName, :libzstd), Ptr{Cchar}, (Csize_t, ), code))
msg = unsafe_string(ccall((:ZSTD_getErrorName, libzstd), Ptr{Cchar}, (Csize_t, ), code))
throw(ZStdError(msg))
end
return code # input is not an error
Expand All @@ -33,7 +33,7 @@ end
An integer representing the maximum compression level available.
"""
const MAX_COMPRESSION = Int(ccall((:ZSTD_maxCLevel, :libzstd), Cint, ()))
const MAX_COMPRESSION = Int(ccall((:ZSTD_maxCLevel, libzstd), Cint, ()))


end # module

0 comments on commit 8b0f045

Please sign in to comment.