summaryrefslogtreecommitdiff
path: root/Include/compile.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/compile.h')
-rw-r--r--Include/compile.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Include/compile.h b/Include/compile.h
index ecd8dc1d10..3cc351d409 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -11,6 +11,23 @@ extern "C" {
/* Public interface */
struct _node; /* Declare the existence of this type */
PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
+/* XXX (ncoghlan): Unprefixed type name in a public API! */
+
+#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 | \
+ CO_FUTURE_GENERATOR_STOP)
+#define PyCF_MASK_OBSOLETE (CO_NESTED)
+#define PyCF_SOURCE_IS_UTF8 0x0100
+#define PyCF_DONT_IMPLY_DEDENT 0x0200
+#define PyCF_ONLY_AST 0x0400
+#define PyCF_IGNORE_COOKIE 0x0800
+
+#ifndef Py_LIMITED_API
+typedef struct {
+ int cf_flags; /* bitmask of CO_xxx flags relevant to future */
+} PyCompilerFlags;
+#endif
/* Future feature support */