Skip to content

Commit b3745ff

Browse files
committed
Fix compat by copy ismutable def from julia
1 parent 9f9b4e2 commit b3745ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/manual_wrappers.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ gsl_function_helper(x::Cdouble, fn)::Cdouble = fn(x)
3535
# The following code relies on `gsl_function` being a mutable type
3636
# (such that we can call `pointer_from_objref` on it) to simplify the object structure
3737
# a little bit and avoid hitting some limitation of the allocation optimizer.
38-
@static if VERSION >= v"1.5"
39-
@assert ismutable(gsl_function(C_NULL, C_NULL))
38+
@static if VERSION < v"1.5"
39+
# rename isimmutable to ismutable #34652
40+
# https://github.com/JuliaLang/julia/pull/34652
41+
ismutable(@nospecialize(x)) = !isimmutable(x)
4042
else
41-
@assert !isimmutable(gsl_function(C_NULL, C_NULL))
42-
end
43+
@assert ismutable(gsl_function(C_NULL, C_NULL))
4344

4445
function wrap_gsl_function(fn::F) where F
4546
# We need to allocate the `gsl_function` here to be kept alive by ccall

0 commit comments

Comments
 (0)