File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ function _pyjl_dealloc(o::C.PyPtr)
4848 # re-entrantly (the finalizer chain: push! → alloc → GC → py_finalizer →
4949 # enqueue → Py_DecRef → _pyjl_dealloc → push! on same vector →
5050 # ConcurrencyViolationError). The lock guards against true multi-thread races.
51- prev = Base. GC. enable (false )
51+ # prev = Base.GC.enable(false)
5252 # lock(PYJL_LOCK)
5353 PYJLVALUES[idx] = nothing
5454 push! (PYJLFREEVALUES, idx)
5555 # unlock(PYJL_LOCK)
56- Base. GC. enable (prev)
56+ # Base.GC.enable(prev)
5757 end
5858 (C. @ft UnsafePtr {PyJuliaValueObject} (o). weaklist[! ]) == C. PyNULL || C. PyObject_ClearWeakRefs (o)
5959 freeptr = C. PyType_GetSlot (C. Py_Type (o), C. Py_tp_free)
@@ -393,7 +393,7 @@ PyJuliaValue_SetValue(_o, @nospecialize(v)) = Base.GC.@preserve _o begin
393393 if idx == 0
394394 # Disable GC to prevent push!/pop! from triggering a GC whose finalizers
395395 # re-entrantly resize the same vectors (see _pyjl_dealloc comment).
396- prev = Base. GC. enable (false )
396+ # prev = Base.GC.enable(false)
397397 # lock(PYJL_LOCK)
398398 if isempty (PYJLFREEVALUES)
399399 push! (PYJLVALUES, v)
@@ -403,7 +403,7 @@ PyJuliaValue_SetValue(_o, @nospecialize(v)) = Base.GC.@preserve _o begin
403403 PYJLVALUES[idx] = v
404404 end
405405 # unlock(PYJL_LOCK)
406- Base. GC. enable (prev)
406+ # Base.GC.enable(prev)
407407 C. @ft UnsafePtr {PyJuliaValueObject} (o). value[] = idx
408408 else
409409 PYJLVALUES[idx] = v
You can’t perform that action at this time.
0 commit comments