Skip to content

Commit 662dd29

Browse files
authored
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.
1 parent 474f296 commit 662dd29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/classobject.c

Lines changed: 1 addition & 1 deletion
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)