summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorMatthias Görgens <matthias.goergens@gmail.com>2024-05-29 10:02:53 (GMT)
committerGitHub <noreply@github.com>2024-05-29 10:02:53 (GMT)
commit18c1a8d3a81bf8d287a06f2985bbf65c9a9b9794 (patch)
tree6d33a4e84521f7a912484cc9e1a51a05ab66528f /Doc/whatsnew
parentc1e9647107c854439a9864b6ec4f6784aeb94ed5 (diff)
downloadcpython-18c1a8d3a81bf8d287a06f2985bbf65c9a9b9794.zip
cpython-18c1a8d3a81bf8d287a06f2985bbf65c9a9b9794.tar.gz
cpython-18c1a8d3a81bf8d287a06f2985bbf65c9a9b9794.tar.bz2
gh-97588: Align ctypes struct layout to GCC/MSVC (GH-97702)
Structure layout, and especially bitfields, sometimes resulted in clearly wrong behaviour like overlapping fields. This fixes Co-authored-by: Gregory P. Smith <gps@python.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.13.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 7edfdd4..2b1b5fd 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -656,6 +656,18 @@ copy
any user classes which define the :meth:`!__replace__` method.
(Contributed by Serhiy Storchaka in :gh:`108751`.)
+ctypes
+------
+
+* The layout of :ref:`bit fields <ctypes-bit-fields-in-structures-unions>` in
+ :class:`~ctypes.Structure` and :class:`~ctypes.Union` was improved to better
+ match platform defaults (GCC/Clang or MSC). In particular, fields no longer
+ overlap.
+ (Contributed by Matthias Görgens in :gh:`97702`.)
+* A :attr:`ctypes.Structure._layout_` class attribute can be set
+ to help match a non-default ABI.
+ (Contributed by Petr Viktorin in :gh:`97702`.)
+
dbm
---