summaryrefslogtreecommitdiff
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-06 16:27:24 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-06 16:27:24 +0100
commit647e75b25047cd0bf6a780e929db7a67de4cca75 (patch)
treee5d0eb5afb591577f77699659b8c374fd7eb8077 /Python/modsupport.c
parente6f0961cb48ab8bbcbfc040d010ccb8a4128c46f (diff)
downloadcpython-647e75b25047cd0bf6a780e929db7a67de4cca75.tar.gz
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)
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 06bdcab3c6..3ae3fea034 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -487,7 +487,7 @@ va_build_value(const char *format, va_list va, int flags)
PyObject *
-PyEval_CallFunction(PyObject *obj, const char *format, ...)
+PyEval_CallFunction(PyObject *callable, const char *format, ...)
{
va_list vargs;
PyObject *args;
@@ -501,7 +501,7 @@ PyEval_CallFunction(PyObject *obj, const char *format, ...)
if (args == NULL)
return NULL;
- res = PyEval_CallObject(obj, args);
+ res = PyEval_CallObject(callable, args);
Py_DECREF(args);
return res;
@@ -509,14 +509,14 @@ PyEval_CallFunction(PyObject *obj, const char *format, ...)
PyObject *
-PyEval_CallMethod(PyObject *obj, const char *methodname, const char *format, ...)
+PyEval_CallMethod(PyObject *obj, const char *name, const char *format, ...)
{
va_list vargs;
PyObject *meth;
PyObject *args;
PyObject *res;
- meth = PyObject_GetAttrString(obj, methodname);
+ meth = PyObject_GetAttrString(obj, name);
if (meth == NULL)
return NULL;