summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorVladimir Matveev <vladima@fb.com>2020-11-10 20:09:55 (GMT)
committerGitHub <noreply@github.com>2020-11-10 20:09:55 (GMT)
commit1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060 (patch)
tree3f3ffd5d90532c6f4b1ec013919e3677d63dd21c /Include/object.h
parente59b2deffde61e5641cabd65034fa11b4db898ba (diff)
downloadcpython-1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060.zip
cpython-1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060.tar.gz
cpython-1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060.tar.bz2
bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780)
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h
index eab3228..dd1b217 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -356,6 +356,11 @@ given type object has a specified feature.
/* Type is abstract and cannot be instantiated */
#define Py_TPFLAGS_IS_ABSTRACT (1UL << 20)
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
+/* Type has am_send entry in tp_as_async slot */
+#define Py_TPFLAGS_HAVE_AM_SEND (1UL << 21)
+#endif
+
/* These flags are used to determine if a type is a subclass. */
#define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24)
#define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25)
@@ -582,6 +587,15 @@ PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
#define Py_GT 4
#define Py_GE 5
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
+/* Result of calling PyIter_Send */
+typedef enum {
+ PYGEN_RETURN = 0,
+ PYGEN_ERROR = -1,
+ PYGEN_NEXT = 1,
+} PySendResult;
+#endif
+
/*
* Macro for implementing rich comparisons
*