summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-12 01:20:10 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-12 01:20:10 (GMT)
commit2bbdba3c00c33453a2591ffce798c870d9a0ae22 (patch)
treec1e671d3cd9416434039bc6e7975a96551b34a1f
parent68c7e26dc953c5403bd193def3c966f0297ffeae (diff)
downloadcpython-2bbdba3c00c33453a2591ffce798c870d9a0ae22.zip
cpython-2bbdba3c00c33453a2591ffce798c870d9a0ae22.tar.gz
cpython-2bbdba3c00c33453a2591ffce798c870d9a0ae22.tar.bz2
Removed more hair in support of future-generator stmts.
-rw-r--r--Include/compile.h2
-rw-r--r--Include/pythonrun.h4
-rw-r--r--Python/future.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/Include/compile.h b/Include/compile.h
index 0b1cb89..39c00f2 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -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;
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 3e00cde..3a79288 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -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 */
diff --git a/Python/future.c b/Python/future.c
index 563bbdf..beec9fc 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -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) {