Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5967dd8

Browse files
gh-112433 add versionadded for ctypes.Structure._align_ (#125087)
Co-authored-by: Kumar Aditya <[email protected]>
1 parent e8773e5 commit 5967dd8

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)