Commit 898810e1 authored by Francis Herne's avatar Francis Herne
Browse files

Remove use of deprecated PyUnicode_AS_UNICODE

parent f6fb3323
......@@ -61,10 +61,8 @@ QString PyUnicodeObjectToQString(PyObject* obj) {
return QString::fromUtf16(PyUnicode_2BYTE_DATA(str), length);
case PyUnicode_4BYTE_KIND:
return QString::fromUcs4(PyUnicode_4BYTE_DATA(str), length);
case PyUnicode_WCHAR_KIND:
qWarning("PyUnicode_KIND(%p) returned PyUnicode_WCHAR_KIND, this should not happen!", (void*)str);
return QString::fromWCharArray(PyUnicode_AS_UNICODE(str), length);
}
qCritical("PyUnicode_KIND(%p) returned an unexpected value, this should not happen!", (void*)str);
Q_UNREACHABLE();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment