Skip to content

Commit

Permalink
compat for v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasIsensee committed Sep 14, 2024
1 parent c9cbb4e commit d92603b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/writing_datatypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ end

function h5convert!(out::Pointers, ::DataTypeODR, f::JLDFile, T::DataType, wsession::JLDWriteSession)
t = typename(T)
if T <: Function && Base.isgensym(nameof(T.instance))
if T <: Function && isgensym(nameof(T.instance))
@warn LazyString("Attempting to store ", T, ".\n",
"JLD2 only stores functions by name.\n",
" This may not be useful for anonymous functions.")
Expand Down
6 changes: 6 additions & 0 deletions src/julia_compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ end
end
else
using Base: @nospecializeinfer
end

@static if VERSION < v"1.7.0"
isgensym(s::Symbol) = `#` in string(s)
else
using Base: isgensym
end

0 comments on commit d92603b

Please sign in to comment.