replace (deprecated) Get/UngetWriteBuf() with wxStringBuffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
87d3473070
commit
5647b95a66
@ -1873,8 +1873,7 @@ wxString* wxString_in_helper(PyObject* source) {
|
|||||||
target = new wxString();
|
target = new wxString();
|
||||||
size_t len = PyUnicode_GET_SIZE(uni);
|
size_t len = PyUnicode_GET_SIZE(uni);
|
||||||
if (len) {
|
if (len) {
|
||||||
PyUnicode_AsWideChar((PyUnicodeObject*)uni, target->GetWriteBuf(len), len);
|
PyUnicode_AsWideChar((PyUnicodeObject*)uni, wxStringBuffer(*target, len), len);
|
||||||
target->UngetWriteBuf(len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PyString_Check(source))
|
if (PyString_Check(source))
|
||||||
@ -1916,8 +1915,7 @@ wxString Py2wxString(PyObject* source)
|
|||||||
}
|
}
|
||||||
size_t len = PyUnicode_GET_SIZE(uni);
|
size_t len = PyUnicode_GET_SIZE(uni);
|
||||||
if (len) {
|
if (len) {
|
||||||
PyUnicode_AsWideChar((PyUnicodeObject*)uni, target.GetWriteBuf(len), len);
|
PyUnicode_AsWideChar((PyUnicodeObject*)uni, wxStringBuffer(target, len), len);
|
||||||
target.UngetWriteBuf();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PyUnicode_Check(source))
|
if (!PyUnicode_Check(source))
|
||||||
|
Loading…
Reference in New Issue
Block a user