mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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:
parent
67969f5eb8
commit
d36d6a9c18
8 changed files with 320 additions and 326 deletions
3
Include/internal/pycore_ast.h
generated
3
Include/internal/pycore_ast.h
generated
|
|
@ -12,8 +12,6 @@ extern "C" {
|
|||
|
||||
#include "pycore_asdl.h"
|
||||
|
||||
#undef Yield /* undefine macro conflicting with <winbase.h> */
|
||||
|
||||
typedef struct _mod *mod_ty;
|
||||
|
||||
typedef struct _stmt *stmt_ty;
|
||||
|
|
@ -729,7 +727,6 @@ expr_ty _Py_GeneratorExp(expr_ty elt, asdl_comprehension_seq * generators, int
|
|||
#define Await(a0, a1, a2, a3, a4, a5) _Py_Await(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_Await(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
#define Yield(a0, a1, a2, a3, a4, a5) _Py_Yield(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
#define YieldFrom(a0, a1, a2, a3, a4, a5) _Py_YieldFrom(a0, a1, a2, a3, a4, a5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue