summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-11 23:56:19 (GMT)
committerGitHub <noreply@github.com>2018-11-11 23:56:19 (GMT)
commit5f2df88b63e50d23914e97ec778861a52abdeaad (patch)
tree23a720832fb9de901538ca03819946df679ff2cd /Modules
parentfd3a91cbf93dd7bd97f01add9c90075d63cd7316 (diff)
downloadcpython-5f2df88b63e50d23914e97ec778861a52abdeaad.zip
cpython-5f2df88b63e50d23914e97ec778861a52abdeaad.tar.gz
cpython-5f2df88b63e50d23914e97ec778861a52abdeaad.tar.bz2
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/parsermodule.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index 38e5f75..df239d6 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -32,15 +32,14 @@
#include "Python.h" /* general Python API */
#include "Python-ast.h" /* mod_ty */
+#include "ast.h"
#include "graminit.h" /* symbols defined in the grammar */
#include "node.h" /* internal parser structure */
#include "errcode.h" /* error codes for PyNode_*() */
#include "token.h" /* token definitions */
+ /* ISTERMINAL() / ISNONTERMINAL() */
#include "grammar.h"
#include "parsetok.h"
- /* ISTERMINAL() / ISNONTERMINAL() */
-#undef Yield
-#include "ast.h"
extern grammar _PyParser_Grammar; /* From graminit.c */