https://github.com/python/cpython/commit/662dd294563ce86980c640ad67e3d460a72c9cb9
commit: 662dd294563ce86980c640ad67e3d460a72c9cb9
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2025-05-01T13:42:42+02:00
summary:
gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() (#133199)
Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not fail
if the method was already untracked.
files:
M Objects/classobject.c
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 58e1d17977322e..b5df3d1a41b5f9 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -244,7 +244,7 @@ static void
method_dealloc(PyObject *self)
{
PyMethodObject *im = _PyMethodObject_CAST(self);
- _PyObject_GC_UNTRACK(im);
+ PyObject_GC_UnTrack(im);
if (im->im_weakreflist != NULL)
PyObject_ClearWeakRefs((PyObject *)im);
Py_DECREF(im->im_func);
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]