cpython/Modules/_ctypes
Serhiy Storchaka 6d9af66616
[3.12] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113623)
The length field of StgDictObject for Structure class contains now
the total number of items in ffi_type_pointer.elements (excluding
the trailing null).

The old behavior of using the number of elements in the parent class can
cause the array to be truncated when it is copied, especially when there
are multiple layers of subclassing.

(cherry picked from commit 5f3cc90a12)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
2024-01-05 22:52:41 +00:00
..
_ctypes.c [3.12] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113623) 2024-01-05 22:52:41 +00:00
_ctypes_test.c [3.12] gh-110190: Fix ctypes structs with array on PPCLE64 (GH-112959) (#113170) 2024-01-05 16:45:26 +01:00
_ctypes_test.h Copy ctypes-0.9.9.4 sources from external into the trunk. 2006-03-08 19:35:11 +00:00
callbacks.c [3.12] gh-105375: Improve error handling in _ctypes (GH-105593) (#105663) 2023-06-11 20:25:27 +00:00
callproc.c gh-103092: Port _ctypes.COMError to heap type (#104020) 2023-05-04 13:03:24 +00:00
cfield.c gh-103092: Isolate _ctypes, part 1 (#103893) 2023-04-27 14:57:54 +02:00
ctypes.h gh-103092: Port _ctypes.COMError to heap type (#104020) 2023-05-04 13:03:24 +00:00
malloc_closure.c gh-99337: Fix compile errors with gcc 12 on macOS (#99470) 2022-11-21 10:50:20 +01:00
stgdict.c [3.12] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113623) 2024-01-05 22:52:41 +00:00