cpython/Lib/ctypes
Serhiy Storchaka 36153494f1
[3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113624)
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-01 16:46:07 +00:00
..
macholib gh-91265: Make old ctypes.macholib tests runned by python -m test (gh-32094) 2022-04-18 09:27:09 +02:00
test [3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113624) 2024-01-01 16:46:07 +00:00
__init__.py bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480) 2022-03-29 14:26:27 -07:00
_aix.py Fix typos in the Lib directory (GH-28775) 2021-10-06 16:13:48 -07:00
_endian.py bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480) 2022-03-29 14:26:27 -07:00
util.py bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598) 2020-10-08 19:31:19 +01:00
wintypes.py Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers) 2010-09-28 21:08:38 +00:00