Skip to content

Commit 9d4d011

Browse files
committed
Simplify the __cplusplus branch
1 parent 28551d5 commit 9d4d011

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Include/pymacro.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@
4141
#ifdef Py_GIL_DISABLED
4242
# ifndef _Py_ALIGN_AS
4343
# ifdef __cplusplus
44-
# if (__cplusplus < 201103L) \
45-
&& (defined(__GNUC__) || defined(__clang__))
44+
# if __cplusplus >= 201103L
45+
# define _Py_ALIGN_AS(V) alignas(V)
46+
# elif defined(__GNUC__) || defined(__clang__)
4647
# define _Py_ALIGN_AS(V) __attribute__((aligned(V)))
48+
# elif defined(_MSC_VER)
49+
# define _Py_ALIGN_AS(V) __declspec(align(V))
4750
# else
4851
# define _Py_ALIGN_AS(V) alignas(V)
4952
# endif

0 commit comments

Comments
 (0)