Skip to content

Commit a1d470a

Browse files
authored
use Cvoid instead of Void (#11)
1 parent 7bbef28 commit a1d470a

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/CodecZlib.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ function splitkwargs(kwargs, keys)
3939
return hits, others
4040
end
4141

42+
# For compatibility.
43+
if !isdefined(Base, :Cvoid)
44+
const Cvoid = Void
45+
end
46+
4247
include("libz.jl")
4348
include("compression.jl")
4449
include("decompression.jl")

src/libz.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ mutable struct ZStream
1111
total_out::Culong
1212

1313
msg::Ptr{UInt8}
14-
state::Ptr{Void}
14+
state::Ptr{Cvoid}
1515

16-
zalloc::Ptr{Void}
17-
zfree::Ptr{Void}
18-
opaque::Ptr{Void}
16+
zalloc::Ptr{Cvoid}
17+
zfree::Ptr{Cvoid}
18+
opaque::Ptr{Cvoid}
1919

2020
data_type::Cint
2121

0 commit comments

Comments
 (0)