From 2d0eb65f455ddd66f74ad01a8f4a44d271f2a3da Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Dec 2016 16:27:24 +0100 Subject: Uniformize argument names of "call" functions Issue #28838: Rename parameters of the "calls" functions of the Python C API. * Rename 'callable_object' and 'func' to 'callable': any Python callable object is accepted, not only Python functions * Rename 'method' and 'nameid' to 'name' (method name) * Rename 'o' to 'obj' * Move, fix and update documentation of PyObject_CallXXX() functions in abstract.h * Update also the documentaton of the C API (update parameter names) --- Python/ceval.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index ca876e0ba8..8b17c09ca1 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4637,7 +4637,8 @@ PyEval_MergeCompilerFlags(PyCompilerFlags *cf) The arg must be a tuple or NULL. The kw must be a dict or NULL. */ PyObject * -PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs) +PyEval_CallObjectWithKeywords(PyObject *callable, + PyObject *args, PyObject *kwargs) { #ifdef Py_DEBUG /* PyEval_CallObjectWithKeywords() must not be called with an exception @@ -4647,7 +4648,7 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs) #endif if (args == NULL) { - return _PyObject_FastCallDict(func, NULL, 0, kwargs); + return _PyObject_FastCallDict(callable, NULL, 0, kwargs); } if (!PyTuple_Check(args)) { @@ -4662,7 +4663,7 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs) return NULL; } - return PyObject_Call(func, args, kwargs); + return PyObject_Call(callable, args, kwargs); } const char * -- cgit v1.2.1