We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29dc91c commit 1ce2749Copy full SHA for 1ce2749
src/GC/GC.jl
@@ -103,7 +103,7 @@ function enqueue(ptr::C.PyPtr)
103
end
104
105
function enqueue_all(ptrs)
106
- if any(!=(C.PYNULL), ptrs) && C.CTX.is_initialized
+ if any(!=(C.PyNULL), ptrs) && C.CTX.is_initialized
107
if C.PyGILState_Check() == 1
108
for ptr in ptrs
109
if ptr != C.PyNULL
test/JlWrap.jl
@@ -577,4 +577,13 @@ end
577
@test pyeq(Bool, x.count(nothing), 0)
578
@test pyeq(Bool, x.count("2"), 0)
579
580
+
581
+ @testset "PyObjectArray" begin
582
+ # https://github.com/JuliaPy/PythonCall.jl/issues/543
583
+ # Here we check the finalizer does not error
584
+ # We must not reuse `arr` in this code once we finalize it!
585
+ let arr = PyObjectArray([1, 2, 3])
586
+ finalize(arr)
587
+ end
588
589
0 commit comments