summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2025-03-17 20:48:54 (GMT)
committerGitHub <noreply@github.com>2025-03-17 20:48:54 (GMT)
commitffc2f1dd1c023b44b488311511db790a96d757db (patch)
tree6b64e44cd1c26723489d2e8c3224280495470991 /Python/compile.c
parent468a7aaeb4dfcd21697dfa46362b9f415b9daf1b (diff)
downloadcpython-ffc2f1dd1c023b44b488311511db790a96d757db.zip
cpython-ffc2f1dd1c023b44b488311511db790a96d757db.tar.gz
cpython-ffc2f1dd1c023b44b488311511db790a96d757db.tar.bz2
gh-130080: implement PEP 765 (#130087)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index f5e2973..303d959 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -131,7 +131,7 @@ compiler_setup(compiler *c, mod_ty mod, PyObject *filename,
c->c_optimize = (optimize == -1) ? _Py_GetConfig()->optimization_level : optimize;
c->c_save_nested_seqs = false;
- if (!_PyAST_Optimize(mod, arena, c->c_optimize, merged)) {
+ if (!_PyAST_Optimize(mod, arena, filename, c->c_optimize, merged, 0)) {
return ERROR;
}
c->c_st = _PySymtable_Build(mod, filename, &c->c_future);
@@ -1392,7 +1392,7 @@ _PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags,
int
_PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
- int optimize, PyArena *arena)
+ int optimize, PyArena *arena, int no_const_folding)
{
_PyFutureFeatures future;
if (!_PyFuture_FromAST(mod, filename, &future)) {
@@ -1402,7 +1402,7 @@ _PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
if (optimize == -1) {
optimize = _Py_GetConfig()->optimization_level;
}
- if (!_PyAST_Optimize(mod, arena, optimize, flags)) {
+ if (!_PyAST_Optimize(mod, arena, filename, optimize, flags, no_const_folding)) {
return -1;
}
return 0;