diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-03-15 20:37:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-03-15 20:37:39 (GMT) |
commit | 2afe6aeae820cf2272c6f9be60b185e1c27b734b (patch) | |
tree | 806b2e778fa2d90648e9eca16f306769bd804d16 /Include/genobject.h | |
parent | 3270d11d8aee447e6cbd5388d677b4a23879e80e (diff) | |
download | cpython-2afe6aeae820cf2272c6f9be60b185e1c27b734b.zip cpython-2afe6aeae820cf2272c6f9be60b185e1c27b734b.tar.gz cpython-2afe6aeae820cf2272c6f9be60b185e1c27b734b.tar.bz2 |
perform yield from delegation by repeating YIELD_FROM opcode (closes #14230)
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.
Patch mostly from Mark Shannon with a few tweaks by me.
Diffstat (limited to 'Include/genobject.h')
-rw-r--r-- | Include/genobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/genobject.h b/Include/genobject.h index 2326491..25f6c33 100644 --- a/Include/genobject.h +++ b/Include/genobject.h @@ -19,7 +19,7 @@ typedef struct { /* True if generator is being executed. */ char gi_running; - + /* The code object backing the generator */ PyObject *gi_code; @@ -35,6 +35,7 @@ PyAPI_DATA(PyTypeObject) PyGen_Type; PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *); PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *); PyAPI_FUNC(int) PyGen_FetchStopIterationValue(PyObject **); +PyObject *_PyGen_Send(PyGenObject *, PyObject *); #ifdef __cplusplus } |