From 6329c5712632491e3a01aa71006067abeec581b4 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 27 Feb 2024 09:52:59 +0100 Subject: [PATCH] fix version check for `MemoryRef` --- src/jltetgenio.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jltetgenio.jl b/src/jltetgenio.jl index 47e7b45..a01579f 100644 --- a/src/jltetgenio.jl +++ b/src/jltetgenio.jl @@ -256,7 +256,7 @@ function unsafe_array_convert(P::Type{Ptr{T1}}, x::Vector{T2}) where {T1, T2} Ptr{T1}(Base.unsafe_convert(Ptr{T2}, x)) end -@static if VERSION > v"1.10" +if isdefined(Base, :MemoryRef) function unsafe_array_convert(P::Type{Ptr{T1}}, x::MemoryRef{T2}) where {T1, T2} Ptr{T1}(Base.unsafe_convert(Ptr{T2}, x)) end