Skip to content

Commit 09e51bc

Browse files
committed
fix for JuliaLang/julia#16893; note that cconvert is not available on 0.3
1 parent 400c3b3 commit 09e51bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/runtests.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@ end
399399

400400
# Cstring
401401
let s = "foo"
402-
@test reinterpret(Ptr{Cchar}, Compat.unsafe_convert(Cstring, s.data)) == pointer(s)
402+
# note: need cconvert in 0.5 because of JuliaLang/julia#16893
403+
@test reinterpret(Ptr{Cchar}, Compat.unsafe_convert(Cstring, VERSION < v"0.4" ? s : Base.cconvert(Cstring, s))) == pointer(s)
403404
if VERSION < v"0.5.0-dev+4859"
404405
let w = wstring("foo")
405406
@test reinterpret(Ptr{Cwchar_t}, Compat.unsafe_convert(Cwstring, w)) == pointer(w)

0 commit comments

Comments
 (0)