Skip to content

Commit 3b1880f

Browse files
Remove unused part
1 parent 77bab2e commit 3b1880f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Objects/object.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,15 +1773,6 @@ _PyObject_GetMethodStackRef(PyThreadState *ts, _PyStackRef *self,
17731773
PyObject *res = PyObject_GetAttr(obj, name);
17741774
PyStackRef_CLEAR(*self);
17751775
if (res != NULL) {
1776-
// gh-148608: If it's a method, unbind it right now to improve
1777-
// specialization later on.
1778-
if (Py_IS_TYPE(res, &PyMethod_Type)) {
1779-
PyMethodObject *as_meth = ((PyMethodObject *)res);
1780-
*method = PyStackRef_FromPyObjectNew(as_meth->im_func);
1781-
*self = PyStackRef_FromPyObjectNew(as_meth->im_self);
1782-
Py_DECREF(res);
1783-
return 1;
1784-
}
17851776
*method = PyStackRef_FromPyObjectSteal(res);
17861777
return 0;
17871778
}

0 commit comments

Comments
 (0)