[Python-checkins] bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)

miss-islington webhook-mailer at python.org
Wed Jul 28 09:29:22 EDT 2021


https://github.com/python/cpython/commit/c558e12695e5fe39778eb3eead9df48870356800
commit: c558e12695e5fe39778eb3eead9df48870356800
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-07-28T06:29:17-07:00
summary:

bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)

(cherry picked from commit ddf8ae31a0f371eff2db14c7f7a45976b86d56ea)

Co-authored-by: Dong-hee Na <donghee.na at python.org>

files:
M Objects/classobject.c

diff --git a/Objects/classobject.c b/Objects/classobject.c
index fd9f8757f84ab..af73be3d26241 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -462,7 +462,7 @@ instancemethod_traverse(PyObject *self, visitproc visit, void *arg) {
 static PyObject *
 instancemethod_call(PyObject *self, PyObject *arg, PyObject *kw)
 {
-    return PyObject_Call(PyMethod_GET_FUNCTION(self), arg, kw);
+    return PyObject_Call(PyInstanceMethod_GET_FUNCTION(self), arg, kw);
 }
 
 static PyObject *



More information about the Python-checkins mailing list