Skip to content

Commit a06b606

Browse files
authored
gh-110190: Fix ctypes structs with array on Windows ARM64 (GH-114753)
1 parent dc4cd2c commit a06b606

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ctypes structs with array on Windows ARM64 platform by setting ``MAX_STRUCT_SIZE`` to 32 in stgdict. Patch by Diego Russo

Modules/_ctypes/stgdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
707707
/*
708708
* The value of MAX_STRUCT_SIZE depends on the platform Python is running on.
709709
*/
710-
#if defined(__aarch64__) || defined(__arm__)
710+
#if defined(__aarch64__) || defined(__arm__) || defined(_M_ARM64)
711711
# define MAX_STRUCT_SIZE 32
712712
#elif defined(__powerpc64__)
713713
# define MAX_STRUCT_SIZE 64

0 commit comments

Comments
 (0)