summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2019-02-25 21:37:26 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-02-25 21:37:26 (GMT)
commitf1b9abe35f75393351b3d954a392122a3f8f6951 (patch)
treecded6dbaa12d51478f71b9604c24910542799c5c /Objects
parentb5853e2650606781451925b733a40aec8dd7d365 (diff)
downloadcpython-f1b9abe35f75393351b3d954a392122a3f8f6951.zip
cpython-f1b9abe35f75393351b3d954a392122a3f8f6951.tar.gz
cpython-f1b9abe35f75393351b3d954a392122a3f8f6951.tar.bz2
bpo-36030: Remove _PyStack_AsTuple() and _PyStack_AsTupleSlice() (GH-12032)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/call.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/Objects/call.c b/Objects/call.c
index 3250f8a..d52e7e2 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -114,7 +114,7 @@ _PyObject_FastCallDict(PyObject *callable, PyObject *const *args, Py_ssize_t nar
return NULL;
}
- argstuple = _PyStack_AsTuple(args, nargs);
+ argstuple = _PyTuple_FromArray(args, nargs);
if (argstuple == NULL) {
return NULL;
}
@@ -176,7 +176,7 @@ _PyObject_FastCallKeywords(PyObject *callable, PyObject *const *stack, Py_ssize_
return NULL;
}
- argstuple = _PyStack_AsTuple(stack, nargs);
+ argstuple = _PyTuple_FromArray(stack, nargs);
if (argstuple == NULL) {
return NULL;
}
@@ -508,7 +508,7 @@ _PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self,
case METH_VARARGS | METH_KEYWORDS:
{
/* Slow-path: create a temporary tuple for positional arguments */
- PyObject *argstuple = _PyStack_AsTuple(args, nargs);
+ PyObject *argstuple = _PyTuple_FromArray(args, nargs);
if (argstuple == NULL) {
goto exit;
}
@@ -670,7 +670,7 @@ _PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self,
and a temporary dict for keyword arguments */
PyObject *argtuple;
- argtuple = _PyStack_AsTuple(args, nargs);
+ argtuple = _PyTuple_FromArray(args, nargs);
if (argtuple == NULL) {
goto exit;
}
@@ -1271,27 +1271,6 @@ PyObject_CallFunctionObjArgs(PyObject *callable, ...)
/* --- PyStack functions ------------------------------------------ */
-/* Issue #29234: Inlining _PyStack_AsTuple() into callers increases their
- stack consumption, Disable inlining to optimize the stack consumption. */
-_Py_NO_INLINE PyObject *
-_PyStack_AsTuple(PyObject *const *stack, Py_ssize_t nargs)
-{
- return _PyTuple_FromArray(stack, nargs);
-}
-
-
-PyObject*
-_PyStack_AsTupleSlice(PyObject *const *stack, Py_ssize_t nargs,
- Py_ssize_t start, Py_ssize_t end)
-{
- assert(0 <= start);
- assert(end <= nargs);
- assert(start <= end);
-
- return _PyTuple_FromArray(stack + start, end - start);
-}
-
-
PyObject *
_PyStack_AsDict(PyObject *const *values, PyObject *kwnames)
{