bpo-43244: Rename pycore_ast.h to pycore_ast_state.h (GH-24907)

This commit is contained in:
Victor Stinner 2021-03-17 23:11:03 +01:00 committed by GitHub
parent e272528bbd
commit b4536e1c6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 16 deletions

View file

@ -1429,7 +1429,7 @@ def generate_module_def(mod, f, internal_h):
print(textwrap.dedent(f"""
#ifdef Py_BUILD_CORE
# include "pycore_ast.h" // struct ast_state
# include "pycore_ast_state.h" // struct ast_state
# include "pycore_interp.h" // _PyInterpreterState.ast
# include "pycore_pystate.h" // _PyInterpreterState_GET()
#else
@ -1522,8 +1522,8 @@ def write_header(mod, f):
def write_internal_h_header(mod, f):
print(textwrap.dedent("""
#ifndef Py_INTERNAL_AST_H
#define Py_INTERNAL_AST_H
#ifndef Py_INTERNAL_AST_STATE_H
#define Py_INTERNAL_AST_STATE_H
#ifdef __cplusplus
extern "C" {
#endif
@ -1540,7 +1540,7 @@ def write_internal_h_footer(mod, f):
#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERNAL_AST_H */
#endif /* !Py_INTERNAL_AST_STATE_H */
"""), file=f)