Skip to content

Commit c487205

Browse files
bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)
(cherry picked from commit ddf8ae3) Co-authored-by: Dong-hee Na <donghee.na@python.org>
1 parent 153365d commit c487205

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
@@ -462,7 +462,7 @@ instancemethod_traverse(PyObject *self, visitproc visit, void *arg) {
462462
static PyObject *
463463
instancemethod_call(PyObject *self, PyObject *arg, PyObject *kw)
464464
{
465-
return PyObject_Call(PyMethod_GET_FUNCTION(self), arg, kw);
465+
return PyObject_Call(PyInstanceMethod_GET_FUNCTION(self), arg, kw);
466466
}
467467

468468
static PyObject *

0 commit comments

Comments
 (0)