SIGN IN SIGN UP

[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 5f3cc90a12d6df404fd6f48a0df1334902e271f2)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
S
Serhiy Storchaka committed
36153494f1fe3182bb1fdef89839b594a70d570d
Parent: 5169113
Committed by GitHub <noreply@github.com> on 1/1/2024, 4:46:07 PM