bpo-41756: Export PyGen_Send and wrap it in if-defs (#22677)

This commit is contained in:
Vladimir Matveev 2020-10-13 10:26:51 -07:00 • committed by GitHub
parent 66c28f50c7
commit cfb0f57ff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View file

@ -338,6 +338,7 @@ PyAPI_FUNC(int) PyIter_Check(PyObject *);
NULL with an exception means an error occurred. */
PyAPI_FUNC(PyObject *) PyIter_Next(PyObject *);
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
typedef enum {
PYGEN_RETURN = 0,
PYGEN_ERROR = -1,
@ -353,6 +354,7 @@ typedef enum {
- PYGEN_NEXT (1) if generator has yielded.
'result' parameter is filled with yielded value. */
PyAPI_FUNC(PySendResult) PyIter_Send(PyObject *, PyObject *, PyObject **);
#endif
/* === Number Protocol ================================================== */