[Python-checkins] bpo-31890: define METH_STACKLESS (#4159)

Victor Stinner webhook-mailer at python.org
Thu Nov 2 18:55:03 EDT 2017


https://github.com/python/cpython/commit/9e3397333278f973a11d933c27a69af250e4acf0
commit: 9e3397333278f973a11d933c27a69af250e4acf0
branch: master
author: Anselm Kruis <a.kruis at science-computing.de>
committer: Victor Stinner <victor.stinner at gmail.com>
date: 2017-11-02T15:54:57-07:00
summary:

bpo-31890: define METH_STACKLESS (#4159)

Add METH_STACKLESS to prevent future collisions.

files:
M Include/methodobject.h

diff --git a/Include/methodobject.h b/Include/methodobject.h
index ec67dc2eb0d..66e6a554b11 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -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 */



More information about the Python-checkins mailing list