bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252)

Rename AST functions of pycore_ast.h to use the "_PyAST_" prefix.
Remove macros creating aliases without prefix. For example, Module()
becomes _PyAST_Module(). Update Grammar/python.gram to use
_PyAST_xxx() functions.
This commit is contained in:
Victor Stinner 2021-04-07 21:34:22 +02:00 committed by GitHub
parent 58d72cab89
commit d27f8d2e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 858 additions and 907 deletions

View file

@ -451,8 +451,9 @@ astfold_body(asdl_stmt_seq *stmts, PyArena *ctx_, _PyASTOptimizeState *state)
return 0;
}
asdl_seq_SET(values, 0, st->v.Expr.value);
expr_ty expr = _Py_JoinedStr(values, st->lineno, st->col_offset,
st->end_lineno, st->end_col_offset, ctx_);
expr_ty expr = _PyAST_JoinedStr(values, st->lineno, st->col_offset,
st->end_lineno, st->end_col_offset,
ctx_);
if (!expr) {
return 0;
}