From: Guido van Rossum Date: Mon, 16 Jul 2001 16:53:08 +0000 (+0000) Subject: jcompile(): inherit the CO_GENERATOR_ALLOWED flag from the 'base' X-Git-Tag: v2.2a3~1137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e16c7aee4bc2a8851b9a9bae60a00c2544722f67;p=thirdparty%2FPython%2Fcpython.git jcompile(): inherit the CO_GENERATOR_ALLOWED flag from the 'base' compiling struct. --- diff --git a/Python/compile.c b/Python/compile.c index e950f0fb088a..ad616f24c61d 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);