]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix compiler warning on Windows (GH-18012)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 15 Jan 2020 17:07:09 +0000 (09:07 -0800)
committerGitHub <noreply@github.com>
Wed, 15 Jan 2020 17:07:09 +0000 (09:07 -0800)
commit92135775ce12fd71f0878c0a8a0652c197fcc60b
treee76b8090dd41dcabc4c26d7a611a6e5c9b0b9eb4
parent9f220e4968cf73fa60440120ee46881e7974e47d
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 c96be811fa7d
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 e92d39303feb1d3b4194c6a8275b1fc63b2153b2)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Python/compile.c