Package: pygobject / 3.50.0-3

Metadata

Package Version Patches format
pygobject 3.50.0-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
async Use correct T_BOOL type for _asyncio_future_blockin.patch | (download)

gi/pygi-async.h | 2 1 1 - 0 !
1 file changed, 1 insertion( ), 1 deletion(-)

 async: use correct t_bool type for _asyncio_future_blocking

Declaring a PyMemberDef with type T_BOOL requires the corresponding C
type to be char, with value 0 or 1: when the member is read, CPython
will effectively be dereferencing
`* (char *) &pygiasync._asyncio_future_blocking`.

On little-endian architectures, in practice this worked, because the
low-order bits of an int are in the first byte, which would take value
0 or 1 as desired, with all other bits zero. However, on big-endian
architectures, the low-order bits of an int are in the last byte, so
reading the _asyncio_future_blocking attribute from Python code would
in practice always produce 0, even when the int field had been set to 1
from C code.

Reference: https://docs.python.org/3/c-api/structures.html#member-types
Bug: https://gitlab.gnome.org/GNOME/pygobject/-/issues/650
Bug-Debian: https://bugs.debian.org/1085891
Signed-off-by: Simon McVittie <[email protected]>