summaryrefslogtreecommitdiffstats
path: root/Include/genobject.h
diff options
context:
space:
mode:
authorVladimir Matveev <vladima@fb.com>2020-10-10 00:15:15 (GMT)
committerGitHub <noreply@github.com>2020-10-10 00:15:15 (GMT)
commit037245c5ac46c3436f617a1f5d965929754be239 (patch)
treece2a797b165e846d59e53ba5d530413cb573a8aa /Include/genobject.h
parent9975cc5008c795e069ce11e2dbed2110cc12e74e (diff)
downloadcpython-037245c5ac46c3436f617a1f5d965929754be239.zip
cpython-037245c5ac46c3436f617a1f5d965929754be239.tar.gz
cpython-037245c5ac46c3436f617a1f5d965929754be239.tar.bz2
bpo-41756: Add PyIter_Send function (#22443)
Diffstat (limited to 'Include/genobject.h')
-rw-r--r--Include/genobject.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/Include/genobject.h b/Include/genobject.h
index 7488054..e719b25 100644
--- a/Include/genobject.h
+++ b/Include/genobject.h
@@ -9,6 +9,7 @@ extern "C" {
#endif
#include "pystate.h" /* _PyErr_StackItem */
+#include "abstract.h" /* PySendResult */
/* _PyGenObject_HEAD defines the initial segment of generator
and coroutine objects. */
@@ -41,16 +42,9 @@ PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(PyFrameObject *,
PyObject *name, PyObject *qualname);
PyAPI_FUNC(int) _PyGen_SetStopIterationValue(PyObject *);
PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
-PyAPI_FUNC(PyObject *) _PyGen_Send(PyGenObject *, PyObject *);
PyObject *_PyGen_yf(PyGenObject *);
PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
-typedef enum {
- PYGEN_RETURN = 0,
- PYGEN_ERROR = -1,
- PYGEN_NEXT = 1,
-} PySendResult;
-
/* Sends the value into the generator or the coroutine. Returns:
- PYGEN_RETURN (0) if generator has returned.
'result' parameter is filled with return value