Skip to content

Commit

Permalink
Update VisusPy.common
Browse files Browse the repository at this point in the history
  • Loading branch information
scrgiorgio committed May 7, 2024
1 parent c390607 commit 7eccccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libs/swig/VisusPy.common
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ For support : support@visus.net

#include <Visus/Kernel.h>


static String convertToString(PyObject* value)
{
if (!value) return "";
PyObject* py_str = PyObject_Str(value);
auto tmp = SWIG_Python_str_AsChar(py_str);
const char* tmp = py_str? PyUnicode_AsUTF8(py_str) : nullptr; //cit "The caller is not responsible for deallocating the buffer."
String ret = tmp ? tmp : "";
SWIG_Python_str_DelForPy3(tmp);
Py_DECREF(py_str);
return ret;
}
Expand Down

0 comments on commit 7eccccc

Please sign in to comment.