13 lines
503 B
Diff
13 lines
503 B
Diff
|
--- ./python_orocos_kdl/PyKDL/std_string.sip.orig 2023-09-29 20:22:49.017791953 -0400
|
||
|
+++ ./python_orocos_kdl/PyKDL/std_string.sip 2023-09-29 20:23:50.063156359 -0400
|
||
|
@@ -49,7 +49,8 @@
|
||
|
}
|
||
|
if (PyUnicode_Check(sipPy)) {
|
||
|
PyObject* s = PyUnicode_AsEncodedString(sipPy, "UTF-8", "");
|
||
|
- *sipCppPtr = new std::string(PyUnicode_AS_DATA(s));
|
||
|
+ const char *sb = PyBytes_AsString(s);
|
||
|
+ *sipCppPtr = new std::string(sb ? sb : "");
|
||
|
Py_DECREF(s);
|
||
|
return 1;
|
||
|
}
|