mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-105148: make _PyASTOptimizeState internal to ast_opt.c (#105149)
This commit is contained in:
parent
dd29ae26f8
commit
f990bb8b2d
5 changed files with 26 additions and 26 deletions
|
|
@ -675,16 +675,12 @@ extract_anchors_from_line(PyObject *filename, PyObject *line,
|
|||
|
||||
PyCompilerFlags flags = _PyCompilerFlags_INIT;
|
||||
|
||||
_PyASTOptimizeState state;
|
||||
state.optimize = _Py_GetConfig()->optimization_level;
|
||||
state.ff_features = 0;
|
||||
|
||||
mod_ty module = _PyParser_ASTFromString(segment_str, filename, Py_file_input,
|
||||
&flags, arena);
|
||||
if (!module) {
|
||||
goto done;
|
||||
}
|
||||
if (!_PyAST_Optimize(module, arena, &state)) {
|
||||
if (!_PyAST_Optimize(module, arena, _Py_GetConfig()->optimization_level, 0)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue