We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a973125 commit f6d97d2Copy full SHA for f6d97d2
Lib/python/pyhead.swg
@@ -37,7 +37,9 @@
37
SWIGINTERN char*
38
SWIG_Python_str_AsChar(PyObject *str)
39
{
40
-#if PY_VERSION_HEX >= 0x03000000
+#if PY_VERSION_HEX >= 0x03030000
41
+ return (char *)PyUnicode_AsUTF8(str);
42
+#elif PY_VERSION_HEX >= 0x03000000
43
char *newstr = 0;
44
str = PyUnicode_AsUTF8String(str);
45
if (str) {
@@ -56,10 +58,10 @@ SWIG_Python_str_AsChar(PyObject *str)
56
58
#endif
57
59
}
60
-# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
61
+#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
62
+# define SWIG_Python_str_DelForPy3(x)
63
#else
-# define SWIG_Python_str_DelForPy3(x)
64
+# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
65
66
67
0 commit comments