Skip to content

Commit

Permalink
Fix compat for julia < v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
inkydragon committed Dec 14, 2024
1 parent 6408980 commit 6211ee2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/manual_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ gsl_function_helper(x::Cdouble, fn)::Cdouble = fn(x)
# The following code relies on `gsl_function` being a mutable type
# (such that we can call `pointer_from_objref` on it) to simplify the object structure
# a little bit and avoid hitting some limitation of the allocation optimizer.
@static if VERSION < v"1.5"
# rename isimmutable to ismutable #34652
# https://github.com/JuliaLang/julia/pull/34652
ismutable(@nospecialize(x)) = !isimmutable(x)
end
@assert ismutable(gsl_function(C_NULL, C_NULL))

function wrap_gsl_function(fn::F) where F
Expand Down

0 comments on commit 6211ee2

Please sign in to comment.