Skip to content

Commit 9e33973

Browse files
Anselm Kruisvstinner
authored andcommitted
bpo-31890: define METH_STACKLESS (#4159)
Add METH_STACKLESS to prevent future collisions.
1 parent 4e38d71 commit 9e33973

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Include/methodobject.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,16 @@ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
8989

9090
#ifndef Py_LIMITED_API
9191
#define METH_FASTCALL 0x0080
92+
#endif
93+
94+
/* This bit is preserved for Stackless Python */
95+
#ifdef STACKLESS
96+
#define METH_STACKLESS 0x0100
97+
#else
98+
#define METH_STACKLESS 0x0000
99+
#endif
92100

101+
#ifndef Py_LIMITED_API
93102
typedef struct {
94103
PyObject_HEAD
95104
PyMethodDef *m_ml; /* Description of the C function to call */

0 commit comments

Comments
 (0)