bpo-18060: Updating _fields_ of a derived struct type yields a bad cif by websurfer5 · Pull Request #13374 · python/cpython
added 2 commits
Now StgDictObject.length of Structure and Union is the number of all fields, including fields of superclases.
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request
… 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>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request
… 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>
serhiy-storchaka added a commit that referenced this pull request
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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
serhiy-storchaka added a commit that referenced this pull request
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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request
…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. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
aisk pushed a commit to aisk/cpython that referenced this pull request
…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. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request
…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. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request
… layers (pythonGH-13374) (pythonGH-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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request
… layers (pythonGH-13374) (pythonGH-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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request
… layers (pythonGH-13374) (pythonGH-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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request
… layers (pythonGH-13374) (pythonGH-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 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>