Skip to content

Commit b5d219e

Browse files
committed
__declspec(align(8)) for Windows
1 parent a6f17c9 commit b5d219e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Modules/arraymodule.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,22 @@ struct arraydescr {
4242
int is_signed;
4343
};
4444

45+
#ifdef _MSC_VER
46+
47+
typedef __declspec(align(8)) struct {
48+
Py_ssize_t allocated;
49+
char items[];
50+
} arraydata;
51+
52+
#else
53+
4554
typedef struct {
4655
Py_ssize_t allocated;
4756
_Alignas(8) char items[];
4857
} arraydata;
4958

59+
#endif
60+
5061
typedef struct arrayobject {
5162
PyObject_VAR_HEAD
5263
arraydata *data;

0 commit comments

Comments
 (0)