Re: SWIG 4.2 Python transition

2024-01-29 Thread Jonathan Wakely
On Fri, 26 Jan 2024 at 12:29, Florian Weimer wrote: > In the past, this kind of problem would have just compiled and resulted > in a run-time error when the Python extension module is loaded. In some > cases, issues went completely unnoticed because the Python bindins were > unused. But with GCC

SWIG 4.2 Python transition

2024-01-26 Thread Florian Weimer
Quoting CHANGES from SWIG 4.2.0: “ 2023-12-20: wsfulton #2190 Replace SWIG_Python_str_AsChar with SWIG_PyUnicode_AsUTF8AndSize. SWIG_Python_str_AsChar has undefined behaviour when Py_LIMITED_API is defined as it returns a pointer to a string in a PyBytes