Debian Codegraph @

debian/patches/build-with-swig-4.5.0.patch

raw
1 Description: Build with swig 4.5.0
2 Without this patch, the package FTBFS with swig 4.5.0. This is due to
3 the removal of the Python 2 compatibility macros in version 4.5.0. [1]
4 According to the SWIG authors, these macros were retained in the
5 generated code (pyhead.swg) solely for user typemaps. All typemap
6 using these macros are updated to call the Python 3 C API
7 directly.
8 .
9 [1] https://github.com/swig/swig/commit/79f7a2b7cb7ddc256eba09c8770133148025171d
10 Author: Rafael Laboissière <[email protected]>
11 Bug-Debian: https://bugs.debian.org/1144962
12 Forwarded: not-needed
13 Last-Update: 2026-08-30
14
15 --- qpid-proton-0.37.0.orig/python/cproton.i
16 +++ qpid-proton-0.37.0/python/cproton.i
17 @@ -474,7 +474,7 @@ int pn_ssl_get_cert_fingerprint(pn_ssl_t
18 PyObject *pytracer = (PyObject *) pn_record_get(pn_transport_attachments(transport), PNI_PYTRACER);
19 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
20 PyObject *pytrans = SWIG_NewPointerObj(transport, SWIGTYPE_p_pn_transport_t, 0);
21 - PyObject *pymsg = PyString_FromString(message);
22 + PyObject *pymsg = PyUnicode_FromString(message);
23 PyObject *result = PyObject_CallFunctionObjArgs(pytracer, pytrans, pymsg, NULL);
24 if (!result) {
25 PyErr_PrintEx(true);