File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 22# error "this header file must not be included directly"
33#endif
44
5- /* === Object Protocol ================================================== */
6-
7- /* Suggested size (number of positional arguments) for arrays of PyObject*
8- allocated on a C stack to avoid allocating memory on the heap memory. Such
9- array is used to pass positional arguments to call functions of the
10- PyObject_Vectorcall() family.
11-
12- The size is chosen to not abuse the C stack and so limit the risk of stack
13- overflow. The size is also chosen to allow using the small stack for most
14- function calls of the Python standard library. On 64-bit CPU, it allocates
15- 40 bytes on the stack. */
16- #define _PY_FASTCALL_SMALL_STACK 5
17-
185/* === Vectorcall protocol (PEP 590) ============================= */
196
207// PyVectorcall_NARGS() is exported as a function for the stable ABI.
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ extern "C" {
1010
1111#include "pycore_pystate.h" // _PyThreadState_GET()
1212
13+ /* Suggested size (number of positional arguments) for arrays of PyObject*
14+ allocated on a C stack to avoid allocating memory on the heap memory. Such
15+ array is used to pass positional arguments to call functions of the
16+ PyObject_Vectorcall() family.
17+
18+ The size is chosen to not abuse the C stack and so limit the risk of stack
19+ overflow. The size is also chosen to allow using the small stack for most
20+ function calls of the Python standard library. On 64-bit CPU, it allocates
21+ 40 bytes on the stack. */
22+ #define _PY_FASTCALL_SMALL_STACK 5
23+
24+
1325// Export for shared stdlib extensions like the math extension,
1426// function used via inlined _PyObject_VectorcallTstate() function.
1527PyAPI_FUNC (PyObject * ) _Py_CheckFunctionResult (
You can’t perform that action at this time.
0 commit comments