Fixes to allow compilation in Unicode mode on wxGTK2. Python's

internal Unicode representation may or may not match wchar_t.
Previously I was using the optimized APIs that assumed they were the
same, but they aren't on Linux so this checkin switches to the more
general Python APIs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-02 22:24:44 +00:00
parent 952a4831ee
commit b5ae0a9a3b
7 changed files with 27 additions and 30 deletions

View File

@@ -46,7 +46,7 @@
if (ret) {
PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
#if wxUSE_UNICODE
PyTuple_SET_ITEM(ret, 1, PyUnicode_FromUnicode(str.c_str(), str.Len()));
PyTuple_SET_ITEM(ret, 1, PyUnicode_FromWideChar(str.c_str(), str.Len()));
#else
PyTuple_SET_ITEM(ret, 1, PyString_FromStringAndSize(str.c_str(), str.Len()));
#endif