diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/compile.h | 16 | ||||
-rw-r--r-- | Include/symtable.h | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Include/compile.h b/Include/compile.h index 5d65c5d..ecc1575 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -7,9 +7,6 @@ extern "C" { #endif -#define NESTED_SCOPES_DEFAULT 0 -#define FUTURE_NESTED_SCOPES "nested_scopes" - /* Bytecode object */ typedef struct { PyObject_HEAD @@ -51,6 +48,19 @@ DL_IMPORT(PyCodeObject *) PyCode_New( /* same as struct above */ DL_IMPORT(int) PyCode_Addr2Line(PyCodeObject *, int); +/* Future feature support */ + +typedef struct { + int ff_last_lineno; + int ff_n_simple_stmt; + int ff_nested_scopes; +} PyFutureFeatures; + +DL_IMPORT(PyFutureFeatures *) PyNode_Future(struct _node *, char *); + +#define NESTED_SCOPES_DEFAULT 0 +#define FUTURE_NESTED_SCOPES "nested_scopes" + /* for internal use only */ #define _PyCode_GETCODEPTR(co, pp) \ ((*(co)->co_code->ob_type->tp_as_buffer->bf_getreadbuffer) \ diff --git a/Include/symtable.h b/Include/symtable.h index eb0be1a..7d1e0c3 100644 --- a/Include/symtable.h +++ b/Include/symtable.h @@ -30,6 +30,7 @@ struct symtable { int st_errors; /* number of errors */ char *st_private; /* name of current class or NULL */ int st_tmpname; /* temporary name counter */ + PyFutureFeatures *st_future; /* module's future features */ }; typedef struct _symtable_entry { |