mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
#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:
parent
29604a1b4c
commit
0cdf9a36ec
4 changed files with 32 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue