]> granicus.if.org Git - python/commitdiff
bpo-31890: define METH_STACKLESS (#4159)
authorAnselm Kruis <a.kruis@science-computing.de>
Thu, 2 Nov 2017 22:54:57 +0000 (23:54 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 2 Nov 2017 22:54:57 +0000 (15:54 -0700)
Add METH_STACKLESS to prevent future collisions.

Include/methodobject.h

index ec67dc2eb0d59d7e441e637abd2382cf8fee857e..66e6a554b114160765affe8bc17a9baf6628546f 100644 (file)
@@ -89,7 +89,16 @@ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
 
 #ifndef Py_LIMITED_API
 #define METH_FASTCALL  0x0080
+#endif
+
+/* This bit is preserved for Stackless Python */
+#ifdef STACKLESS
+#define METH_STACKLESS 0x0100
+#else
+#define METH_STACKLESS 0x0000
+#endif
 
+#ifndef Py_LIMITED_API
 typedef struct {
     PyObject_HEAD
     PyMethodDef *m_ml; /* Description of the C function to call */