]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-127705: Don't call _Py_ForgetReference before _Py_Dealloc (GH-131508)
authorMark Shannon <mark@hotpy.org>
Thu, 20 Mar 2025 15:45:43 +0000 (15:45 +0000)
committerGitHub <noreply@github.com>
Thu, 20 Mar 2025 15:45:43 +0000 (15:45 +0000)
Include/internal/pycore_object.h

index 08cbfe46b0daff917b21746ed085752ffde6e579..30b88404bbe2049be3fe316942d73a9ca141617f 100644 (file)
@@ -445,9 +445,6 @@ static inline void Py_DECREF_MORTAL(const char *filename, int lineno, PyObject *
         _Py_DECREF_DecRefTotal();
     }
     if (--op->ob_refcnt == 0) {
-#ifdef Py_TRACE_REFS
-        _Py_ForgetReference(op);
-#endif
         _Py_Dealloc(op);
     }
 }