Skip to content

Commit 8e143b2

Browse files
authored
[3.13] pythongh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows (python#127994)
pythongh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows Change Py_BUILD_ASSERT_EXPR implementation on Windows to avoid a compiler warning about an unnamed structure.
1 parent 89f4b23 commit 8e143b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/pymacro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
4848

4949
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
50-
&& !defined(__cplusplus))
50+
&& !defined(__cplusplus) && !defined(_MSC_VER))
5151
# define Py_BUILD_ASSERT_EXPR(cond) \
5252
((void)sizeof(struct { int dummy; _Static_assert(cond, #cond); }), \
5353
0)

0 commit comments

Comments
 (0)