Skip to content

Commit 0cb1c88

Browse files
committed
_PyCompile_AstOptimize -> _PyCompile_AstProcess
1 parent c35a501 commit 0cb1c88

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
@@ -847,7 +847,7 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
847847
goto error;
848848
}
849849
int syntax_check_only = ((flags & PyCF_OPTIMIZED_AST) == PyCF_ONLY_AST); /* unoptiomized AST */
850-
if (_PyCompile_AstOptimize(mod, filename, &cf, optimize,
850+
if (_PyCompile_AstProcess(mod, filename, &cf, optimize,
851851
arena, syntax_check_only) < 0) {
852852
_PyArena_Free(arena);
853853
goto error;

Python/compile.c

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

14511451
int
1452-
_PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
1452+
_PyCompile_AstProcess(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
14531453
int optimize, PyArena *arena, int no_const_folding)
14541454
{
14551455
_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)