gh-112433 add versionadded for `ctypes.Structure._align_` (#125087)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
monkeyman192 2024-10-08 23:41:46 +11:00 committed by GitHub
parent e8773e59a8
commit 5967dd8a4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -2589,6 +2589,8 @@ fields, or any other data types containing pointer type fields.
the structure when being packed or unpacked to/from memory. the structure when being packed or unpacked to/from memory.
Setting this attribute to 0 is the same as not setting it at all. Setting this attribute to 0 is the same as not setting it at all.
.. versionadded:: 3.13
.. attribute:: _layout_ .. attribute:: _layout_
An optional string naming the struct/union layout. It can currently An optional string naming the struct/union layout. It can currently

View File

@ -814,6 +814,10 @@ ctypes
See :gh:`124520` for discussion and links to changes in some affected See :gh:`124520` for discussion and links to changes in some affected
projects. 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 dbm
--- ---