aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Demeyer <J.Demeyer@UGent.be>2019-06-18 10:50:28 +0200
committerInada Naoki <songofacandy@gmail.com>2019-06-18 17:50:28 +0900
commitc78fe320dbb0da3412d640797eb850753d45c07b (patch)
treee87c383180bc79e8c2525eb7ba43088e633e30ca /Objects/classobject.c
parentbpo-35031: also disable TLS 1.3 for test_start_tls_server_1 on macOS (GH-14188) (diff)
downloadcpython-c78fe320dbb0da3412d640797eb850753d45c07b.tar.gz
cpython-c78fe320dbb0da3412d640797eb850753d45c07b.tar.bz2
cpython-c78fe320dbb0da3412d640797eb850753d45c07b.zip
bpo-37151: use PyVectorcall_Call for all calls of "method" (GH-13972)
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index f26a85c6237..ec4d2b9910a 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -330,17 +330,6 @@ method_traverse(PyMethodObject *im, visitproc visit, void *arg)
}
static PyObject *
-method_call(PyObject *method, PyObject *args, PyObject *kwargs)
-{
- PyObject *self, *func;
-
- self = PyMethod_GET_SELF(method);
- func = PyMethod_GET_FUNCTION(method);
-
- return _PyObject_Call_Prepend(func, self, args, kwargs);
-}
-
-static PyObject *
method_descr_get(PyObject *meth, PyObject *obj, PyObject *cls)
{
Py_INCREF(meth);
@@ -362,7 +351,7 @@ PyTypeObject PyMethod_Type = {
0, /* tp_as_sequence */
0, /* tp_as_mapping */
(hashfunc)method_hash, /* tp_hash */
- method_call, /* tp_call */
+ PyVectorcall_Call, /* tp_call */
0, /* tp_str */
method_getattro, /* tp_getattro */
PyObject_GenericSetAttr, /* tp_setattro */