diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 6e8de85b91..0dce8b8d8e 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -699,11 +699,11 @@ public: %extend { int GetUniChar() { - #if wxUSE_UNICODE + %#if wxUSE_UNICODE return self->m_uniChar; - #else + %#else return 0; - #endif + %#endif } } diff --git a/wxPython/src/gtk/core_wrap.cpp b/wxPython/src/gtk/core_wrap.cpp index 2dda32b97d..8a2fe38711 100644 --- a/wxPython/src/gtk/core_wrap.cpp +++ b/wxPython/src/gtk/core_wrap.cpp @@ -929,11 +929,11 @@ void wxEvtHandler__setOORInfo(wxEvtHandler *self,PyObject *_self){ } } int wxKeyEvent_GetUniChar(wxKeyEvent *self){ - - - + #if wxUSE_UNICODE + return self->m_uniChar; + #else return 0; - + #endif } void wxSizeEvent_SetSize(wxSizeEvent *self,wxSize size){ self->m_size = size; diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 160773953c..24d16eb352 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -571,7 +571,7 @@ void wxPy_ReinitStockObjects(bool init) obj = PyDict_GetItemString(wxPython_dict, dropwx(#name)); \ wxCHECK_RET(obj != NULL, wxT("Unable to find stock object for " #name)) \ wxCHECK_RET(wxPySwigInstance_Check(obj), wxT("Not a swig instance: " #name)); \ - ptrobj = wxPyMakeSwigPtr((void*)name, #classname); \ + ptrobj = wxPyMakeSwigPtr((void*)name, wxT(#classname)); \ PyObject_SetAttrString(obj, "this", ptrobj); \ Py_DECREF(ptrobj); } @@ -580,7 +580,7 @@ void wxPy_ReinitStockObjects(bool init) obj = PyDict_GetItemString(wxPython_dict, dropwx(#name)); \ wxCHECK_RET(obj != NULL, wxT("Unable to find stock object for " #name)) \ wxCHECK_RET(wxPySwigInstance_Check(obj), wxT("Not a swig instance: " #name)); \ - ptrobj = wxPyMakeSwigPtr((void*)&name, #classname); \ + ptrobj = wxPyMakeSwigPtr((void*)&name, wxT(#classname)); \ PyObject_SetAttrString(obj, "this", ptrobj); \ Py_DECREF(ptrobj); }