Skip to content

Commit 59982dd

Browse files
Merge pull request #8 from jamesclement1776/codex/fix-argument-error-in-_pyast_preprocess
Fix _PyAST_Preprocess call sites
2 parents b112dba + 2bc43b3 commit 59982dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Python/compile.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ compiler_setup(compiler *c, mod_ty mod, PyObject *filename,
137137
c->c_optimize = (optimize == -1) ? _Py_GetConfig()->optimization_level : optimize;
138138
c->c_save_nested_seqs = false;
139139

140-
if (!_PyAST_Preprocess(mod, arena, filename, c->c_optimize, merged, 0)) {
140+
if (!_PyAST_Preprocess(mod, arena, filename,
141+
c->c_optimize, merged, 0, 1)) {
141142
return ERROR;
142143
}
143144
c->c_st = _PySymtable_Build(mod, filename, &c->c_future);
@@ -1518,7 +1519,8 @@ _PyCompile_AstPreprocess(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
15181519
if (optimize == -1) {
15191520
optimize = _Py_GetConfig()->optimization_level;
15201521
}
1521-
if (!_PyAST_Preprocess(mod, arena, filename, optimize, flags, no_const_folding)) {
1522+
if (!_PyAST_Preprocess(mod, arena, filename,
1523+
optimize, flags, no_const_folding, 1)) {
15221524
return -1;
15231525
}
15241526
return 0;

0 commit comments

Comments
 (0)