]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
the old CO_FUTURE flags can't be commented out
authorBenjamin Peterson <benjamin@python.org>
Thu, 2 Jul 2009 21:44:01 +0000 (21:44 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 2 Jul 2009 21:44:01 +0000 (21:44 +0000)
Include/code.h
Include/pythonrun.h
Misc/NEWS

index 145a9a128b99a424b737effc9ef6363a6ad3a1ba..3ab5bc7eb4df8f4c0a8f4e5ddc84a930e67c72b1 100644 (file)
@@ -42,7 +42,6 @@ typedef struct {
 */
 #define CO_NOFREE       0x0040
 
-#if 0
 /* These are no longer used. */
 #define CO_GENERATOR_ALLOWED    0x1000
 #define CO_FUTURE_DIVISION     0x2000
@@ -50,7 +49,6 @@ typedef struct {
 #define CO_FUTURE_WITH_STATEMENT  0x8000
 #define CO_FUTURE_PRINT_FUNCTION  0x10000
 #define CO_FUTURE_UNICODE_LITERALS 0x20000
-#endif
 
 #define CO_FUTURE_BARRY_AS_BDFL  0x40000
 
index 86d9fe2250c05879649a61213d1e37d64839a408..28e169060cafe5ef7b2b5eec04afa4cde14472f7 100644 (file)
@@ -7,7 +7,9 @@
 extern "C" {
 #endif
 
-#define PyCF_MASK CO_FUTURE_BARRY_AS_BDFL
+#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
+                   CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
+                   CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL)
 #define PyCF_MASK_OBSOLETE 0
 #define PyCF_SOURCE_IS_UTF8  0x0100
 #define PyCF_DONT_IMPLY_DEDENT 0x0200
index f8b6bb5578086035e958628bfb9c1925489cc1c0..5d4c3ee7b80b62965c3ce826f0a68203e8f5b96b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,11 @@ Core and Builtins
 
 - Issue #4856: Remove checks for win NT.
 
+C-API
+-----
+
+- The code flags for old __future__ features are now available again.
+
 Library
 -------