gh-110190: Fix ctypes structs with array on Windows ARM64 (GH-114753)

(cherry picked from commit a06b606462)

Co-authored-by: Diego Russo <diego.russo@arm.com>
This commit is contained in:
Miss Islington (bot) 2024-01-31 01:08:26 +01:00 committed by GitHub
parent f1f0f2e3d7
commit d326d52478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix ctypes structs with array on Windows ARM64 platform by setting ``MAX_STRUCT_SIZE`` to 32 in stgdict. Patch by Diego Russo

View File

@ -665,7 +665,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
/*
* The value of MAX_STRUCT_SIZE depends on the platform Python is running on.
*/
#if defined(__aarch64__) || defined(__arm__)
#if defined(__aarch64__) || defined(__arm__) || defined(_M_ARM64)
# define MAX_STRUCT_SIZE 32
#elif defined(__powerpc64__)
# define MAX_STRUCT_SIZE 64