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 2
2
# error "this header file must not be included directly"
3
3
#endif
4
4
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
-
18
5
/* === Vectorcall protocol (PEP 590) ============================= */
19
6
20
7
// 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" {
10
10
11
11
#include "pycore_pystate.h" // _PyThreadState_GET()
12
12
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
+
13
25
// Export for shared stdlib extensions like the math extension,
14
26
// function used via inlined _PyObject_VectorcallTstate() function.
15
27
PyAPI_FUNC (PyObject * ) _Py_CheckFunctionResult (
You can’t perform that action at this time.
0 commit comments