diff options
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 6 |
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(); |