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

Commit5967dd8

Browse files
gh-112433 add versionadded forctypes.Structure._align_ (#125087)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parente8773e5 commit5967dd8

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
@@ -2589,6 +2589,8 @@ fields, or any other data types containing pointer type fields.
25892589
the structure when being packed or unpacked to/from memory.
25902590
Setting this attribute to 0 is the same as not setting it at all.
25912591

2592+
..versionadded::3.13
2593+
25922594
..attribute::_layout_
25932595

25942596
An optional string naming the struct/union layout. It can currently

‎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