File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -758,6 +758,7 @@ static inline Py_ALWAYS_INLINE void Py_INCREF(PyObject *op)
758
758
uint32_t local = _Py_atomic_load_uint32_relaxed (& op -> ob_ref_local );
759
759
uint32_t new_local = local + 1 ;
760
760
if (new_local == 0 ) {
761
+ // local is equal to _Py_IMMORTAL_REFCNT: do nothing
761
762
return ;
762
763
}
763
764
if (_Py_IsOwnedByCurrentThread (op )) {
@@ -771,6 +772,8 @@ static inline Py_ALWAYS_INLINE void Py_INCREF(PyObject *op)
771
772
PY_UINT32_T cur_refcnt = op -> ob_refcnt_split [PY_BIG_ENDIAN ];
772
773
PY_UINT32_T new_refcnt = cur_refcnt + 1 ;
773
774
if (new_refcnt == 0 ) {
775
+ // cur_refcnt is equal to _Py_IMMORTAL_REFCNT: the object is immortal,
776
+ // do nothing
774
777
return ;
775
778
}
776
779
op -> ob_refcnt_split [PY_BIG_ENDIAN ] = new_refcnt ;
You can’t perform that action at this time.
0 commit comments