Debian Patches
Status for libratbag/0.18-2
| Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
|---|---|---|---|---|---|---|
| 0001-swig-use-the-Python-3-C-API-instead-of-the-removed-P.patch | swig: use the Python 3 C API instead of the removed PyInt_* aliases (#1878) src/libratbag.i calls PyInt_Check(), PyInt_AsLong() and PyInt_FromLong(). Those are Python 2 functions; they only ever worked because SWIG emitted compatibility macros mapping them onto their PyLong_* counterparts in the generated wrapper. SWIG 4.5.0 dropped those macros, so the generated libratbag.c no longer compiles: libratbag.c: In function '_wrap_ratbag_device_get_vendor_id': libratbag.c:4583:17: error: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? libratbag.c:4583:15: error: assignment to 'PyObject *' from 'int' makes pointer from integer without a cast [-Wint-conversion] Call the PyLong_* functions directly. The bindings are generated with swig -py3, so there is no Python 2 build to keep working, and the macros they replace expanded to exactly these functions. Built and verified on Arch Linux with swig 4.5.0, Python 3.14, meson 1.12.0, gcc 15: `_libratbag.so` and `_hidpp.so` link cleanly with the change and fail without it. |
Ayoze Torres <53948812+ayozetr@users.noreply.github.com> | no | 2026-08-12 |
