summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-07-16 16:53:08 +0000
committerGuido van Rossum <guido@python.org>2001-07-16 16:53:08 +0000
commitb63c5bd0350a92dbc56ae28465a0be8a7844f99e (patch)
treebe2d0f3df70bbca53dfef64616448840286c9905 /Python/compile.c
parent9f1581a69dc1b5b4e3fd6e3dd3e7b1a7e4585343 (diff)
downloadcpython-b63c5bd0350a92dbc56ae28465a0be8a7844f99e.tar.gz
jcompile(): inherit the CO_GENERATOR_ALLOWED flag from the 'base'
compiling struct.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index e950f0fb08..ad616f24c6 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3945,6 +3945,7 @@ jcompile(node *n, char *filename, struct compiling *base,
if (base->c_nested
|| (sc.c_symtable->st_cur->ste_type == TYPE_FUNCTION))
sc.c_nested = 1;
+ sc.c_flags |= base->c_flags & CO_GENERATOR_ALLOWED;
} else {
sc.c_private = NULL;
sc.c_future = PyNode_Future(n, filename);