]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29753: fix merging packed bitfields in ctypes struct/union (GH-19850)
authorFilipe Laíns <lains@riseup.net>
Sun, 28 Feb 2021 22:43:19 +0000 (22:43 +0000)
committerGitHub <noreply@github.com>
Sun, 28 Feb 2021 22:43:19 +0000 (14:43 -0800)
commit0d7ad9fb38c041c46094087b0cf2c8ce44916b11
treee0d20ee25c2d74126a6e4b4c3c1638e54c27806c
parentaf5fa13ef6f648fc7a7a33a7556db13887e7d643
bpo-29753: fix merging packed bitfields in ctypes struct/union (GH-19850)

From the commit message:

> When the structure is packed we should always expand when needed,
> otherwise we will add some padding between the fields. This patch makes
> sure we always merge bitfields together. It also changes the field merging
> algorithm so that it handles bitfields correctly.

Automerge-Triggered-By: GH:jaraco
Lib/ctypes/test/test_bitfields.py
Misc/NEWS.d/next/Library/2020-05-02-01-01-30.bpo-29753.n2M-AF.rst [new file with mode: 0644]
Modules/_ctypes/cfield.c