Revert "gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() (#133199)" (#133434)

This reverts commit 662dd294563ce86980c640ad67e3d460a72c9cb9.

The root issue was fixed by the
commit f554237b8ef6c60df651ac17eb0ef0c095cef185.
This commit is contained in:
Victor Stinner 2025-05-05 17:04:43 +02:00 committed by GitHub
parent 99a0d7e5b3
commit c336f1c312
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);