Skip to content

Commit 6211ee2

Browse files
committed
Fix compat for julia < v1.5
1 parent 6408980 commit 6211ee2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/manual_wrappers.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ 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+
# rename isimmutable to ismutable #34652
40+
# https://github.com/JuliaLang/julia/pull/34652
41+
ismutable(@nospecialize(x)) = !isimmutable(x)
42+
end
3843
@assert ismutable(gsl_function(C_NULL, C_NULL))
3944

4045
function wrap_gsl_function(fn::F) where F

0 commit comments

Comments
 (0)