aboutsummaryrefslogtreecommitdiff
path: root/academic/ViennaRNA/swig_4.2.0.txt
blob: 80c1ba2b822f7222908293fa0dda5678368fdca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 {