From a1d470a884c0d641b6c03ff67f5de261d7f2eaaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kenta=20Sato=20=28=E4=BD=90=E8=97=A4=20=E5=BB=BA=E5=A4=AA?= =?UTF-8?q?=29?= Date: Wed, 3 Jan 2018 18:39:53 +0900 Subject: [PATCH] use Cvoid instead of Void (#11) --- src/CodecZlib.jl | 5 +++++ src/libz.jl | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/CodecZlib.jl b/src/CodecZlib.jl index 2b68193..685ad99 100644 --- a/src/CodecZlib.jl +++ b/src/CodecZlib.jl @@ -39,6 +39,11 @@ function splitkwargs(kwargs, keys) return hits, others end +# For compatibility. +if !isdefined(Base, :Cvoid) + const Cvoid = Void +end + include("libz.jl") include("compression.jl") include("decompression.jl") diff --git a/src/libz.jl b/src/libz.jl index e829d45..a1de796 100644 --- a/src/libz.jl +++ b/src/libz.jl @@ -11,11 +11,11 @@ mutable struct ZStream total_out::Culong msg::Ptr{UInt8} - state::Ptr{Void} + state::Ptr{Cvoid} - zalloc::Ptr{Void} - zfree::Ptr{Void} - opaque::Ptr{Void} + zalloc::Ptr{Cvoid} + zfree::Ptr{Cvoid} + opaque::Ptr{Cvoid} data_type::Cint