summaryrefslogtreecommitdiffstats
path: root/Objects
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 /Objects
parentbb1085915298a588d495561e5bc22b81552ecb7e (diff)
downloadcpython-e90bdb19f22655b8ddad32006740c55d49237748.zip
cpython-e90bdb19f22655b8ddad32006740c55d49237748.tar.gz
cpython-e90bdb19f22655b8ddad32006740c55d49237748.tar.bz2
Issue #27830: Revert, remove _PyFunction_FastCallKeywords()
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 9e5405d..cf69b96 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2343,51 +2343,6 @@ _PyStack_AsDict(PyObject **stack, Py_ssize_t nkwargs, PyObject *func)
return kwdict;
}
-PyObject *
-_PyObject_FastCallKeywords(PyObject *func, PyObject **stack, Py_ssize_t nargs,
- Py_ssize_t nkwargs)
-{
- PyObject *args, *kwdict, *result;
-
- /* _PyObject_FastCallKeywords() must not be called with an exception set,
- because it may clear it (directly or indirectly) and so the
- caller loses its exception */
- assert(!PyErr_Occurred());
-
- assert(func != NULL);
- assert(nargs >= 0);
- assert(nkwargs >= 0);
- assert((nargs == 0 && nkwargs == 0) || stack != NULL);
-
- if (PyFunction_Check(func)) {
- /* Fast-path: avoid temporary tuple or dict */
- return _PyFunction_FastCallKeywords(func, stack, nargs, nkwargs);
- }
-
- if (PyCFunction_Check(func) && nkwargs == 0) {
- return _PyCFunction_FastCallDict(func, stack, nargs, NULL);
- }
-
- /* Slow-path: build temporary tuple and/or dict */
- args = _PyStack_AsTuple(stack, nargs);
-
- if (nkwargs > 0) {
- kwdict = _PyStack_AsDict(stack + nargs, nkwargs, func);
- if (kwdict == NULL) {
- Py_DECREF(args);
- return NULL;
- }
- }
- else {
- kwdict = NULL;
- }
-
- result = PyObject_Call(func, args, kwdict);
- Py_DECREF(args);
- Py_XDECREF(kwdict);
- return result;
-}
-
/* Positional arguments are obj followed args. */
PyObject *
_PyObject_Call_Prepend(PyObject *func,