[3.12] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) by serhiy-storchaka · Pull Request #113623 · python/cpython
… layers (pythonGH-13374) 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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This was referenced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters