Description: rewriting code to build against swig 4.2.0 Author: Pierre Gruet Forwarded: no Last-Update: 2024-07-26 --- a/interfaces/inverse.i +++ b/interfaces/inverse.i @@ -78,7 +78,14 @@ #ifdef SWIGPYTHON %typemap(varin) char * symbolset { free(symbolset); + +#if SWIG_VERSION >= 0x040200 + PyObject *pbytes = NULL; + symbolset = strdup(SWIG_PyUnicode_AsUTF8AndSize($input, NULL, &pbytes)); + Py_XDECREF(pbytes); +#else symbolset = strdup(SWIG_Python_str_AsChar($input)); +#endif } %typemap(varout) char * symbolset {