summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorJeroen Demeyer <J.Demeyer@UGent.be>2019-07-04 10:31:34 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-07-04 10:31:34 (GMT)
commit196a530e00d88a138973bf9182e013937e293f97 (patch)
tree35443abb5aa148b459f68ae43a18cdbb0627ba76 /Objects/typeobject.c
parent9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 (diff)
downloadcpython-196a530e00d88a138973bf9182e013937e293f97.zip
cpython-196a530e00d88a138973bf9182e013937e293f97.tar.gz
cpython-196a530e00d88a138973bf9182e013937e293f97.tar.bz2
bpo-37483: add _PyObject_CallOneArg() function (#14558)
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index f814333..3b9a537 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1459,8 +1459,7 @@ static PyObject*
call_unbound_noarg(int unbound, PyObject *func, PyObject *self)
{
if (unbound) {
- PyObject *args[1] = {self};
- return _PyObject_FastCall(func, args, 1);
+ return _PyObject_CallOneArg(func, self);
}
else {
return _PyObject_CallNoArg(func);
@@ -6561,7 +6560,7 @@ call_attribute(PyObject *self, PyObject *attr, PyObject *name)
else
attr = descr;
}
- res = PyObject_CallFunctionObjArgs(attr, name, NULL);
+ res = _PyObject_CallOneArg(attr, name);
Py_XDECREF(descr);
return res;
}