diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/code.h | 3 | ||||
-rw-r--r-- | Include/compile.h | 2 | ||||
-rw-r--r-- | Include/parsetok.h | 4 | ||||
-rw-r--r-- | Include/pythonrun.h | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/Include/code.h b/Include/code.h index 07e3b1f..0e89b88 100644 --- a/Include/code.h +++ b/Include/code.h @@ -48,11 +48,12 @@ typedef struct { #define CO_FUTURE_DIVISION 0x2000 #define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ #define CO_FUTURE_WITH_STATEMENT 0x8000 +#define CO_FUTURE_PRINT_FUNCTION 0x10000 /* This should be defined if a future statement modifies the syntax. For example, when a keyword is added. */ -#if 0 +#if 1 #define PY_PARSER_REQUIRES_FUTURE_KEYWORD #endif diff --git a/Include/compile.h b/Include/compile.h index 2bde6fb..d703edb 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -24,6 +24,8 @@ typedef struct { #define FUTURE_DIVISION "division" #define FUTURE_ABSOLUTE_IMPORT "absolute_import" #define FUTURE_WITH_STATEMENT "with_statement" +#define FUTURE_PRINT_FUNCTION "print_function" + struct _mod; /* Declare the existence of this type */ PyAPI_FUNC(PyCodeObject *) PyAST_Compile(struct _mod *, const char *, diff --git a/Include/parsetok.h b/Include/parsetok.h index 2b4ce1e..808c72c 100644 --- a/Include/parsetok.h +++ b/Include/parsetok.h @@ -27,6 +27,10 @@ typedef struct { #define PyPARSE_WITH_IS_KEYWORD 0x0003 #endif +#define PyPARSE_PRINT_IS_FUNCTION 0x0004 + + + PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int, perrdetail *); PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int, diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 0164088..f2105b8 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -8,7 +8,7 @@ extern "C" { #endif #define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \ - CO_FUTURE_WITH_STATEMENT) + CO_FUTURE_WITH_STATEMENT|CO_FUTURE_PRINT_FUNCTION) #define PyCF_MASK_OBSOLETE (CO_NESTED) #define PyCF_SOURCE_IS_UTF8 0x0100 #define PyCF_DONT_IMPLY_DEDENT 0x0200 |