summaryrefslogtreecommitdiffstats
path: root/Include/pythonrun.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-08-17 20:47:47 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-08-17 20:47:47 (GMT)
commite2c18e90dace36a90b5aa83b8974a5fac8f67e43 (patch)
tree8f3f491a98f8a8bc04f123140d8edb9760644787 /Include/pythonrun.h
parent9676b22cd70ba83b8f03c5d2191892236d9dbd0d (diff)
downloadcpython-e2c18e90dace36a90b5aa83b8974a5fac8f67e43.zip
cpython-e2c18e90dace36a90b5aa83b8974a5fac8f67e43.tar.gz
cpython-e2c18e90dace36a90b5aa83b8974a5fac8f67e43.tar.bz2
ceval, PyEval_MergeCompilerFlags: wasn't merging in the
CO_FUTURE_DIVISION flag. Redid this to use Jeremy's PyCF_MASK #define instead, so we dont have to remember to fiddle individual feature names here again. pythonrun.h: Also #define a PyCF_MASK_OBSOLETE mask. This isn't used yet, but will be as part of the PEP 264 implementation (compile() mustn't raise an error just because old code uses a flag name that's become obsolete; a warning may be appropriate, but not an error; so compile() has to know about obsolete flags too, but nobody is going to remember to update compile() with individual obsolete flag names across releases either -- i.e., this is the flip side of PyEval_MergeCompilerFlags's oversight).
Diffstat (limited to 'Include/pythonrun.h')
-rw-r--r--Include/pythonrun.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 95ac15c..6d3a6d8 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -8,6 +8,8 @@ extern "C" {
#endif
#define PyCF_MASK (CO_GENERATOR_ALLOWED | CO_FUTURE_DIVISION)
+#define PyCF_MASK_OBSOLETE (CO_NESTED)
+
typedef struct {
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
} PyCompilerFlags;