mirror of
https://github.com/python/cpython.git
synced 2025-10-28 01:00:34 +00:00
bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780)
This commit is contained in:
parent
e59b2deffd
commit
1e996c3a3b
13 changed files with 146 additions and 49 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue