Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit089c6d2

Browse files
JelleZijlstramonkeyman192kumaraditya303
authored
[3.13]gh-112433 add versionadded forctypes.Structure._align_ (GH-125087) (#125113)
(cherry picked from commit5967dd8)Co-authored-by: monkeyman192 <monkey_man_192@yahoo.com.au>Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent5df6a75 commit089c6d2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎Doc/library/ctypes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,6 +2540,8 @@ fields, or any other data types containing pointer type fields.
25402540
the structure when being packed or unpacked to/from memory.
25412541
Setting this attribute to 0 is the same as not setting it at all.
25422542

2543+
..versionadded::3.13
2544+
25432545
..attribute::_anonymous_
25442546

25452547
An optional sequence that lists the names of unnamed (anonymous) fields.

‎Doc/whatsnew/3.13.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,10 @@ ctypes
814814
See:gh:`124520` for discussion and links to changes in some affected
815815
projects.
816816

817+
*:class:`ctypes.Structure` objects have a new:attr:`~ctypes.Structure._align_`
818+
attribute which allows the alignment of the structure being packed to/from
819+
memory to be specified explicitly.
820+
(Contributed by Matt Sanderson in:gh:`112433`)
817821

818822
dbm
819823
---

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp