mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Replace use of deprecated PyUnicode APIs
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
}
|
||||
PyErr_Clear();
|
||||
wxString string;
|
||||
size_t len = PyUnicode_GET_SIZE(item);
|
||||
size_t len = PyUnicode_GET_LENGTH(item);
|
||||
if (len) {
|
||||
wxPyUnicode_AsWideChar(item, wxStringBuffer(string, len), len);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
}
|
||||
*sipCppPtr = new wxString();
|
||||
size_t len = PyUnicode_GET_SIZE(uni);
|
||||
size_t len = PyUnicode_GET_LENGTH(uni);
|
||||
if (len) {
|
||||
wxPyUnicode_AsWideChar(uni, wxStringBuffer(**sipCppPtr, len), len);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ static wxString i_Py2wxString(PyObject* source)
|
||||
}
|
||||
}
|
||||
wxString target;
|
||||
size_t len = PyUnicode_GET_SIZE(uni);
|
||||
size_t len = PyUnicode_GET_LENGTH(uni);
|
||||
if (len) {
|
||||
wxPyUnicode_AsWideChar(uni, wxStringBuffer(target, len), len);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ static wxString i_Py2wxString(PyObject* source)
|
||||
// }
|
||||
// }
|
||||
// // TODO: Coerce non-unicode types to unicode here? (Classic does)
|
||||
// size_t len = PyUnicode_GET_SIZE(uni);
|
||||
// size_t len = PyUnicode_GET_LENGTH(uni);
|
||||
// if (len) {
|
||||
// wxPyUnicode_AsWideChar(uni, wxStringBuffer(str, len), len);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user