Skip to content

Commit d09167e

Browse files
committed
pythongh-132280: Fix method_dealloc(): use PyObject_GC_UnTrack()
Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not fail if the method was already untracked.
1 parent b1f8938 commit d09167e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/classobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static void
244244
method_dealloc(PyObject *self)
245245
{
246246
PyMethodObject *im = _PyMethodObject_CAST(self);
247-
_PyObject_GC_UNTRACK(im);
247+
PyObject_GC_UnTrack(im);
248248
if (im->im_weakreflist != NULL)
249249
PyObject_ClearWeakRefs((PyObject *)im);
250250
Py_DECREF(im->im_func);

0 commit comments

Comments
 (0)