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:
@@ -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
|
||||
|
Reference in New Issue
Block a user