bpo-43244: Remove Yield macro from pycore_ast.h (GH-25243)

* pycore_ast.h no longer defines the Yield macro.
* Fix a compiler warning on Windows: "warning C4005: 'Yield': macro
  redefinition".
* Python-ast.c now defines directly functions with their real
  _Py_xxx() name, rather than xxx().
* Remove "#undef Yield" in C files including pycore_ast.h.
This commit is contained in:
Victor Stinner 2021-04-07 13:01:09 +02:00 committed by GitHub
parent 67969f5eb8
commit d36d6a9c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 320 additions and 326 deletions

View file

@ -1,6 +1,5 @@
#include "Python.h"
#include "pycore_ast.h" // identifier, stmt_ty
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_compile.h" // _Py_Mangle()
#include "pycore_parser.h" // _PyParser_ASTFromString()
#include "pycore_pystate.h" // _PyThreadState_GET()