Skip to content

Commit

Permalink
Remove custom version of ascii. Ref JuliaLang/julia#15773
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Apr 11, 2016
1 parent d9c91cc commit efc37c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/handle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ end

"Returns the targeted architecture"
function get_arch(hdl::Handle)
ptr_to_ascii(ccall((:alpm_option_get_arch, libalpm), Ptr{UInt8},
(Ptr{Void},), hdl))
ascii(ccall((:alpm_option_get_arch, libalpm),
Ptr{UInt8}, (Ptr{Void},), hdl))
end
"Sets the targeted architecture"
function set_arch(hdl::Handle, arch)
Expand Down
4 changes: 2 additions & 2 deletions src/pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ get_db(pkg::Pkg) =

"Returns the base64 encoded package signature"
get_base64_sig(pkg::Pkg) =
ptr_to_ascii(ccall((:alpm_pkg_get_base64_sig, libalpm),
Ptr{UInt8}, (Ptr{Void},), pkg))
ascii(ccall((:alpm_pkg_get_base64_sig, libalpm),
Ptr{UInt8}, (Ptr{Void},), pkg))

"Returns the method used to validate a package during install"
get_validation(pkg::Pkg) =
Expand Down
3 changes: 1 addition & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
end

@inline ptr_to_utf8(p::Ptr, own=false) = UTF8String(pchar_to_array(p, own))
@inline ptr_to_ascii(p::Ptr, own=false) = ASCIIString(pchar_to_array(p, own))

version() =
VersionNumber(ptr_to_ascii(ccall((:alpm_version, libalpm), Ptr{UInt8}, ())))
VersionNumber(ascii(ccall((:alpm_version, libalpm), Ptr{UInt8}, ())))
capabilities() = ccall((:alpm_capabilities, libalpm), UInt32, ())

# checksums
Expand Down

0 comments on commit efc37c6

Please sign in to comment.