https://github.com/python/cpython/commit/8e143b2886c7ccef1b18c10d28d16b2358dd6636
commit: 8e143b2886c7ccef1b18c10d28d16b2358dd6636
branch: 3.13
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2024-12-16T17:17:01Z
summary:

[3.13] gh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows (#127994)

gh-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.

files:
M Include/pymacro.h

diff --git a/Include/pymacro.h b/Include/pymacro.h
index e3e9cd13594814..e0378f9d27a048 100644
--- a/Include/pymacro.h
+++ b/Include/pymacro.h
@@ -47,7 +47,7 @@
 #define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
-     && !defined(__cplusplus))
+     && !defined(__cplusplus) && !defined(_MSC_VER))
 #  define Py_BUILD_ASSERT_EXPR(cond) \
     ((void)sizeof(struct { int dummy; _Static_assert(cond, #cond); }), \
      0)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to