]> granicus.if.org Git - python/commitdiff
jcompile(): inherit the CO_GENERATOR_ALLOWED flag from the 'base'
authorGuido van Rossum <guido@python.org>
Mon, 16 Jul 2001 16:53:08 +0000 (16:53 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 16 Jul 2001 16:53:08 +0000 (16:53 +0000)
compiling struct.

Python/compile.c

index e950f0fb088a6d8101321256b3bedd8d8aadebf5..ad616f24c61de91771b1719f6d24f4dba6c79705 100644 (file)
@@ -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);