#1473257: add generator.gi_code attribute that refers to

the original code object backing the generator. Patch by Collin Winter.
This commit is contained in:
Georg Brandl 2008-01-26 14:14:20 +00:00
parent 29604a1b4c
commit 0cdf9a36ec
4 changed files with 32 additions and 2 deletions

View file

@ -18,6 +18,9 @@ typedef struct {
/* True if generator is being executed. */
int gi_running;
/* The code object backing the generator */
PyObject *gi_code;
/* List of weak reference. */
PyObject *gi_weakreflist;