FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) by serhiy-storchaka · Pull Request #113624 · python/cpython · GitHub

Repository navigation

[3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) - #113624

Merged
serhiy-storchaka merged 1 commit into
python:3.11from
serhiy-storchaka:backport-5f3cc90-3.11
Jan 1, 2024
Merged

serhiy-storchaka merged 1 commit into
python:3.11from
serhiy-storchaka:backport-5f3cc90-3.11

Conversation

serhiy-storchaka commented Jan 1, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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)

… 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 enabled auto-merge (squash) January 1, 2024 16:31
serhiy-storchaka merged commit 3615349 into python:3.11 Jan 1, 2024
serhiy-storchaka deleted the backport-5f3cc90-3.11 branch January 28, 2024 12:03
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
… 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 Sep 19, 2024
… 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 Sep 19, 2024
… 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 Jul 30, 2025
… 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>
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL