mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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)
This commit is contained in:
parent
89072047b8
commit
2d0eb65f45
7 changed files with 213 additions and 181 deletions
|
@ -8,16 +8,18 @@ extern "C" {
|
|||
/* Interface to random parts in ceval.c */
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
|
||||
PyObject *func, PyObject *args, PyObject *kwargs);
|
||||
PyObject *callable,
|
||||
PyObject *args,
|
||||
PyObject *kwargs);
|
||||
|
||||
/* Inline this */
|
||||
#define PyEval_CallObject(func,arg) \
|
||||
PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL)
|
||||
#define PyEval_CallObject(callable, arg) \
|
||||
PyEval_CallObjectWithKeywords(callable, arg, (PyObject *)NULL)
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyEval_CallFunction(PyObject *obj,
|
||||
PyAPI_FUNC(PyObject *) PyEval_CallFunction(PyObject *callable,
|
||||
const char *format, ...);
|
||||
PyAPI_FUNC(PyObject *) PyEval_CallMethod(PyObject *obj,
|
||||
const char *methodname,
|
||||
const char *name,
|
||||
const char *format, ...);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue