-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
if(errTyp)
{
PyObject *ob(PyObject_Str(errTyp));
- oss2 << " type : \"" << (const char *)PyString_AsString(ob) << "\"";
+ oss2 << " type : \"" << (const char *)PyUnicode_AsUTF8(ob) << "\"";
Py_XDECREF(ob); Py_XDECREF(errTyp);
}
if(errValue)
{
PyObject *ob(PyObject_Str(errValue));
- oss2 << " value : \"" << (const char *)PyString_AsString(ob) << "\"";
+ oss2 << " value : \"" << (const char *)PyUnicode_AsUTF8(ob) << "\"";
Py_XDECREF(ob); Py_XDECREF(errValue);
}
oss2 << " )";
if(errTB)
{
PyObject *ob(PyObject_Str(errTB));
- oss2 << "( traceback : \"" << (const char *)PyString_AsString(ob) << "\"";
+ oss2 << "( traceback : \"" << (const char *)PyUnicode_AsUTF8(ob) << "\"";
Py_XDECREF(ob); Py_XDECREF(errTB);
}
oss2 << " )";