Skip to content

Commit 089c6d2

Browse files
JelleZijlstramonkeyman192kumaraditya303
authored
[3.13] gh-112433 add versionadded for ctypes.Structure._align_ (GH-125087) (#125113)
(cherry picked from commit 5967dd8) Co-authored-by: monkeyman192 <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
1 parent 5df6a75 commit 089c6d2

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)