]> granicus.if.org Git - python/commit
bpo-35177: Add dependencies between header files (GH-10361)
authorVictor Stinner <vstinner@redhat.com>
Sun, 11 Nov 2018 23:56:19 +0000 (00:56 +0100)
committerGitHub <noreply@github.com>
Sun, 11 Nov 2018 23:56:19 +0000 (00:56 +0100)
commit5f2df88b63e50d23914e97ec778861a52abdeaad
tree23a720832fb9de901538ca03819946df679ff2cd
parentfd3a91cbf93dd7bd97f01add9c90075d63cd7316
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
13 files changed:
Include/Python-ast.h
Include/ast.h
Include/parsetok.h
Include/symtable.h
Modules/parsermodule.c
Parser/asdl_c.py
Python/ast_opt.c
Python/bltinmodule.c
Python/compile.c
Python/import.c
Python/pylifecycle.c
Python/pythonrun.c
Python/symtable.c