diff Python/compile.c @ 36729:d6cbc71b8010 legacy-trunk

Generally inehrit codeflags that are in PyCF_MASK, instead of writing it out in multiple places. This makes compile()/eval()/etc also inherit the absolute-import codeflag, like division and with-statement already were.
author Thomas Wouters <thomas@python.org>
date Tue, 28 Feb 2006 20:02:27 +0000
parents bbf16fd024df
children 1daa199b784b
line wrap: on
line diff
--- a/Python/compile.c	Tue Feb 28 19:57:06 2006 +0000
+++ b/Python/compile.c	Tue Feb 28 20:02:27 2006 +0000
@@ -4284,10 +4284,10 @@
 		flags |= CO_VARKEYWORDS;
 	if (ste->ste_generator)
 		flags |= CO_GENERATOR;
-        if (c->c_flags->cf_flags & CO_FUTURE_DIVISION)
-                flags |= CO_FUTURE_DIVISION;
-        if (c->c_flags->cf_flags & CO_FUTURE_WITH_STATEMENT)
-                flags |= CO_FUTURE_WITH_STATEMENT;
+
+	/* (Only) inherit compilerflags in PyCF_MASK */
+        flags |= (c->c_flags->cf_flags & PyCF_MASK);
+
 	n = PyDict_Size(c->u->u_freevars);
 	if (n < 0)
 	    return -1;