bpo-35177, Python-ast.h: Fix "Yield" compiler warning (GH-10664)

Partially revert commit 5f2df88b63:
add "#undef Yield" to .c files after including Python-ast.h.

Fix the warning:

    winbase.h(102): warning C4005: 'Yield': macro redefinition
This commit is contained in:
Victor Stinner 2018-11-22 18:38:38 +01:00 committed by GitHub
parent 2cf5d32fd9
commit 3bb183d7fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 2 deletions

View file

@ -3,6 +3,7 @@
#include "Python.h"
#include <ctype.h>
#include "ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_pystate.h"
_Py_IDENTIFIER(__builtins__);

View file

@ -3,6 +3,7 @@
#include "Python.h"
#include "Python-ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_pyhash.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"

View file

@ -3,6 +3,7 @@
#include "Python.h"
#include "Python-ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_context.h"
#include "pycore_hamt.h"
#include "pycore_pathconfig.h"

View file

@ -11,6 +11,7 @@
#include "Python.h"
#include "Python-ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_pystate.h"
#include "grammar.h"
#include "node.h"

View file

@ -1,6 +1,7 @@
#include "Python.h"
#include "pycore_pystate.h"
#include "symtable.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "structmember.h"
/* error strings used for warnings */