gh-117411: move PyFutureFeatures to pycore_symtable.h and make it private (#117412)

This commit is contained in:
Irit Katriel 2024-04-02 11:34:49 +01:00 committed by GitHub
parent 5fd1897ec5
commit 1d5479b236
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 49 additions and 42 deletions

View file

@ -70,11 +70,11 @@
((C)->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
&& ((C)->u->u_ste->ste_type == ModuleBlock))
typedef _PyCompilerSrcLocation location;
typedef _Py_SourceLocation location;
typedef struct _PyCfgBuilder cfg_builder;
#define LOCATION(LNO, END_LNO, COL, END_COL) \
((const _PyCompilerSrcLocation){(LNO), (END_LNO), (COL), (END_COL)})
((const _Py_SourceLocation){(LNO), (END_LNO), (COL), (END_COL)})
/* Return true if loc1 starts after loc2 ends. */
static inline bool
@ -408,7 +408,7 @@ handled by the symbol analysis pass.
struct compiler {
PyObject *c_filename;
struct symtable *c_st;
PyFutureFeatures c_future; /* module's __future__ */
_PyFutureFeatures c_future; /* module's __future__ */
PyCompilerFlags c_flags;
int c_optimize; /* optimization level */
@ -585,7 +585,7 @@ int
_PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
int optimize, PyArena *arena)
{
PyFutureFeatures future;
_PyFutureFeatures future;
if (!_PyFuture_FromAST(mod, filename, &future)) {
return -1;
}