mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
a31f117413
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
22 lines
552 B
Text
22 lines
552 B
Text
Description: rewriting code to build against swig 4.2.0
|
|
Author: Pierre Gruet <pgt@debian.org>
|
|
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 {
|