commit | 0cdf9a36ec1b65a655a8af476077c7dd063d87da | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sat Jan 26 14:14:20 2008 +0000 |
committer | Georg Brandl <georg@python.org> | Sat Jan 26 14:14:20 2008 +0000 |
tree | 0f4068bc8a244ef237f93cb61227dfdf9161f2ea | |
parent | 29604a1b4c09ae6efc47fa0f34412168a34aa7dd [diff] |
#1473257: add generator.gi_code attribute that refers to the original code object backing the generator. Patch by Collin Winter.
diff --git a/Include/genobject.h b/Include/genobject.h index 11c6823..135561b 100644 --- a/Include/genobject.h +++ b/Include/genobject.h
@@ -18,6 +18,9 @@ /* 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;