Fix compiler warning on Windows (GH-18012)

Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be811fa
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d39303f)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
This commit is contained in:
Miss Islington (bot) 2020-01-15 09:07:09 -08:00 committed by GitHub
parent 9f220e4968
commit 92135775ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,8 +23,8 @@
#include "Python.h"
#include "Python-ast.h"
#include "pycore_pystate.h" /* _PyInterpreterState_GET_UNSAFE() */
#include "Python-ast.h"
#include "ast.h"
#include "code.h"
#include "symtable.h"