summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-08-19 15:12:23 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-08-19 15:12:23 (GMT)
commit8a31c820930536ffe3b44d99252ba9f3bb98ce58 (patch)
treed5952e59fdcb67329576d4ce63b258e844716546 /Objects/abstract.c
parent0d1a799343dd956c8e4a1d6e0ac3fa9ac007704e (diff)
downloadcpython-8a31c820930536ffe3b44d99252ba9f3bb98ce58.zip
cpython-8a31c820930536ffe3b44d99252ba9f3bb98ce58.tar.gz
cpython-8a31c820930536ffe3b44d99252ba9f3bb98ce58.tar.bz2
Fix PyObject_Call() parameter names
Issue #27128: arg=>args, kw=>kwargs. Same change for PyEval_CallObjectWithKeywords().
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index aaa6fc8..dcf3eb5 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2194,7 +2194,7 @@ _Py_CheckFunctionResult(PyObject *func, PyObject *result, const char *where)
}
PyObject *
-PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
+PyObject_Call(PyObject *func, PyObject *args, PyObject *kwargs)
{
ternaryfunc call;
PyObject *result;
@@ -2203,6 +2203,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
because it may clear it (directly or indirectly) and so the
caller loses its exception */
assert(!PyErr_Occurred());
+ assert(PyTuple_Check(args));
+ assert(kwargs == NULL || PyDict_Check(kwargs));
call = func->ob_type->tp_call;
if (call == NULL) {
@@ -2214,7 +2216,7 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
if (Py_EnterRecursiveCall(" while calling a Python object"))
return NULL;
- result = (*call)(func, arg, kw);
+ result = (*call)(func, args, kwargs);
Py_LeaveRecursiveCall();