Skip to content

Commit

Permalink
JuliaInterface: fix compilation with Julia >= 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jul 27, 2021
1 parent 0ee2ef4 commit c9820aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/JuliaInterface/src/JuliaInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ Obj Func_JULIAINTERFACE_INTERNAL_INIT(Obj self)

jl_value_t * gap_box_gapffe(Obj value)
{
jl_ptls_t ptls = jl_get_ptls_states();
#if (JULIA_VERSION_MAJOR * 100 + JULIA_VERSION_MINOR) <= 106
jl_ptls_t ptls = jl_get_ptls_states();
#else
jl_ptls_t ptls = jl_get_current_task()->ptls;
#endif
jl_value_t * v = jl_gc_alloc_typed(ptls, sizeof(Obj), JULIA_GAPFFE_type);
*(Obj *)jl_data_ptr(v) = value;
return v;
Expand Down

0 comments on commit c9820aa

Please sign in to comment.