From 5f2df88b63e50d23914e97ec778861a52abdeaad Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 12 Nov 2018 00:56:19 +0100 Subject: bpo-35177: Add dependencies between header files (GH-10361) * ast.h now includes Python-ast.h and node.h * parsetok.h now includes node.h and grammar.h * symtable.h now includes Python-ast.h * Modify asdl_c.py to enhance Python-ast.h: * Add #ifndef/#define Py_PYTHON_AST_H to be able to include the header twice * Add "extern { ... }" for C++ * Undefine "Yield" macro conflicting with winbase.h * Remove "#undef Yield" from C files, it's now done in Python-ast.h * Remove now useless includes in C files --- Python/bltinmodule.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Python/bltinmodule.c') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 6c8672adfc..6781589c29 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1,16 +1,9 @@ /* Built-in functions */ #include "Python.h" -#include "Python-ast.h" -#include "pycore_state.h" - -#include "node.h" -#include "code.h" - -#include "asdl.h" -#include "ast.h" - #include +#include "ast.h" +#include "pycore_state.h" _Py_IDENTIFIER(__builtins__); _Py_IDENTIFIER(__dict__); -- cgit v1.2.1