Skip to content

Commit

Permalink
[3.13] pythongh-112433 add versionadded for ctypes.Structure._align_ (
Browse files Browse the repository at this point in the history
pythonGH-125087)

(cherry picked from commit 5967dd8)

Co-authored-by: monkeyman192 <[email protected]>
Co-authored-by: Kumar Aditya <[email protected]>
  • Loading branch information
2 people authored and JelleZijlstra committed Oct 8, 2024
1 parent 0a63c66 commit f17e5dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2540,6 +2540,8 @@ fields, or any other data types containing pointer type fields.
the structure when being packed or unpacked to/from memory.
Setting this attribute to 0 is the same as not setting it at all.

.. versionadded:: 3.13

.. attribute:: _anonymous_

An optional sequence that lists the names of unnamed (anonymous) fields.
Expand Down
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,10 @@ ctypes
See :gh:`124520` for discussion and links to changes in some affected
projects.

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

dbm
---
Expand Down

0 comments on commit f17e5dd

Please sign in to comment.