Skip to content

Commit ad5d080

Browse files
committed
_PyCompile_AstOptimize -> _PyCompile_AstProcess
1 parent 5153ea5 commit ad5d080

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Include/internal/pycore_compile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ PyAPI_FUNC(PyCodeObject*) _PyAST_Compile(
3434
int optimize,
3535
struct _arena *arena);
3636

37-
/* AST optimizations */
38-
extern int _PyCompile_AstOptimize(
37+
/* AST processing */
38+
extern int _PyCompile_AstProcess(
3939
struct _mod *mod,
4040
PyObject *filename,
4141
PyCompilerFlags *flags,

Python/bltinmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
845845
goto error;
846846
}
847847
int syntax_check_only = ((flags & PyCF_OPTIMIZED_AST) == PyCF_ONLY_AST); /* unoptiomized AST */
848-
if (_PyCompile_AstOptimize(mod, filename, &cf, optimize,
848+
if (_PyCompile_AstProcess(mod, filename, &cf, optimize,
849849
arena, syntax_check_only) < 0) {
850850
_PyArena_Free(arena);
851851
goto error;

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ _PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags,
14811481
}
14821482

14831483
int
1484-
_PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
1484+
_PyCompile_AstProcess(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
14851485
int optimize, PyArena *arena, int no_const_folding)
14861486
{
14871487
_PyFutureFeatures future;

Python/pythonrun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ Py_CompileStringObject(const char *str, PyObject *filename, int start,
14981498
}
14991499
if (flags && (flags->cf_flags & PyCF_ONLY_AST)) {
15001500
int syntax_check_only = ((flags->cf_flags & PyCF_OPTIMIZED_AST) == PyCF_ONLY_AST); /* unoptiomized AST */
1501-
if (_PyCompile_AstOptimize(mod, filename, flags, optimize, arena, syntax_check_only) < 0) {
1501+
if (_PyCompile_AstProcess(mod, filename, flags, optimize, arena, syntax_check_only) < 0) {
15021502
_PyArena_Free(arena);
15031503
return NULL;
15041504
}

0 commit comments

Comments
 (0)