]> granicus.if.org Git - python/commitdiff
Removed more hair in support of future-generator stmts.
authorTim Peters <tim.peters@gmail.com>
Fri, 12 Apr 2002 01:20:10 +0000 (01:20 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 12 Apr 2002 01:20:10 +0000 (01:20 +0000)
Include/compile.h
Include/pythonrun.h
Python/future.c

index 0b1cb891ce68d84744fcb51626159f6b703803b2..39c00f268058d99da536a11d3b4944d2643f04f4 100644 (file)
@@ -40,7 +40,7 @@ typedef struct {
    compiled *by* a code object knows whether to allow yield stmts.  In
    effect, this passes on the "from __future__ import generators" state
    in effect when the code block was compiled. */
-#define CO_GENERATOR_ALLOWED    0x1000
+#define CO_GENERATOR_ALLOWED    0x1000 /* no longer used in an essential way */
 #define CO_FUTURE_DIVISION     0x2000
 
 extern DL_IMPORT(PyTypeObject) PyCode_Type;
index 3e00cde62ab45cc0ad5a64b952dc5569acee91f9..3a79288ac044bbe68fa747792f68054d8e224cc9 100644 (file)
@@ -7,8 +7,8 @@
 extern "C" {
 #endif
 
-#define PyCF_MASK (CO_GENERATOR_ALLOWED | CO_FUTURE_DIVISION)
-#define PyCF_MASK_OBSOLETE (CO_NESTED)
+#define PyCF_MASK (CO_FUTURE_DIVISION)
+#define PyCF_MASK_OBSOLETE (CO_GENERATOR_ALLOWED | CO_NESTED)
 
 typedef struct {
        int cf_flags;  /* bitmask of CO_xxx flags relevant to future */
index 563bbdff154d65ddd6608c7be1ee17ec804a3c20..beec9fcd196d380e59d0ef997553d3845f855301 100644 (file)
@@ -35,7 +35,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename)
                if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
                        continue;
                } else if (strcmp(feature, FUTURE_GENERATORS) == 0) {
-                       ff->ff_features |= CO_GENERATOR_ALLOWED;
+                       continue;
                } else if (strcmp(feature, FUTURE_DIVISION) == 0) {
                        ff->ff_features |= CO_FUTURE_DIVISION;
                } else if (strcmp(feature, "braces") == 0) {