diff Python/ceval.c @ 19158:97a3d3d7029f legacy-trunk

Refactor future feature handling Replace uses of PyCF_xxx with CO_xxx. Replace individual feature slots in PyFutureFeatures with single bitmask ff_features. When flags must be transfered among the three parts of the interpreter that care about them -- the pythonrun layer, the compiler, and the future feature parser -- can simply or (|) the definitions.
author Jeremy Hylton <jeremy@alum.mit.edu>
date Fri, 10 Aug 2001 21:41:33 +0000
parents f20727cc3d0f
children 3c1c9948ff65
line wrap: on
line diff
--- a/Python/ceval.c	Fri Aug 10 21:38:04 2001 +0000
+++ b/Python/ceval.c	Fri Aug 10 21:41:33 2001 +0000
@@ -2937,11 +2937,11 @@
 		const int codeflags = current_frame->f_code->co_flags;
 		if (codeflags & CO_NESTED) {
 			result = 1;
-			cf->cf_flags |= PyCF_NESTED_SCOPES;
+			cf->cf_flags |= CO_NESTED;
 		}
 		if (codeflags & CO_GENERATOR_ALLOWED) {
 			result = 1;
-			cf->cf_flags |= PyCF_GENERATORS;
+			cf->cf_flags |= CO_GENERATOR_ALLOWED;
 		}
 	}
 	return result;