We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90f4ea5 commit 38527e1Copy full SHA for 38527e1
1 file changed
src/C/extras.jl
@@ -43,11 +43,12 @@ CTX.is_free_threaded` throughout the code.
43
"""
44
macro ft(ex)
45
ex_ft = _ft_transform(ex)
46
- return :(if CTX.is_free_threaded
47
- $(esc(ex_ft))
+ ctx = GlobalRef(@__MODULE__, :CTX)
+ return esc(:(if $ctx.is_free_threaded
48
+ $ex_ft
49
else
- $(esc(ex))
50
- end)
+ $ex
51
+ end))
52
end
53
54
Py_Type(x) = Base.GC.@preserve x @ft PyPtr(UnsafePtr{PyObject}(asptr(x)).type[!])
0 commit comments