summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-15 11:40:53 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-15 11:40:53 (GMT)
commitbc08ab4598ef05705fd1172f8be8f47307af96c1 (patch)
tree36d362e23b74d8516d8c5f9001b3966e1c440626 /Objects
parentd1e35dd9ee50adf2c69445893ce4e5576b983091 (diff)
downloadcpython-bc08ab4598ef05705fd1172f8be8f47307af96c1.zip
cpython-bc08ab4598ef05705fd1172f8be8f47307af96c1.tar.gz
cpython-bc08ab4598ef05705fd1172f8be8f47307af96c1.tar.bz2
Add _PY_FASTCALL_SMALL_STACK constant
Issue #28870: Add a new _PY_FASTCALL_SMALL_STACK constant, size of "small stacks" allocated on the C stack to pass positional arguments to _PyObject_FastCall(). _PyObject_Call_Prepend() now uses a small stack of 5 arguments (40 bytes) instead of 8 (64 bytes), since it is modified to use _PY_FASTCALL_SMALL_STACK.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 7da97ac..351c6eb 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2337,7 +2337,7 @@ PyObject *
_PyObject_Call_Prepend(PyObject *callable,
PyObject *obj, PyObject *args, PyObject *kwargs)
{
- PyObject *small_stack[8];
+ PyObject *small_stack[_PY_FASTCALL_SMALL_STACK];
PyObject **stack;
Py_ssize_t argcount;
PyObject *result;
@@ -2523,7 +2523,7 @@ static PyObject *
_PyObject_CallFunctionVa(PyObject *callable, const char *format,
va_list va, int is_size_t)
{
- PyObject* small_stack[5];
+ PyObject* small_stack[_PY_FASTCALL_SMALL_STACK];
const Py_ssize_t small_stack_len = Py_ARRAY_LENGTH(small_stack);
PyObject **stack;
Py_ssize_t nargs, i;
@@ -2704,7 +2704,7 @@ _PyObject_CallMethodId_SizeT(PyObject *obj, _Py_Identifier *name,
PyObject *
_PyObject_VaCallFunctionObjArgs(PyObject *callable, va_list vargs)
{
- PyObject *small_stack[5];
+ PyObject *small_stack[_PY_FASTCALL_SMALL_STACK];
PyObject **stack;
Py_ssize_t nargs;
PyObject *result;