summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-05-31 19:21:46 (GMT)
committerGitHub <noreply@github.com>2023-05-31 19:21:46 (GMT)
commitf990bb8b2d8ee900fe4b0775399f6ef4ca61bb3f (patch)
treeee881a03ea85e09057749e8ef82838b657dbaa02 /Python/compile.c
parentdd29ae26f89ba7db596127b6eba83bb3a45c167b (diff)
downloadcpython-f990bb8b2d8ee900fe4b0775399f6ef4ca61bb3f.zip
cpython-f990bb8b2d8ee900fe4b0775399f6ef4ca61bb3f.tar.gz
cpython-f990bb8b2d8ee900fe4b0775399f6ef4ca61bb3f.tar.bz2
gh-105148: make _PyASTOptimizeState internal to ast_opt.c (#105149)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/compile.c b/Python/compile.c
index f2314ae..8f20e39 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -534,11 +534,7 @@ compiler_setup(struct compiler *c, mod_ty mod, PyObject *filename,
c->c_optimize = (optimize == -1) ? _Py_GetConfig()->optimization_level : optimize;
c->c_nestlevel = 0;
- _PyASTOptimizeState state;
- state.optimize = c->c_optimize;
- state.ff_features = merged;
-
- if (!_PyAST_Optimize(mod, arena, &state)) {
+ if (!_PyAST_Optimize(mod, arena, c->c_optimize, merged)) {
return ERROR;
}
c->c_st = _PySymtable_Build(mod, filename, &c->c_future);