https://github.com/python/cpython/commit/d326d5247822619cbea3c715024e29b74d335db9 commit: d326d5247822619cbea3c715024e29b74d335db9 branch: 3.11 author: Miss Islington (bot) <[email protected]> committer: zooba <[email protected]> date: 2024-01-31T00:08:26Z summary:
gh-110190: Fix ctypes structs with array on Windows ARM64 (GH-114753) (cherry picked from commit a06b606462740058b5d52fefdcdcd679d4f40260) Co-authored-by: Diego Russo <[email protected]> files: A Misc/NEWS.d/next/Library/2024-01-30-15-34-08.gh-issue-110190.Z5PQQX.rst M Modules/_ctypes/stgdict.c diff --git a/Misc/NEWS.d/next/Library/2024-01-30-15-34-08.gh-issue-110190.Z5PQQX.rst b/Misc/NEWS.d/next/Library/2024-01-30-15-34-08.gh-issue-110190.Z5PQQX.rst new file mode 100644 index 00000000000000..af77e409963e04 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-01-30-15-34-08.gh-issue-110190.Z5PQQX.rst @@ -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 diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c index 777d7e194f5792..cbf129d8b3c0e5 100644 --- a/Modules/_ctypes/stgdict.c +++ b/Modules/_ctypes/stgdict.c @@ -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 _______________________________________________ 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]
