summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-08-25 21:26:50 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-08-25 21:26:50 (GMT)
commite90bdb19f22655b8ddad32006740c55d49237748 (patch)
tree3748a8f27c9b1958897a266b9529771b021ba58a /Python
parentbb1085915298a588d495561e5bc22b81552ecb7e (diff)
downloadcpython-e90bdb19f22655b8ddad32006740c55d49237748.zip
cpython-e90bdb19f22655b8ddad32006740c55d49237748.tar.gz
cpython-e90bdb19f22655b8ddad32006740c55d49237748.tar.bz2
Issue #27830: Revert, remove _PyFunction_FastCallKeywords()
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 266b987..00d52b4 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -113,6 +113,7 @@ static PyObject * call_function(PyObject ***, int, uint64*, uint64*);
#else
static PyObject * call_function(PyObject ***, int);
#endif
+static PyObject * fast_function(PyObject *, PyObject **, Py_ssize_t, Py_ssize_t);
static PyObject * do_call(PyObject *, PyObject ***, Py_ssize_t, Py_ssize_t);
static PyObject * ext_do_call(PyObject *, PyObject ***, int, Py_ssize_t, Py_ssize_t);
static PyObject * update_keyword_args(PyObject *, Py_ssize_t, PyObject ***,
@@ -4766,7 +4767,7 @@ call_function(PyObject ***pp_stack, int oparg
}
READ_TIMESTAMP(*pintr0);
if (PyFunction_Check(func)) {
- x = _PyFunction_FastCallKeywords(func, (*pp_stack) - n, nargs, nkwargs);
+ x = fast_function(func, (*pp_stack) - n, nargs, nkwargs);
}
else {
x = do_call(func, pp_stack, nargs, nkwargs);
@@ -4779,7 +4780,7 @@ call_function(PyObject ***pp_stack, int oparg
/* Clear the stack of the function object. Also removes
the arguments in case they weren't consumed already
- (_PyFunction_FastCallKeywords() and err_args() leave them on the stack).
+ (fast_function() and err_args() leave them on the stack).
*/
while ((*pp_stack) > pfunc) {
w = EXT_POP(*pp_stack);
@@ -4791,7 +4792,7 @@ call_function(PyObject ***pp_stack, int oparg
return x;
}
-/* The _PyFunction_FastCallKeywords() function optimize calls for which no argument
+/* The fast_function() function optimize calls for which no argument
tuple is necessary; the objects are passed directly from the stack.
For the simplest case -- a function that takes only positional
arguments and is called with only positional arguments -- it
@@ -4839,9 +4840,8 @@ _PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t nargs,
/* Similar to _PyFunction_FastCall() but keywords are passed a (key, value)
pairs in stack */
-PyObject *
-_PyFunction_FastCallKeywords(PyObject *func, PyObject **stack,
- Py_ssize_t nargs, Py_ssize_t nkwargs)
+static PyObject *
+fast_function(PyObject *func, PyObject **stack, Py_ssize_t nargs, Py_ssize_t nkwargs)
{
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
PyObject *globals = PyFunction_GET_GLOBALS(func);