Skip to content

Commit 72d7251

Browse files
Be careful about Yield on Windows.
1 parent b1ca420 commit 72d7251

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
/* Module definition and import implementation */
33

44
#include "Python.h"
5-
#include "internal/pystate.h"
65

76
#include "Python-ast.h"
87
#undef Yield /* undefine macro conflicting with winbase.h */
8+
#include "internal/pystate.h"
99
#include "errcode.h"
1010
#include "marshal.h"
1111
#include "code.h"

Python/pylifecycle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Python interpreter top-level routines, including init/exit */
22

33
#include "Python.h"
4-
#include "internal/pystate.h"
54

65
#include "Python-ast.h"
76
#undef Yield /* undefine macro conflicting with winbase.h */
7+
#include "internal/pystate.h"
88
#include "grammar.h"
99
#include "node.h"
1010
#include "token.h"

Python/pythonrun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
/* TODO: Cull includes following phase split */
1010

1111
#include "Python.h"
12-
#include "internal/pystate.h"
1312

1413
#include "Python-ast.h"
1514
#undef Yield /* undefine macro conflicting with winbase.h */
15+
#include "internal/pystate.h"
1616
#include "grammar.h"
1717
#include "node.h"
1818
#include "token.h"

Python/symtable.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include "Python.h"
22
#include "internal/pystate.h"
3+
#ifdef Yield
4+
#undef Yield /* undefine conflicting macro from winbase.h */
5+
#endif
36
#include "Python-ast.h"
47
#include "code.h"
58
#include "symtable.h"

0 commit comments

Comments
 (0)