mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
GH-127705: Handle trace refs in specialized decref (GH-131198)
This is missing `_PyReftracerTrack` calls, see gh-131238. Merging as-is for the 3.14.0a6 release.
This commit is contained in:
parent
fc07f863ee
commit
67af96c61c
1 changed files with 6 additions and 0 deletions
|
|
@ -416,6 +416,9 @@ static inline void _Py_DECREF_MORTAL_SPECIALIZED(const char *filename, int linen
|
|||
_Py_DECREF_DecRefTotal();
|
||||
}
|
||||
if (--op->ob_refcnt == 0) {
|
||||
#ifdef Py_TRACE_REFS
|
||||
_Py_ForgetReference(op);
|
||||
#endif
|
||||
destruct(op);
|
||||
}
|
||||
}
|
||||
|
|
@ -460,6 +463,9 @@ static inline void Py_DECREF_MORTAL_SPECIALIZED(PyObject *op, destructor destruc
|
|||
assert(!_Py_IsStaticImmortal(op));
|
||||
_Py_DECREF_STAT_INC();
|
||||
if (--op->ob_refcnt == 0) {
|
||||
#ifdef Py_TRACE_REFS
|
||||
_Py_ForgetReference(op);
|
||||
#endif
|
||||
destruct(op);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue