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.
diff --git a/Python/ceval.c b/Python/ceval.c
index 583d7e3..bf85f11 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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;