From c8bc7bb84dcca816055d5876e4772551c48acda5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 10 Mar 2002 00:29:04 +0000 Subject: [PATCH] Applied and merged patch 486364, which enables wxPython to be built in unicode mode. There are a number of things still missing in it and not everything is converted correctly... But it now builds and functions properly again in non-unicode mode so this is a good time to check in everything. The previous version of all of wxPython sources is tagged wxPy_B4_UNICODE. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/dllwidget/dllwidget_.cpp | 71 +- wxPython/contrib/gizmos/gizmos.cpp | 113 +- wxPython/contrib/glcanvas/gtk/glcanvas.cpp | 38 +- wxPython/contrib/glcanvas/msw/glcanvas.cpp | 38 +- wxPython/contrib/ogl/ogl.cpp | 10 +- wxPython/contrib/ogl/oglbasic.cpp | 679 ++++---- wxPython/contrib/ogl/oglcanvas.cpp | 140 +- wxPython/contrib/ogl/oglshapes.cpp | 777 +++++---- wxPython/contrib/ogl/oglshapes2.cpp | 491 +++--- wxPython/contrib/stc/gtk/stc_.cpp | 1122 +++++-------- wxPython/contrib/stc/msw/stc_.cpp | 1122 +++++-------- wxPython/contrib/xrc/xrc.cpp | 273 +--- wxPython/setup.py | 25 +- wxPython/src/clip_dnd.i | 2 +- wxPython/src/events.i | 4 + wxPython/src/export.h | 2 + wxPython/src/grid.i | 30 +- wxPython/src/gtk/calendar.cpp | 108 +- wxPython/src/gtk/clip_dnd.cpp | 279 ++-- wxPython/src/gtk/cmndlgs.cpp | 582 +++---- wxPython/src/gtk/controls.cpp | 1264 +++++---------- wxPython/src/gtk/controls2.cpp | 1084 +++++-------- wxPython/src/gtk/events.cpp | 486 +++--- wxPython/src/gtk/filesys.cpp | 600 ++----- wxPython/src/gtk/frames.cpp | 301 +--- wxPython/src/gtk/gdi.cpp | 1096 +++++-------- wxPython/src/gtk/grid.cpp | 1218 ++++++-------- wxPython/src/gtk/help.cpp | 132 +- wxPython/src/gtk/html.cpp | 978 ++++-------- wxPython/src/gtk/htmlhelp.cpp | 781 ++------- wxPython/src/gtk/image.cpp | 582 ++----- wxPython/src/gtk/mdi.cpp | 114 +- wxPython/src/gtk/misc.cpp | 450 +++--- wxPython/src/gtk/misc2.cpp | 1675 ++++++++----------- wxPython/src/gtk/printfw.cpp | 470 +++--- wxPython/src/gtk/sizers.cpp | 174 +- wxPython/src/gtk/stattool.cpp | 448 ++---- wxPython/src/gtk/streams.cpp | 55 +- wxPython/src/gtk/utils.cpp | 1096 ++++--------- wxPython/src/gtk/windows.cpp | 1185 +++++--------- wxPython/src/gtk/windows2.cpp | 173 +- wxPython/src/gtk/windows3.cpp | 159 +- wxPython/src/gtk/wx.cpp | 139 +- wxPython/src/helpers.cpp | 181 ++- wxPython/src/helpers.h | 25 +- wxPython/src/htmlhelp.i | 15 +- wxPython/src/misc.i | 7 +- wxPython/src/misc2.i | 98 +- wxPython/src/msw/calendar.cpp | 108 +- wxPython/src/msw/clip_dnd.cpp | 304 ++-- wxPython/src/msw/cmndlgs.cpp | 582 +++---- wxPython/src/msw/controls.cpp | 1204 +++++--------- wxPython/src/msw/controls2.cpp | 1096 +++++-------- wxPython/src/msw/events.cpp | 486 +++--- wxPython/src/msw/filesys.cpp | 600 ++----- wxPython/src/msw/frames.cpp | 301 +--- wxPython/src/msw/gdi.cpp | 1237 ++++++-------- wxPython/src/msw/grid.cpp | 1218 ++++++-------- wxPython/src/msw/help.cpp | 132 +- wxPython/src/msw/html.cpp | 978 ++++-------- wxPython/src/msw/htmlhelp.cpp | 781 ++------- wxPython/src/msw/image.cpp | 580 ++----- wxPython/src/msw/mdi.cpp | 120 +- wxPython/src/msw/misc.cpp | 452 +++--- wxPython/src/msw/misc2.cpp | 1681 ++++++++------------ wxPython/src/msw/printfw.cpp | 525 +++--- wxPython/src/msw/sizers.cpp | 174 +- wxPython/src/msw/stattool.cpp | 448 ++---- wxPython/src/msw/streams.cpp | 55 +- wxPython/src/msw/utils.cpp | 1096 ++++--------- wxPython/src/msw/windows.cpp | 1219 +++++--------- wxPython/src/msw/windows2.cpp | 187 +-- wxPython/src/msw/windows3.cpp | 159 +- wxPython/src/msw/wx.cpp | 143 +- wxPython/src/my_typemaps.i | 70 +- wxPython/src/streams.i | 4 + wxPython/src/utils.i | 22 +- wxPython/src/wx.i | 6 + 78 files changed, 13139 insertions(+), 23721 deletions(-) diff --git a/wxPython/contrib/dllwidget/dllwidget_.cpp b/wxPython/contrib/dllwidget/dllwidget_.cpp index 00c32c91c7..8d53ec8215 100644 --- a/wxPython/contrib/dllwidget/dllwidget_.cpp +++ b/wxPython/contrib/dllwidget/dllwidget_.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -158,41 +152,15 @@ static PyObject *_wrap_new_wxDllWidget(PyObject *self, PyObject *args, PyObject } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -208,7 +176,7 @@ static PyObject *_wrap_new_wxDllWidget(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDllWidget *)new_wxDllWidget(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6); + _result = (wxDllWidget *)new_wxDllWidget(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -250,7 +218,7 @@ static PyObject *_wrap_wxDllWidget_Ok(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDllWidget_Ok(_arg0); + _result = (bool )wxDllWidget_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -281,26 +249,13 @@ static PyObject *_wrap_wxDllWidget_SendCommand(PyObject *self, PyObject *args, P } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDllWidget_SendCommand(_arg0,_arg1,*_arg2); + _result = (int )wxDllWidget_SendCommand(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -332,7 +287,7 @@ static PyObject *_wrap_wxDllWidget_GetWidgetWindow(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxDllWidget_GetWidgetWindow(_arg0); + _result = (wxWindow *)wxDllWidget_GetWidgetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -350,12 +305,16 @@ static PyObject *_wrap_wxDllWidget_GetDllExt(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDllWidget::GetDllExt()); + _result = new wxString (wxDllWidget::GetDllExt()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; diff --git a/wxPython/contrib/gizmos/gizmos.cpp b/wxPython/contrib/gizmos/gizmos.cpp index 57c3977aa8..41fc000205 100644 --- a/wxPython/contrib/gizmos/gizmos.cpp +++ b/wxPython/contrib/gizmos/gizmos.cpp @@ -88,12 +88,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - typedef wxTreeCtrl wxPyTreeCtrl; class wxPyTreeCompanionWindow: public wxTreeCompanionWindow @@ -173,7 +167,7 @@ static PyObject *_wrap_new_wxDynamicSashSplitEvent(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDynamicSashSplitEvent *)new_wxDynamicSashSplitEvent(_arg0); + _result = (wxDynamicSashSplitEvent *)new_wxDynamicSashSplitEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -232,7 +226,7 @@ static PyObject *_wrap_new_wxDynamicSashUnifyEvent(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDynamicSashUnifyEvent *)new_wxDynamicSashUnifyEvent(_arg0); + _result = (wxDynamicSashUnifyEvent *)new_wxDynamicSashUnifyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -312,7 +306,7 @@ static PyObject *_wrap_new_wxDynamicSashWindow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDynamicSashWindow *)new_wxDynamicSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxDynamicSashWindow *)new_wxDynamicSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -338,7 +332,7 @@ static PyObject *_wrap_new_wxPreDynamicSashWindow(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDynamicSashWindow *)new_wxPreDynamicSashWindow(); + _result = (wxDynamicSashWindow *)new_wxPreDynamicSashWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -402,7 +396,7 @@ static PyObject *_wrap_wxDynamicSashWindow_Create(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDynamicSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxDynamicSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -440,7 +434,7 @@ static PyObject *_wrap_wxDynamicSashWindow_GetHScrollBar(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)wxDynamicSashWindow_GetHScrollBar(_arg0,_arg1); + _result = (wxScrollBar *)wxDynamicSashWindow_GetHScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -484,7 +478,7 @@ static PyObject *_wrap_wxDynamicSashWindow_GetVScrollBar(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)wxDynamicSashWindow_GetVScrollBar(_arg0,_arg1); + _result = (wxScrollBar *)wxDynamicSashWindow_GetVScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -561,22 +555,9 @@ static PyObject *_wrap_new_wxEditableListBox(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -592,7 +573,7 @@ static PyObject *_wrap_new_wxEditableListBox(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEditableListBox *)new_wxEditableListBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxEditableListBox *)new_wxEditableListBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -638,15 +619,20 @@ static PyObject *_wrap_wxEditableListBox_SetStrings(PyObject *self, PyObject *ar int i, len=PySequence_Length(_obj1); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg1->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEditableListBox_SetStrings(_arg0,*_arg1); + wxEditableListBox_SetStrings(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -683,7 +669,7 @@ static PyObject *_wrap_wxEditableListBox_GetStrings(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxEditableListBox_GetStrings(_arg0); + _result = (PyObject *)wxEditableListBox_GetStrings(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -774,7 +760,7 @@ static PyObject *_wrap_new_wxRemotelyScrolledTreeCtrl(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRemotelyScrolledTreeCtrl *)new_wxRemotelyScrolledTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxRemotelyScrolledTreeCtrl *)new_wxRemotelyScrolledTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -807,7 +793,7 @@ static PyObject *_wrap_wxRemotelyScrolledTreeCtrl_HideVScrollbar(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRemotelyScrolledTreeCtrl_HideVScrollbar(_arg0); + wxRemotelyScrolledTreeCtrl_HideVScrollbar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -835,7 +821,7 @@ static PyObject *_wrap_wxRemotelyScrolledTreeCtrl_AdjustRemoteScrollbars(PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRemotelyScrolledTreeCtrl_AdjustRemoteScrollbars(_arg0); + wxRemotelyScrolledTreeCtrl_AdjustRemoteScrollbars(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -865,7 +851,7 @@ static PyObject *_wrap_wxRemotelyScrolledTreeCtrl_GetScrolledWindow(PyObject *se } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrolledWindow *)wxRemotelyScrolledTreeCtrl_GetScrolledWindow(_arg0); + _result = (wxScrolledWindow *)wxRemotelyScrolledTreeCtrl_GetScrolledWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -900,7 +886,7 @@ static PyObject *_wrap_wxRemotelyScrolledTreeCtrl_ScrollToLine(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRemotelyScrolledTreeCtrl_ScrollToLine(_arg0,_arg1,_arg2); + wxRemotelyScrolledTreeCtrl_ScrollToLine(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -937,7 +923,7 @@ static PyObject *_wrap_wxRemotelyScrolledTreeCtrl_SetCompanionWindow(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRemotelyScrolledTreeCtrl_SetCompanionWindow(_arg0,_arg1); + wxRemotelyScrolledTreeCtrl_SetCompanionWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -966,7 +952,7 @@ static PyObject *_wrap_wxRemotelyScrolledTreeCtrl_GetCompanionWindow(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxRemotelyScrolledTreeCtrl_GetCompanionWindow(_arg0); + _result = (wxWindow *)wxRemotelyScrolledTreeCtrl_GetCompanionWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1039,7 +1025,7 @@ static PyObject *_wrap_new_wxTreeCompanionWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeCompanionWindow *)new_wxTreeCompanionWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxPyTreeCompanionWindow *)new_wxTreeCompanionWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1082,7 +1068,7 @@ static PyObject *_wrap_wxTreeCompanionWindow__setCallbackInfo(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCompanionWindow__setCallbackInfo(_arg0,_arg1,_arg2); + wxTreeCompanionWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1112,7 +1098,7 @@ static PyObject *_wrap_wxTreeCompanionWindow_GetTreeCtrl(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRemotelyScrolledTreeCtrl *)wxTreeCompanionWindow_GetTreeCtrl(_arg0); + _result = (wxRemotelyScrolledTreeCtrl *)wxTreeCompanionWindow_GetTreeCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1154,7 +1140,7 @@ static PyObject *_wrap_wxTreeCompanionWindow_SetTreeCtrl(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCompanionWindow_SetTreeCtrl(_arg0,_arg1); + wxTreeCompanionWindow_SetTreeCtrl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1236,7 +1222,7 @@ static PyObject *_wrap_new_wxThinSplitterWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxThinSplitterWindow *)new_wxThinSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxThinSplitterWindow *)new_wxThinSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1317,7 @@ static PyObject *_wrap_new_wxSplitterScrolledWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterScrolledWindow *)new_wxSplitterScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxSplitterScrolledWindow *)new_wxSplitterScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1418,7 +1404,7 @@ static PyObject *_wrap_new_wxLEDNumberCtrl(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLEDNumberCtrl *)new_wxLEDNumberCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxLEDNumberCtrl *)new_wxLEDNumberCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1444,7 +1430,7 @@ static PyObject *_wrap_new_wxPreLEDNumberCtrl(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLEDNumberCtrl *)new_wxPreLEDNumberCtrl(); + _result = (wxLEDNumberCtrl *)new_wxPreLEDNumberCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1507,7 +1493,7 @@ static PyObject *_wrap_wxLEDNumberCtrl_Create(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLEDNumberCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); + _result = (bool )wxLEDNumberCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1535,7 +1521,7 @@ static PyObject *_wrap_wxLEDNumberCtrl_GetAlignment(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLEDValueAlign )wxLEDNumberCtrl_GetAlignment(_arg0); + _result = (wxLEDValueAlign )wxLEDNumberCtrl_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1563,7 +1549,7 @@ static PyObject *_wrap_wxLEDNumberCtrl_GetDrawFaded(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLEDNumberCtrl_GetDrawFaded(_arg0); + _result = (bool )wxLEDNumberCtrl_GetDrawFaded(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1591,13 +1577,17 @@ static PyObject *_wrap_wxLEDNumberCtrl_GetValue(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxLEDNumberCtrl_GetValue(_arg0); + const wxString & _result_ref = wxLEDNumberCtrl_GetValue(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1625,7 +1615,7 @@ static PyObject *_wrap_wxLEDNumberCtrl_SetAlignment(PyObject *self, PyObject *ar _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLEDNumberCtrl_SetAlignment(_arg0,_arg1,_arg2); + wxLEDNumberCtrl_SetAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1659,7 +1649,7 @@ static PyObject *_wrap_wxLEDNumberCtrl_SetDrawFaded(PyObject *self, PyObject *ar _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLEDNumberCtrl_SetDrawFaded(_arg0,_arg1,_arg2); + wxLEDNumberCtrl_SetDrawFaded(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1690,27 +1680,14 @@ static PyObject *_wrap_wxLEDNumberCtrl_SetValue(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLEDNumberCtrl_SetValue(_arg0,*_arg1,_arg2); + wxLEDNumberCtrl_SetValue(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index 0260e934f4..bcd5ea8021 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -139,7 +133,7 @@ static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2); + _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -172,7 +166,7 @@ static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGLContext(_arg0); + delete_wxGLContext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -200,7 +194,7 @@ static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetCurrent(_arg0); + wxGLContext_SetCurrent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -229,7 +223,7 @@ static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetColour(_arg0,_arg1); + wxGLContext_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -257,7 +251,7 @@ static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SwapBuffers(_arg0); + wxGLContext_SwapBuffers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -285,7 +279,7 @@ static PyObject *_wrap_wxGLContext_SetupPixelFormat(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetupPixelFormat(_arg0); + wxGLContext_SetupPixelFormat(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -322,7 +316,7 @@ static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetupPalette(_arg0,*_arg1); + wxGLContext_SetupPalette(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -352,7 +346,7 @@ static PyObject *_wrap_wxGLContext_CreateDefaultPalette(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0)); + _result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -382,7 +376,7 @@ static PyObject *_wrap_wxGLContext_GetPalette(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPalette *)wxGLContext_GetPalette(_arg0); + _result = (wxPalette *)wxGLContext_GetPalette(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -416,7 +410,7 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGLContext_GetWindow(_arg0); + _result = (wxWindow *)wxGLContext_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -515,7 +509,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); + _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -608,7 +602,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); + _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -644,7 +638,7 @@ static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetCurrent(_arg0); + wxGLCanvas_SetCurrent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -673,7 +667,7 @@ static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetColour(_arg0,_arg1); + wxGLCanvas_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -701,7 +695,7 @@ static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SwapBuffers(_arg0); + wxGLCanvas_SwapBuffers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -731,7 +725,7 @@ static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); + _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp index 933600f418..8073f3000e 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -139,7 +133,7 @@ static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2); + _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -172,7 +166,7 @@ static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGLContext(_arg0); + delete_wxGLContext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -200,7 +194,7 @@ static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetCurrent(_arg0); + wxGLContext_SetCurrent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -229,7 +223,7 @@ static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetColour(_arg0,_arg1); + wxGLContext_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -257,7 +251,7 @@ static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SwapBuffers(_arg0); + wxGLContext_SwapBuffers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -286,7 +280,7 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGLContext_GetWindow(_arg0); + _result = (wxWindow *)wxGLContext_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -385,7 +379,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); + _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -478,7 +472,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); + _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -514,7 +508,7 @@ static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetCurrent(_arg0); + wxGLCanvas_SetCurrent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -543,7 +537,7 @@ static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetColour(_arg0,_arg1); + wxGLCanvas_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -571,7 +565,7 @@ static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SwapBuffers(_arg0); + wxGLCanvas_SwapBuffers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -601,7 +595,7 @@ static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); + _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -650,7 +644,7 @@ static PyObject *_wrap_wxGLCanvas_SetupPixelFormat(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetupPixelFormat(_arg0,_arg1); + wxGLCanvas_SetupPixelFormat(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -690,7 +684,7 @@ static PyObject *_wrap_wxGLCanvas_SetupPalette(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetupPalette(_arg0,*_arg1); + wxGLCanvas_SetupPalette(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -720,7 +714,7 @@ static PyObject *_wrap_wxGLCanvas_CreateDefaultPalette(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0)); + _result = new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -750,7 +744,7 @@ static PyObject *_wrap_wxGLCanvas_GetPalette(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPalette *)wxGLCanvas_GetPalette(_arg0); + _result = (wxPalette *)wxGLCanvas_GetPalette(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp index 0d7cb576ec..9de0ddb93f 100644 --- a/wxPython/contrib/ogl/ogl.cpp +++ b/wxPython/contrib/ogl/ogl.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - //--------------------------------------------------------------------------- // This one will work for any class for the VERY generic cases, but beyond that // the helper needs to know more about the type. @@ -230,7 +224,7 @@ static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxOGLInitialize(); + wxOGLInitialize(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -248,7 +242,7 @@ static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxOGLCleanUp(); + wxOGLCleanUp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index 540dc1c332..482538b0b2 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - WXSHAPE_IMP_CALLBACKS(wxPyShapeEvtHandler,wxShapeEvtHandler); WXSHAPE_IMP_CALLBACKS(wxPyShape, wxShape); @@ -117,7 +111,7 @@ static PyObject *_wrap_new_wxShapeRegion(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxShapeRegion *)new_wxShapeRegion(); + _result = (wxShapeRegion *)new_wxShapeRegion(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -151,26 +145,13 @@ static PyObject *_wrap_wxShapeRegion_SetText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetText(_arg0,*_arg1); + wxShapeRegion_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -224,7 +205,7 @@ static PyObject *_wrap_wxShapeRegion_SetFont(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetFont(_arg0,_arg1); + wxShapeRegion_SetFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -254,7 +235,7 @@ static PyObject *_wrap_wxShapeRegion_SetMinSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetMinSize(_arg0,_arg1,_arg2); + wxShapeRegion_SetMinSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -284,7 +265,7 @@ static PyObject *_wrap_wxShapeRegion_SetSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetSize(_arg0,_arg1,_arg2); + wxShapeRegion_SetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -314,7 +295,7 @@ static PyObject *_wrap_wxShapeRegion_SetPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetPosition(_arg0,_arg1,_arg2); + wxShapeRegion_SetPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -344,7 +325,7 @@ static PyObject *_wrap_wxShapeRegion_SetProportions(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetProportions(_arg0,_arg1,_arg2); + wxShapeRegion_SetProportions(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -373,7 +354,7 @@ static PyObject *_wrap_wxShapeRegion_SetFormatMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetFormatMode(_arg0,_arg1); + wxShapeRegion_SetFormatMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -402,26 +383,13 @@ static PyObject *_wrap_wxShapeRegion_SetName(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetName(_arg0,*_arg1); + wxShapeRegion_SetName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -454,26 +422,13 @@ static PyObject *_wrap_wxShapeRegion_SetColour(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetColour(_arg0,*_arg1); + wxShapeRegion_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -506,12 +461,16 @@ static PyObject *_wrap_wxShapeRegion_GetText(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxShapeRegion_GetText(_arg0)); + _result = new wxString (wxShapeRegion_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -540,7 +499,7 @@ static PyObject *_wrap_wxShapeRegion_GetFont(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)wxShapeRegion_GetFont(_arg0); + _result = (wxFont *)wxShapeRegion_GetFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -583,7 +542,7 @@ static PyObject *_wrap_wxShapeRegion_GetMinSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_GetMinSize(_arg0,_arg1,_arg2); + wxShapeRegion_GetMinSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -631,7 +590,7 @@ static PyObject *_wrap_wxShapeRegion_GetProportion(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_GetProportion(_arg0,_arg1,_arg2); + wxShapeRegion_GetProportion(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -679,7 +638,7 @@ static PyObject *_wrap_wxShapeRegion_GetSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_GetSize(_arg0,_arg1,_arg2); + wxShapeRegion_GetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -727,7 +686,7 @@ static PyObject *_wrap_wxShapeRegion_GetPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_GetPosition(_arg0,_arg1,_arg2); + wxShapeRegion_GetPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -766,7 +725,7 @@ static PyObject *_wrap_wxShapeRegion_GetFormatMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxShapeRegion_GetFormatMode(_arg0); + _result = (int )wxShapeRegion_GetFormatMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -794,12 +753,16 @@ static PyObject *_wrap_wxShapeRegion_GetName(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxShapeRegion_GetName(_arg0)); + _result = new wxString (wxShapeRegion_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -827,12 +790,16 @@ static PyObject *_wrap_wxShapeRegion_GetColour(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxShapeRegion_GetColour(_arg0)); + _result = new wxString (wxShapeRegion_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -861,7 +828,7 @@ static PyObject *_wrap_wxShapeRegion_GetActualColourObject(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxShapeRegion_GetActualColourObject(_arg0); + _result = (wxColour *)wxShapeRegion_GetActualColourObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -896,7 +863,7 @@ static PyObject *_wrap_wxShapeRegion_GetFormattedText(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxList & _result_ref = wxShapeRegion_GetFormattedText(_arg0); + wxList & _result_ref = wxShapeRegion_GetFormattedText(_arg0); _result = (wxList *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -931,12 +898,16 @@ static PyObject *_wrap_wxShapeRegion_GetPenColour(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxShapeRegion_GetPenColour(_arg0)); + _result = new wxString (wxShapeRegion_GetPenColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -964,7 +935,7 @@ static PyObject *_wrap_wxShapeRegion_GetPenStyle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxShapeRegion_GetPenStyle(_arg0); + _result = (int )wxShapeRegion_GetPenStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -992,7 +963,7 @@ static PyObject *_wrap_wxShapeRegion_SetPenStyle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetPenStyle(_arg0,_arg1); + wxShapeRegion_SetPenStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1021,26 +992,13 @@ static PyObject *_wrap_wxShapeRegion_SetPenColour(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_SetPenColour(_arg0,*_arg1); + wxShapeRegion_SetPenColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1074,7 +1032,7 @@ static PyObject *_wrap_wxShapeRegion_GetActualPen(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxShapeRegion_GetActualPen(_arg0); + _result = (wxPen *)wxShapeRegion_GetActualPen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1108,7 +1066,7 @@ static PyObject *_wrap_wxShapeRegion_GetWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxShapeRegion_GetWidth(_arg0); + _result = (double )wxShapeRegion_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1136,7 +1094,7 @@ static PyObject *_wrap_wxShapeRegion_GetHeight(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxShapeRegion_GetHeight(_arg0); + _result = (double )wxShapeRegion_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1163,7 +1121,7 @@ static PyObject *_wrap_wxShapeRegion_ClearText(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShapeRegion_ClearText(_arg0); + wxShapeRegion_ClearText(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1210,7 +1168,7 @@ static PyObject *_wrap_new_wxPyShapeEvtHandler(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeEvtHandler *)new_wxPyShapeEvtHandler(_arg0,_arg1); + _result = (wxPyShapeEvtHandler *)new_wxPyShapeEvtHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1253,7 +1211,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler__setCallbackInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyShapeEvtHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1281,7 +1239,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_Destroy(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_Destroy(_arg0); + wxPyShapeEvtHandler_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1316,7 +1274,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler__setOORInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler__setOORInfo(_arg0,_arg1); + wxPyShapeEvtHandler__setOORInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1353,7 +1311,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_SetShape(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_SetShape(_arg0,_arg1); + wxPyShapeEvtHandler_SetShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1382,7 +1340,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetShape(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShapeEvtHandler_GetShape(_arg0); + _result = (wxPyShape *)wxPyShapeEvtHandler_GetShape(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1418,7 +1376,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_SetPreviousHandler(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_SetPreviousHandler(_arg0,_arg1); + wxPyShapeEvtHandler_SetPreviousHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1447,7 +1405,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetPreviousHandler(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_GetPreviousHandler(_arg0); + _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_GetPreviousHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1475,7 +1433,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_CreateNewCopy(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_CreateNewCopy(_arg0); + _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_CreateNewCopy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1502,7 +1460,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDelete(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDelete(_arg0); + wxPyShapeEvtHandler_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1539,7 +1497,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDraw(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDraw(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1576,7 +1534,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawContents(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDrawContents(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1616,7 +1574,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawBranches(PyObject *self, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyShapeEvtHandler_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1653,7 +1611,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMoveLinks(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnMoveLinks(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1690,7 +1648,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnErase(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnErase(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1727,7 +1685,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEraseContents(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnEraseContents(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1764,7 +1722,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnHighlight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnHighlight(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1796,7 +1754,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnLeftClick(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1828,7 +1786,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnLeftDoubleClick(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1860,7 +1818,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnRightClick(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1890,7 +1848,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnSize(_arg0,_arg1,_arg2); + wxPyShapeEvtHandler_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1935,7 +1893,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMovePre(PyObject *self, PyObje _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShapeEvtHandler_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyShapeEvtHandler_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1978,7 +1936,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMovePost(PyObject *self, PyObj _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyShapeEvtHandler_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2013,7 +1971,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDragLeft(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShapeEvtHandler_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2045,7 +2003,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnBeginDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2077,7 +2035,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEndDragLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2112,7 +2070,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDragRight(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShapeEvtHandler_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2144,7 +2102,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnBeginDragRight(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2176,7 +2134,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEndDragRight(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeEvtHandler_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2217,7 +2175,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawOutline(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShapeEvtHandler_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2254,7 +2212,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawControlPoints(PyObject *se } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2291,7 +2249,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEraseControlPoints(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyShapeEvtHandler_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2331,7 +2289,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMoveLink(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyShapeEvtHandler_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2375,7 +2333,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnSizingDragLeft(PyObject *self, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyShapeEvtHandler_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2416,7 +2374,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnSizingBeginDragLeft(PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShapeEvtHandler_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2457,7 +2415,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnSizingEndDragLeft(PyObject *se } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShapeEvtHandler_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2487,7 +2445,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnBeginSize(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyShapeEvtHandler_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2517,7 +2475,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEndSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeEvtHandler_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyShapeEvtHandler_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2571,7 +2529,7 @@ static PyObject *_wrap_wxPyShape__setCallbackInfo(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2609,7 +2567,7 @@ static PyObject *_wrap_wxPyShape_GetBoundingBoxMax(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_GetBoundingBoxMax(_arg0,_arg1,_arg2); + wxPyShape_GetBoundingBoxMax(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2657,7 +2615,7 @@ static PyObject *_wrap_wxPyShape_GetBoundingBoxMin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_GetBoundingBoxMin(_arg0,_arg1,_arg2); + wxPyShape_GetBoundingBoxMin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2710,7 +2668,7 @@ static PyObject *_wrap_wxPyShape_GetPerimeterPoint(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetPerimeterPoint(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyShape_GetPerimeterPoint(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2748,7 +2706,7 @@ static PyObject *_wrap_wxPyShape_GetCanvas(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeCanvas *)wxPyShape_GetCanvas(_arg0); + _result = (wxPyShapeCanvas *)wxPyShape_GetCanvas(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2784,7 +2742,7 @@ static PyObject *_wrap_wxPyShape_SetCanvas(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetCanvas(_arg0,_arg1); + wxPyShape_SetCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2830,7 +2788,7 @@ static PyObject *_wrap_wxPyShape_AddToCanvas(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_AddToCanvas(_arg0,_arg1,_arg2); + wxPyShape_AddToCanvas(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2867,7 +2825,7 @@ static PyObject *_wrap_wxPyShape_InsertInCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_InsertInCanvas(_arg0,_arg1); + wxPyShape_InsertInCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2904,7 +2862,7 @@ static PyObject *_wrap_wxPyShape_RemoveFromCanvas(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_RemoveFromCanvas(_arg0,_arg1); + wxPyShape_RemoveFromCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2933,7 +2891,7 @@ static PyObject *_wrap_wxPyShape_GetX(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPyShape_GetX(_arg0); + _result = (double )wxPyShape_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2961,7 +2919,7 @@ static PyObject *_wrap_wxPyShape_GetY(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPyShape_GetY(_arg0); + _result = (double )wxPyShape_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2989,7 +2947,7 @@ static PyObject *_wrap_wxPyShape_SetX(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetX(_arg0,_arg1); + wxPyShape_SetX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3018,7 +2976,7 @@ static PyObject *_wrap_wxPyShape_SetY(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetY(_arg0,_arg1); + wxPyShape_SetY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3047,7 +3005,7 @@ static PyObject *_wrap_wxPyShape_GetParent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShape_GetParent(_arg0); + _result = (wxPyShape *)wxPyShape_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3083,7 +3041,7 @@ static PyObject *_wrap_wxPyShape_SetParent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetParent(_arg0,_arg1); + wxPyShape_SetParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3112,7 +3070,7 @@ static PyObject *_wrap_wxPyShape_GetTopAncestor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShape_GetTopAncestor(_arg0); + _result = (wxPyShape *)wxPyShape_GetTopAncestor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3143,7 +3101,7 @@ static PyObject *_wrap_wxPyShape_GetChildren(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyShape_GetChildren(_arg0); + _result = (PyObject *)wxPyShape_GetChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3172,7 +3130,7 @@ static PyObject *_wrap_wxPyShape_Unlink(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Unlink(_arg0); + wxPyShape_Unlink(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3203,7 +3161,7 @@ static PyObject *_wrap_wxPyShape_SetDrawHandles(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetDrawHandles(_arg0,_arg1); + wxPyShape_SetDrawHandles(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3232,7 +3190,7 @@ static PyObject *_wrap_wxPyShape_GetDrawHandles(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetDrawHandles(_arg0); + _result = (bool )wxPyShape_GetDrawHandles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3259,7 +3217,7 @@ static PyObject *_wrap_wxPyShape_MakeControlPoints(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_MakeControlPoints(_arg0); + wxPyShape_MakeControlPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3296,7 +3254,7 @@ static PyObject *_wrap_wxPyShape_DeleteControlPoints(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_DeleteControlPoints(_arg0,_arg1); + wxPyShape_DeleteControlPoints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3324,7 +3282,7 @@ static PyObject *_wrap_wxPyShape_ResetControlPoints(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ResetControlPoints(_arg0); + wxPyShape_ResetControlPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3353,7 +3311,7 @@ static PyObject *_wrap_wxPyShape_GetEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeEvtHandler *)wxPyShape_GetEventHandler(_arg0); + _result = (wxPyShapeEvtHandler *)wxPyShape_GetEventHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3389,7 +3347,7 @@ static PyObject *_wrap_wxPyShape_SetEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetEventHandler(_arg0,_arg1); + wxPyShape_SetEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3417,7 +3375,7 @@ static PyObject *_wrap_wxPyShape_MakeMandatoryControlPoints(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_MakeMandatoryControlPoints(_arg0); + wxPyShape_MakeMandatoryControlPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3445,7 +3403,7 @@ static PyObject *_wrap_wxPyShape_ResetMandatoryControlPoints(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ResetMandatoryControlPoints(_arg0); + wxPyShape_ResetMandatoryControlPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3474,7 +3432,7 @@ static PyObject *_wrap_wxPyShape_Recompute(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_Recompute(_arg0); + _result = (bool )wxPyShape_Recompute(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3501,7 +3459,7 @@ static PyObject *_wrap_wxPyShape_CalculateSize(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_CalculateSize(_arg0); + wxPyShape_CalculateSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3541,7 +3499,7 @@ static PyObject *_wrap_wxPyShape_Select(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Select(_arg0,_arg1,_arg2); + wxPyShape_Select(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3575,7 +3533,7 @@ static PyObject *_wrap_wxPyShape_SetHighlight(PyObject *self, PyObject *args, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetHighlight(_arg0,_arg1,_arg2); + wxPyShape_SetHighlight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3604,7 +3562,7 @@ static PyObject *_wrap_wxPyShape_IsHighlighted(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_IsHighlighted(_arg0); + _result = (bool )wxPyShape_IsHighlighted(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3632,7 +3590,7 @@ static PyObject *_wrap_wxPyShape_Selected(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_Selected(_arg0); + _result = (bool )wxPyShape_Selected(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3660,7 +3618,7 @@ static PyObject *_wrap_wxPyShape_AncestorSelected(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_AncestorSelected(_arg0); + _result = (bool )wxPyShape_AncestorSelected(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3691,7 +3649,7 @@ static PyObject *_wrap_wxPyShape_SetSensitivityFilter(PyObject *self, PyObject * _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetSensitivityFilter(_arg0,_arg1,_arg2); + wxPyShape_SetSensitivityFilter(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3720,7 +3678,7 @@ static PyObject *_wrap_wxPyShape_GetSensitivityFilter(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetSensitivityFilter(_arg0); + _result = (int )wxPyShape_GetSensitivityFilter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3753,7 +3711,7 @@ static PyObject *_wrap_wxPyShape_SetDraggable(PyObject *self, PyObject *args, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetDraggable(_arg0,_arg1,_arg2); + wxPyShape_SetDraggable(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3787,7 +3745,7 @@ static PyObject *_wrap_wxPyShape_SetFixedSize(PyObject *self, PyObject *args, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetFixedSize(_arg0,_arg1,_arg2); + wxPyShape_SetFixedSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3825,7 +3783,7 @@ static PyObject *_wrap_wxPyShape_GetFixedSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_GetFixedSize(_arg0,_arg1,_arg2); + wxPyShape_GetFixedSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3864,7 +3822,7 @@ static PyObject *_wrap_wxPyShape_GetFixedWidth(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetFixedWidth(_arg0); + _result = (bool )wxPyShape_GetFixedWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3892,7 +3850,7 @@ static PyObject *_wrap_wxPyShape_GetFixedHeight(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetFixedHeight(_arg0); + _result = (bool )wxPyShape_GetFixedHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3922,7 +3880,7 @@ static PyObject *_wrap_wxPyShape_SetSpaceAttachments(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetSpaceAttachments(_arg0,_arg1); + wxPyShape_SetSpaceAttachments(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3951,7 +3909,7 @@ static PyObject *_wrap_wxPyShape_GetSpaceAttachments(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetSpaceAttachments(_arg0); + _result = (bool )wxPyShape_GetSpaceAttachments(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3982,7 +3940,7 @@ static PyObject *_wrap_wxPyShape_SetShadowMode(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetShadowMode(_arg0,_arg1,_arg2); + wxPyShape_SetShadowMode(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4011,7 +3969,7 @@ static PyObject *_wrap_wxPyShape_GetShadowMode(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetShadowMode(_arg0); + _result = (int )wxPyShape_GetShadowMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4051,7 +4009,7 @@ static PyObject *_wrap_wxPyShape_HitTest(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_HitTest(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxPyShape_HitTest(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4091,7 +4049,7 @@ static PyObject *_wrap_wxPyShape_SetCentreResize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetCentreResize(_arg0,_arg1); + wxPyShape_SetCentreResize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4120,7 +4078,7 @@ static PyObject *_wrap_wxPyShape_GetCentreResize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetCentreResize(_arg0); + _result = (bool )wxPyShape_GetCentreResize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4150,7 +4108,7 @@ static PyObject *_wrap_wxPyShape_SetMaintainAspectRatio(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetMaintainAspectRatio(_arg0,_arg1); + wxPyShape_SetMaintainAspectRatio(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4179,7 +4137,7 @@ static PyObject *_wrap_wxPyShape_GetMaintainAspectRatio(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetMaintainAspectRatio(_arg0); + _result = (bool )wxPyShape_GetMaintainAspectRatio(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4210,7 +4168,7 @@ static PyObject *_wrap_wxPyShape_GetLines(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyShape_GetLines(_arg0); + _result = (PyObject *)wxPyShape_GetLines(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4242,7 +4200,7 @@ static PyObject *_wrap_wxPyShape_SetDisableLabel(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetDisableLabel(_arg0,_arg1); + wxPyShape_SetDisableLabel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4271,7 +4229,7 @@ static PyObject *_wrap_wxPyShape_GetDisableLabel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetDisableLabel(_arg0); + _result = (bool )wxPyShape_GetDisableLabel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4299,7 +4257,7 @@ static PyObject *_wrap_wxPyShape_SetAttachmentMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetAttachmentMode(_arg0,_arg1); + wxPyShape_SetAttachmentMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4328,7 +4286,7 @@ static PyObject *_wrap_wxPyShape_GetAttachmentMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetAttachmentMode(_arg0); + _result = (int )wxPyShape_GetAttachmentMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4356,7 +4314,7 @@ static PyObject *_wrap_wxPyShape_SetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetId(_arg0,_arg1); + wxPyShape_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4385,7 +4343,7 @@ static PyObject *_wrap_wxPyShape_GetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPyShape_GetId(_arg0); + _result = (long )wxPyShape_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4430,7 +4388,7 @@ static PyObject *_wrap_wxPyShape_SetPen(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetPen(_arg0,_arg1); + wxPyShape_SetPen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4474,7 +4432,7 @@ static PyObject *_wrap_wxPyShape_SetBrush(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetBrush(_arg0,_arg1); + wxPyShape_SetBrush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4505,7 +4463,7 @@ static PyObject *_wrap_wxPyShape_Show(PyObject *self, PyObject *args, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Show(_arg0,_arg1); + wxPyShape_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4534,7 +4492,7 @@ static PyObject *_wrap_wxPyShape_IsShown(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_IsShown(_arg0); + _result = (bool )wxPyShape_IsShown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4575,7 +4533,7 @@ static PyObject *_wrap_wxPyShape_Move(PyObject *self, PyObject *args, PyObject * _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Move(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxPyShape_Move(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4612,7 +4570,7 @@ static PyObject *_wrap_wxPyShape_Erase(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Erase(_arg0,*_arg1); + wxPyShape_Erase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4649,7 +4607,7 @@ static PyObject *_wrap_wxPyShape_EraseContents(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_EraseContents(_arg0,*_arg1); + wxPyShape_EraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4686,7 +4644,7 @@ static PyObject *_wrap_wxPyShape_Draw(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Draw(_arg0,*_arg1); + wxPyShape_Draw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4714,7 +4672,7 @@ static PyObject *_wrap_wxPyShape_Flash(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Flash(_arg0); + wxPyShape_Flash(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4751,7 +4709,7 @@ static PyObject *_wrap_wxPyShape_MoveLinks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_MoveLinks(_arg0,*_arg1); + wxPyShape_MoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4788,7 +4746,7 @@ static PyObject *_wrap_wxPyShape_DrawContents(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_DrawContents(_arg0,*_arg1); + wxPyShape_DrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4821,7 +4779,7 @@ static PyObject *_wrap_wxPyShape_SetSize(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetSize(_arg0,_arg1,_arg2,_arg3); + wxPyShape_SetSize(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4851,7 +4809,7 @@ static PyObject *_wrap_wxPyShape_SetAttachmentSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetAttachmentSize(_arg0,_arg1,_arg2); + wxPyShape_SetAttachmentSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4888,7 +4846,7 @@ static PyObject *_wrap_wxPyShape_Attach(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Attach(_arg0,_arg1); + wxPyShape_Attach(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4916,7 +4874,7 @@ static PyObject *_wrap_wxPyShape_Detach(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Detach(_arg0); + wxPyShape_Detach(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4945,7 +4903,7 @@ static PyObject *_wrap_wxPyShape_Constrain(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_Constrain(_arg0); + _result = (bool )wxPyShape_Constrain(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4994,7 +4952,7 @@ static PyObject *_wrap_wxPyShape_AddLine(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_AddLine(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyShape_AddLine(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5032,7 +4990,7 @@ static PyObject *_wrap_wxPyShape_GetLinePosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetLinePosition(_arg0,_arg1); + _result = (int )wxPyShape_GetLinePosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5060,26 +5018,13 @@ static PyObject *_wrap_wxPyShape_AddText(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_AddText(_arg0,*_arg1); + wxPyShape_AddText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5113,7 +5058,7 @@ static PyObject *_wrap_wxPyShape_GetPen(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxPyShape_GetPen(_arg0); + _result = (wxPen *)wxPyShape_GetPen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5148,7 +5093,7 @@ static PyObject *_wrap_wxPyShape_GetBrush(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBrush *)wxPyShape_GetBrush(_arg0); + _result = (wxBrush *)wxPyShape_GetBrush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5181,7 +5126,7 @@ static PyObject *_wrap_wxPyShape_SetDefaultRegionSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetDefaultRegionSize(_arg0); + wxPyShape_SetDefaultRegionSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5220,26 +5165,13 @@ static PyObject *_wrap_wxPyShape_FormatText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_FormatText(_arg0,*_arg1,*_arg2,_arg3); + wxPyShape_FormatText(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5273,7 +5205,7 @@ static PyObject *_wrap_wxPyShape_SetFormatMode(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetFormatMode(_arg0,_arg1,_arg2); + wxPyShape_SetFormatMode(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5303,7 +5235,7 @@ static PyObject *_wrap_wxPyShape_GetFormatMode(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetFormatMode(_arg0,_arg1); + _result = (int )wxPyShape_GetFormatMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5353,7 +5285,7 @@ static PyObject *_wrap_wxPyShape_SetFont(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetFont(_arg0,_arg1,_arg2); + wxPyShape_SetFont(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5384,7 +5316,7 @@ static PyObject *_wrap_wxPyShape_GetFont(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)wxPyShape_GetFont(_arg0,_arg1); + _result = (wxFont *)wxPyShape_GetFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5419,26 +5351,13 @@ static PyObject *_wrap_wxPyShape_SetTextColour(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetTextColour(_arg0,*_arg1,_arg2); + wxPyShape_SetTextColour(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5472,12 +5391,16 @@ static PyObject *_wrap_wxPyShape_GetTextColour(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyShape_GetTextColour(_arg0,_arg1)); + _result = new wxString (wxPyShape_GetTextColour(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5505,7 +5428,7 @@ static PyObject *_wrap_wxPyShape_GetNumberOfTextRegions(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetNumberOfTextRegions(_arg0); + _result = (int )wxPyShape_GetNumberOfTextRegions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5534,26 +5457,13 @@ static PyObject *_wrap_wxPyShape_SetRegionName(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetRegionName(_arg0,*_arg1,_arg2); + wxPyShape_SetRegionName(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5587,12 +5497,16 @@ static PyObject *_wrap_wxPyShape_GetRegionName(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyShape_GetRegionName(_arg0,_arg1)); + _result = new wxString (wxPyShape_GetRegionName(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5621,26 +5535,13 @@ static PyObject *_wrap_wxPyShape_GetRegionId(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetRegionId(_arg0,*_arg1); + _result = (int )wxPyShape_GetRegionId(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5673,26 +5574,13 @@ static PyObject *_wrap_wxPyShape_NameRegions(PyObject *self, PyObject *args, PyO } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_NameRegions(_arg0,*_arg1); + wxPyShape_NameRegions(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5728,7 +5616,7 @@ static PyObject *_wrap_wxPyShape_GetRegions(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyShape_GetRegions(_arg0); + _result = (PyObject *)wxPyShape_GetRegions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5766,7 +5654,7 @@ static PyObject *_wrap_wxPyShape_AddRegion(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_AddRegion(_arg0,_arg1); + wxPyShape_AddRegion(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5794,7 +5682,7 @@ static PyObject *_wrap_wxPyShape_ClearRegions(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ClearRegions(_arg0); + wxPyShape_ClearRegions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5822,7 +5710,7 @@ static PyObject *_wrap_wxPyShape_AssignNewIds(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_AssignNewIds(_arg0); + wxPyShape_AssignNewIds(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5857,26 +5745,13 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2); + _result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5921,7 +5796,7 @@ static PyObject *_wrap_wxPyShape_FindRegionNames(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_FindRegionNames(_arg0,*_arg1); + wxPyShape_FindRegionNames(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5950,7 +5825,7 @@ static PyObject *_wrap_wxPyShape_ClearText(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ClearText(_arg0,_arg1); + wxPyShape_ClearText(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5987,7 +5862,7 @@ static PyObject *_wrap_wxPyShape_RemoveLine(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_RemoveLine(_arg0,_arg1); + wxPyShape_RemoveLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6038,7 +5913,7 @@ static PyObject *_wrap_wxPyShape_GetAttachmentPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetAttachmentPosition(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyShape_GetAttachmentPosition(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6076,7 +5951,7 @@ static PyObject *_wrap_wxPyShape_GetNumberOfAttachments(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetNumberOfAttachments(_arg0); + _result = (int )wxPyShape_GetNumberOfAttachments(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6105,7 +5980,7 @@ static PyObject *_wrap_wxPyShape_AttachmentIsValid(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_AttachmentIsValid(_arg0,_arg1); + _result = (bool )wxPyShape_AttachmentIsValid(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6155,7 +6030,7 @@ static PyObject *_wrap_wxPyShape_GetAttachmentPositionEdge(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetAttachmentPositionEdge(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyShape_GetAttachmentPositionEdge(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6221,7 +6096,7 @@ static PyObject *_wrap_wxPyShape_CalcSimpleAttachment(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxPyShape_CalcSimpleAttachment(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); + _result = new wxRealPoint (wxPyShape_CalcSimpleAttachment(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6267,7 +6142,7 @@ static PyObject *_wrap_wxPyShape_AttachmentSortTest(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_AttachmentSortTest(_arg0,_arg1,*_arg2,*_arg3); + _result = (bool )wxPyShape_AttachmentSortTest(_arg0,_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6307,7 +6182,7 @@ static PyObject *_wrap_wxPyShape_EraseLinks(PyObject *self, PyObject *args, PyOb _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_EraseLinks(_arg0,*_arg1,_arg2,_arg3); + wxPyShape_EraseLinks(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6348,7 +6223,7 @@ static PyObject *_wrap_wxPyShape_DrawLinks(PyObject *self, PyObject *args, PyObj _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_DrawLinks(_arg0,*_arg1,_arg2,_arg3); + wxPyShape_DrawLinks(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6397,7 +6272,7 @@ static PyObject *_wrap_wxPyShape_MoveLineToNewAttachment(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_MoveLineToNewAttachment(_arg0,*_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxPyShape_MoveLineToNewAttachment(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6433,7 +6308,7 @@ static PyObject *_wrap_wxPyShape_ApplyAttachmentOrdering(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ApplyAttachmentOrdering(_arg0,_arg1); + wxPyShape_ApplyAttachmentOrdering(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6464,7 +6339,7 @@ static PyObject *_wrap_wxPyShape_GetBranchingAttachmentRoot(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxPyShape_GetBranchingAttachmentRoot(_arg0,_arg1)); + _result = new wxRealPoint (wxPyShape_GetBranchingAttachmentRoot(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6526,7 +6401,7 @@ static PyObject *_wrap_wxPyShape_GetBranchingAttachmentInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetBranchingAttachmentInfo(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5); + _result = (bool )wxPyShape_GetBranchingAttachmentInfo(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6572,7 +6447,7 @@ static PyObject *_wrap_wxPyShape_GetBranchingAttachmentPoint(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_GetBranchingAttachmentPoint(_arg0,_arg1,_arg2,*_arg3,*_arg4); + _result = (bool )wxPyShape_GetBranchingAttachmentPoint(_arg0,_arg1,_arg2,*_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6601,7 +6476,7 @@ static PyObject *_wrap_wxPyShape_GetAttachmentLineCount(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetAttachmentLineCount(_arg0,_arg1); + _result = (int )wxPyShape_GetAttachmentLineCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6629,7 +6504,7 @@ static PyObject *_wrap_wxPyShape_SetBranchNeckLength(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetBranchNeckLength(_arg0,_arg1); + wxPyShape_SetBranchNeckLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6658,7 +6533,7 @@ static PyObject *_wrap_wxPyShape_GetBranchNeckLength(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetBranchNeckLength(_arg0); + _result = (int )wxPyShape_GetBranchNeckLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6686,7 +6561,7 @@ static PyObject *_wrap_wxPyShape_SetBranchStemLength(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetBranchStemLength(_arg0,_arg1); + wxPyShape_SetBranchStemLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6715,7 +6590,7 @@ static PyObject *_wrap_wxPyShape_GetBranchStemLength(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetBranchStemLength(_arg0); + _result = (int )wxPyShape_GetBranchStemLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6743,7 +6618,7 @@ static PyObject *_wrap_wxPyShape_SetBranchSpacing(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetBranchSpacing(_arg0,_arg1); + wxPyShape_SetBranchSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6772,7 +6647,7 @@ static PyObject *_wrap_wxPyShape_GetBranchSpacing(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_GetBranchSpacing(_arg0); + _result = (int )wxPyShape_GetBranchSpacing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6800,7 +6675,7 @@ static PyObject *_wrap_wxPyShape_SetBranchStyle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_SetBranchStyle(_arg0,_arg1); + wxPyShape_SetBranchStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6829,7 +6704,7 @@ static PyObject *_wrap_wxPyShape_GetBranchStyle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPyShape_GetBranchStyle(_arg0); + _result = (long )wxPyShape_GetBranchStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6858,7 +6733,7 @@ static PyObject *_wrap_wxPyShape_PhysicalToLogicalAttachment(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_PhysicalToLogicalAttachment(_arg0,_arg1); + _result = (int )wxPyShape_PhysicalToLogicalAttachment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6887,7 +6762,7 @@ static PyObject *_wrap_wxPyShape_LogicalToPhysicalAttachment(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyShape_LogicalToPhysicalAttachment(_arg0,_arg1); + _result = (int )wxPyShape_LogicalToPhysicalAttachment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6915,7 +6790,7 @@ static PyObject *_wrap_wxPyShape_Draggable(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_Draggable(_arg0); + _result = (bool )wxPyShape_Draggable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6952,7 +6827,7 @@ static PyObject *_wrap_wxPyShape_HasDescendant(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_HasDescendant(_arg0,_arg1); + _result = (bool )wxPyShape_HasDescendant(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6986,7 +6861,7 @@ static PyObject *_wrap_wxPyShape_CreateNewCopy(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShape_CreateNewCopy(_arg0,_arg1,_arg2); + _result = (wxPyShape *)wxPyShape_CreateNewCopy(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7022,7 +6897,7 @@ static PyObject *_wrap_wxPyShape_Copy(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Copy(_arg0,*_arg1); + wxPyShape_Copy(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7059,7 +6934,7 @@ static PyObject *_wrap_wxPyShape_CopyWithHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_CopyWithHandler(_arg0,*_arg1); + wxPyShape_CopyWithHandler(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7090,7 +6965,7 @@ static PyObject *_wrap_wxPyShape_Rotate(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Rotate(_arg0,_arg1,_arg2,_arg3); + wxPyShape_Rotate(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7119,7 +6994,7 @@ static PyObject *_wrap_wxPyShape_GetRotation(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPyShape_GetRotation(_arg0); + _result = (double )wxPyShape_GetRotation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7146,7 +7021,7 @@ static PyObject *_wrap_wxPyShape_ClearAttachments(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ClearAttachments(_arg0); + wxPyShape_ClearAttachments(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7183,7 +7058,7 @@ static PyObject *_wrap_wxPyShape_Recentre(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_Recentre(_arg0,*_arg1); + wxPyShape_Recentre(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7220,7 +7095,7 @@ static PyObject *_wrap_wxPyShape_ClearPointList(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_ClearPointList(_arg0,*_arg1); + wxPyShape_ClearPointList(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7250,7 +7125,7 @@ static PyObject *_wrap_wxPyShape_GetBackgroundPen(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPen (wxPyShape_GetBackgroundPen(_arg0)); + _result = new wxPen (wxPyShape_GetBackgroundPen(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7280,7 +7155,7 @@ static PyObject *_wrap_wxPyShape_GetBackgroundBrush(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBrush (wxPyShape_GetBackgroundBrush(_arg0)); + _result = new wxBrush (wxPyShape_GetBackgroundBrush(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7308,7 +7183,7 @@ static PyObject *_wrap_wxPyShape_base_OnDelete(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDelete(_arg0); + wxPyShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7345,7 +7220,7 @@ static PyObject *_wrap_wxPyShape_base_OnDraw(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDraw(_arg0,*_arg1); + wxPyShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7382,7 +7257,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawContents(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDrawContents(_arg0,*_arg1); + wxPyShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7422,7 +7297,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawBranches(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7459,7 +7334,7 @@ static PyObject *_wrap_wxPyShape_base_OnMoveLinks(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7496,7 +7371,7 @@ static PyObject *_wrap_wxPyShape_base_OnErase(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnErase(_arg0,*_arg1); + wxPyShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7533,7 +7408,7 @@ static PyObject *_wrap_wxPyShape_base_OnEraseContents(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnEraseContents(_arg0,*_arg1); + wxPyShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7570,7 +7445,7 @@ static PyObject *_wrap_wxPyShape_base_OnHighlight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnHighlight(_arg0,*_arg1); + wxPyShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7602,7 +7477,7 @@ static PyObject *_wrap_wxPyShape_base_OnLeftClick(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7634,7 +7509,7 @@ static PyObject *_wrap_wxPyShape_base_OnLeftDoubleClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7666,7 +7541,7 @@ static PyObject *_wrap_wxPyShape_base_OnRightClick(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7696,7 +7571,7 @@ static PyObject *_wrap_wxPyShape_base_OnSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7741,7 +7616,7 @@ static PyObject *_wrap_wxPyShape_base_OnMovePre(PyObject *self, PyObject *args, _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7784,7 +7659,7 @@ static PyObject *_wrap_wxPyShape_base_OnMovePost(PyObject *self, PyObject *args, _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7819,7 +7694,7 @@ static PyObject *_wrap_wxPyShape_base_OnDragLeft(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7851,7 +7726,7 @@ static PyObject *_wrap_wxPyShape_base_OnBeginDragLeft(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7883,7 +7758,7 @@ static PyObject *_wrap_wxPyShape_base_OnEndDragLeft(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7918,7 +7793,7 @@ static PyObject *_wrap_wxPyShape_base_OnDragRight(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7950,7 +7825,7 @@ static PyObject *_wrap_wxPyShape_base_OnBeginDragRight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7982,7 +7857,7 @@ static PyObject *_wrap_wxPyShape_base_OnEndDragRight(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8023,7 +7898,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawOutline(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8060,7 +7935,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawControlPoints(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8097,7 +7972,7 @@ static PyObject *_wrap_wxPyShape_base_OnEraseControlPoints(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8137,7 +8012,7 @@ static PyObject *_wrap_wxPyShape_base_OnMoveLink(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8181,7 +8056,7 @@ static PyObject *_wrap_wxPyShape_base_OnSizingDragLeft(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8222,7 +8097,7 @@ static PyObject *_wrap_wxPyShape_base_OnSizingBeginDragLeft(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8263,7 +8138,7 @@ static PyObject *_wrap_wxPyShape_base_OnSizingEndDragLeft(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8293,7 +8168,7 @@ static PyObject *_wrap_wxPyShape_base_OnBeginSize(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8323,7 +8198,7 @@ static PyObject *_wrap_wxPyShape_base_OnEndSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/ogl/oglcanvas.cpp b/wxPython/contrib/ogl/oglcanvas.cpp index bea0764b0c..d79dfa4789 100644 --- a/wxPython/contrib/ogl/oglcanvas.cpp +++ b/wxPython/contrib/ogl/oglcanvas.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragLeft); IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragRight); IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnEndDragLeft); @@ -122,7 +116,7 @@ static PyObject *_wrap_new_wxDiagram(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDiagram *)new_wxDiagram(); + _result = (wxDiagram *)new_wxDiagram(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -173,7 +167,7 @@ static PyObject *_wrap_wxDiagram_AddShape(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_AddShape(_arg0,_arg1,_arg2); + wxDiagram_AddShape(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -210,7 +204,7 @@ static PyObject *_wrap_wxDiagram_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_Clear(_arg0,*_arg1); + wxDiagram_Clear(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -238,7 +232,7 @@ static PyObject *_wrap_wxDiagram_DeleteAllShapes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_DeleteAllShapes(_arg0); + wxDiagram_DeleteAllShapes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -279,7 +273,7 @@ static PyObject *_wrap_wxDiagram_DrawOutline(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_DrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxDiagram_DrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -309,7 +303,7 @@ static PyObject *_wrap_wxDiagram_FindShape(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxDiagram_FindShape(_arg0,_arg1); + _result = (wxPyShape *)wxDiagram_FindShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -337,7 +331,7 @@ static PyObject *_wrap_wxDiagram_GetCanvas(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeCanvas *)wxDiagram_GetCanvas(_arg0); + _result = (wxPyShapeCanvas *)wxDiagram_GetCanvas(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -365,7 +359,7 @@ static PyObject *_wrap_wxDiagram_GetCount(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDiagram_GetCount(_arg0); + _result = (int )wxDiagram_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -393,7 +387,7 @@ static PyObject *_wrap_wxDiagram_GetGridSpacing(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDiagram_GetGridSpacing(_arg0); + _result = (double )wxDiagram_GetGridSpacing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -421,7 +415,7 @@ static PyObject *_wrap_wxDiagram_GetMouseTolerance(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDiagram_GetMouseTolerance(_arg0); + _result = (int )wxDiagram_GetMouseTolerance(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -452,7 +446,7 @@ static PyObject *_wrap_wxDiagram_GetShapeList(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDiagram_GetShapeList(_arg0); + _result = (PyObject *)wxDiagram_GetShapeList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -482,7 +476,7 @@ static PyObject *_wrap_wxDiagram_GetQuickEditMode(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDiagram_GetQuickEditMode(_arg0); + _result = (bool )wxDiagram_GetQuickEditMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -510,7 +504,7 @@ static PyObject *_wrap_wxDiagram_GetSnapToGrid(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDiagram_GetSnapToGrid(_arg0); + _result = (bool )wxDiagram_GetSnapToGrid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -546,7 +540,7 @@ static PyObject *_wrap_wxDiagram_InsertShape(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_InsertShape(_arg0,_arg1); + wxDiagram_InsertShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -576,26 +570,13 @@ static PyObject *_wrap_wxDiagram_LoadFile(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDiagram_LoadFile(_arg0,*_arg1); + _result = (bool )wxDiagram_LoadFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -635,7 +616,7 @@ static PyObject *_wrap_wxDiagram_ReadContainerGeometry(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_ReadContainerGeometry(_arg0,*_arg1); + wxDiagram_ReadContainerGeometry(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -672,7 +653,7 @@ static PyObject *_wrap_wxDiagram_ReadLines(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_ReadLines(_arg0,*_arg1); + wxDiagram_ReadLines(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -709,7 +690,7 @@ static PyObject *_wrap_wxDiagram_ReadNodes(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_ReadNodes(_arg0,*_arg1); + wxDiagram_ReadNodes(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -746,7 +727,7 @@ static PyObject *_wrap_wxDiagram_RecentreAll(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_RecentreAll(_arg0,*_arg1); + wxDiagram_RecentreAll(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -783,7 +764,7 @@ static PyObject *_wrap_wxDiagram_Redraw(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_Redraw(_arg0,*_arg1); + wxDiagram_Redraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -811,7 +792,7 @@ static PyObject *_wrap_wxDiagram_RemoveAllShapes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_RemoveAllShapes(_arg0); + wxDiagram_RemoveAllShapes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -848,7 +829,7 @@ static PyObject *_wrap_wxDiagram_RemoveShape(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_RemoveShape(_arg0,_arg1); + wxDiagram_RemoveShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -878,26 +859,13 @@ static PyObject *_wrap_wxDiagram_SaveFile(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDiagram_SaveFile(_arg0,*_arg1); + _result = (bool )wxDiagram_SaveFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -937,7 +905,7 @@ static PyObject *_wrap_wxDiagram_SetCanvas(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_SetCanvas(_arg0,_arg1); + wxDiagram_SetCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -966,7 +934,7 @@ static PyObject *_wrap_wxDiagram_SetGridSpacing(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_SetGridSpacing(_arg0,_arg1); + wxDiagram_SetGridSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -995,7 +963,7 @@ static PyObject *_wrap_wxDiagram_SetMouseTolerance(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_SetMouseTolerance(_arg0,_arg1); + wxDiagram_SetMouseTolerance(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1026,7 +994,7 @@ static PyObject *_wrap_wxDiagram_SetQuickEditMode(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_SetQuickEditMode(_arg0,_arg1); + wxDiagram_SetQuickEditMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1057,7 +1025,7 @@ static PyObject *_wrap_wxDiagram_SetSnapToGrid(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_SetSnapToGrid(_arg0,_arg1); + wxDiagram_SetSnapToGrid(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1088,7 +1056,7 @@ static PyObject *_wrap_wxDiagram_ShowAll(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_ShowAll(_arg0,_arg1); + wxDiagram_ShowAll(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1130,7 +1098,7 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDiagram_Snap(_arg0,_arg1,_arg2); + wxDiagram_Snap(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1230,7 +1198,7 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShapeCanvas *)new_wxPyShapeCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxPyShapeCanvas *)new_wxPyShapeCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1273,7 +1241,7 @@ static PyObject *_wrap_wxPyShapeCanvas__setCallbackInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyShapeCanvas__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1319,7 +1287,7 @@ static PyObject *_wrap_wxPyShapeCanvas_AddShape(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_AddShape(_arg0,_arg1,_arg2); + wxPyShapeCanvas_AddShape(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1373,7 +1341,7 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShapeCanvas_FindShape(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + _result = (wxPyShape *)wxPyShapeCanvas_FindShape(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1414,7 +1382,7 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyShapeCanvas_FindFirstSensitiveShape(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxPyShape *)wxPyShapeCanvas_FindFirstSensitiveShape(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1447,7 +1415,7 @@ static PyObject *_wrap_wxPyShapeCanvas_GetDiagram(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDiagram *)wxPyShapeCanvas_GetDiagram(_arg0); + _result = (wxDiagram *)wxPyShapeCanvas_GetDiagram(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1475,7 +1443,7 @@ static PyObject *_wrap_wxPyShapeCanvas_GetQuickEditMode(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyShapeCanvas_GetQuickEditMode(_arg0); + _result = (bool )wxPyShapeCanvas_GetQuickEditMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1511,7 +1479,7 @@ static PyObject *_wrap_wxPyShapeCanvas_InsertShape(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_InsertShape(_arg0,_arg1); + wxPyShapeCanvas_InsertShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1542,7 +1510,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnBeginDragLeft(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3); + wxPyShapeCanvas_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1573,7 +1541,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnBeginDragRight(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3); + wxPyShapeCanvas_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1604,7 +1572,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnEndDragLeft(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3); + wxPyShapeCanvas_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1635,7 +1603,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnEndDragRight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3); + wxPyShapeCanvas_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1669,7 +1637,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeCanvas_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1703,7 +1671,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnDragRight(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyShapeCanvas_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1734,7 +1702,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnLeftClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3); + wxPyShapeCanvas_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1765,7 +1733,7 @@ static PyObject *_wrap_wxPyShapeCanvas_base_OnRightClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_base_OnRightClick(_arg0,_arg1,_arg2,_arg3); + wxPyShapeCanvas_base_OnRightClick(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1802,7 +1770,7 @@ static PyObject *_wrap_wxPyShapeCanvas_Redraw(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_Redraw(_arg0,*_arg1); + wxPyShapeCanvas_Redraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1839,7 +1807,7 @@ static PyObject *_wrap_wxPyShapeCanvas_RemoveShape(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_RemoveShape(_arg0,_arg1); + wxPyShapeCanvas_RemoveShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1876,7 +1844,7 @@ static PyObject *_wrap_wxPyShapeCanvas_SetDiagram(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_SetDiagram(_arg0,_arg1); + wxPyShapeCanvas_SetDiagram(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1918,7 +1886,7 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyShapeCanvas_Snap(_arg0,_arg1,_arg2); + wxPyShapeCanvas_Snap(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp index f5b4b75b2b..2aab38ee81 100644 --- a/wxPython/contrib/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape); WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint); @@ -127,7 +121,7 @@ static PyObject *_wrap_new_wxPseudoMetaFile(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPseudoMetaFile *)new_wxPseudoMetaFile(); + _result = (wxPseudoMetaFile *)new_wxPseudoMetaFile(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -160,7 +154,7 @@ static PyObject *_wrap_delete_wxPseudoMetaFile(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPseudoMetaFile(_arg0); + delete_wxPseudoMetaFile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -199,7 +193,7 @@ static PyObject *_wrap_wxPseudoMetaFile_Draw(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_Draw(_arg0,*_arg1,_arg2,_arg3); + wxPseudoMetaFile_Draw(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -237,7 +231,7 @@ static PyObject *_wrap_wxPseudoMetaFile_WriteAttributes(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_WriteAttributes(_arg0,_arg1,_arg2); + wxPseudoMetaFile_WriteAttributes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -275,7 +269,7 @@ static PyObject *_wrap_wxPseudoMetaFile_ReadAttributes(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_ReadAttributes(_arg0,_arg1,_arg2); + wxPseudoMetaFile_ReadAttributes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -303,7 +297,7 @@ static PyObject *_wrap_wxPseudoMetaFile_Clear(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_Clear(_arg0); + wxPseudoMetaFile_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -340,7 +334,7 @@ static PyObject *_wrap_wxPseudoMetaFile_Copy(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_Copy(_arg0,*_arg1); + wxPseudoMetaFile_Copy(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -370,7 +364,7 @@ static PyObject *_wrap_wxPseudoMetaFile_Scale(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_Scale(_arg0,_arg1,_arg2); + wxPseudoMetaFile_Scale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -400,7 +394,7 @@ static PyObject *_wrap_wxPseudoMetaFile_ScaleTo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_ScaleTo(_arg0,_arg1,_arg2); + wxPseudoMetaFile_ScaleTo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -430,7 +424,7 @@ static PyObject *_wrap_wxPseudoMetaFile_Translate(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_Translate(_arg0,_arg1,_arg2); + wxPseudoMetaFile_Translate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -461,7 +455,7 @@ static PyObject *_wrap_wxPseudoMetaFile_Rotate(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_Rotate(_arg0,_arg1,_arg2,_arg3); + wxPseudoMetaFile_Rotate(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -509,7 +503,7 @@ static PyObject *_wrap_wxPseudoMetaFile_LoadFromMetaFile(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPseudoMetaFile_LoadFromMetaFile(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxPseudoMetaFile_LoadFromMetaFile(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -572,7 +566,7 @@ static PyObject *_wrap_wxPseudoMetaFile_GetBounds(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_GetBounds(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPseudoMetaFile_GetBounds(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -609,7 +603,7 @@ static PyObject *_wrap_wxPseudoMetaFile_CalculateSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_CalculateSize(_arg0,_arg1); + wxPseudoMetaFile_CalculateSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -640,7 +634,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetRotateable(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetRotateable(_arg0,_arg1); + wxPseudoMetaFile_SetRotateable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -669,7 +663,7 @@ static PyObject *_wrap_wxPseudoMetaFile_GetRotateable(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPseudoMetaFile_GetRotateable(_arg0); + _result = (bool )wxPseudoMetaFile_GetRotateable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -698,7 +692,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetSize(_arg0,_arg1,_arg2); + wxPseudoMetaFile_SetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -742,7 +736,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFillBrush(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetFillBrush(_arg0,_arg1); + wxPseudoMetaFile_SetFillBrush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -772,7 +766,7 @@ static PyObject *_wrap_wxPseudoMetaFile_GetFillBrush(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBrush *)wxPseudoMetaFile_GetFillBrush(_arg0); + _result = (wxBrush *)wxPseudoMetaFile_GetFillBrush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -823,7 +817,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlinePen(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetOutlinePen(_arg0,_arg1); + wxPseudoMetaFile_SetOutlinePen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -853,7 +847,7 @@ static PyObject *_wrap_wxPseudoMetaFile_GetOutlinePen(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxPseudoMetaFile_GetOutlinePen(_arg0); + _result = (wxPen *)wxPseudoMetaFile_GetOutlinePen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -887,7 +881,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlineOp(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetOutlineOp(_arg0,_arg1); + wxPseudoMetaFile_SetOutlineOp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -916,7 +910,7 @@ static PyObject *_wrap_wxPseudoMetaFile_GetOutlineOp(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPseudoMetaFile_GetOutlineOp(_arg0); + _result = (int )wxPseudoMetaFile_GetOutlineOp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -944,7 +938,7 @@ static PyObject *_wrap_wxPseudoMetaFile_IsValid(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPseudoMetaFile_IsValid(_arg0); + _result = (bool )wxPseudoMetaFile_IsValid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -987,7 +981,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawLine(_arg0,*_arg1,*_arg2); + wxPseudoMetaFile_DrawLine(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1023,7 +1017,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawRectangle(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawRectangle(_arg0,*_arg1); + wxPseudoMetaFile_DrawRectangle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1060,7 +1054,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawRoundedRectangle(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawRoundedRectangle(_arg0,*_arg1,_arg2); + wxPseudoMetaFile_DrawRoundedRectangle(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1112,7 +1106,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawArc(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawArc(_arg0,*_arg1,*_arg2,*_arg3); + wxPseudoMetaFile_DrawArc(_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1150,7 +1144,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawEllipticArc(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3); + wxPseudoMetaFile_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1186,7 +1180,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawEllipse(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawEllipse(_arg0,*_arg1); + wxPseudoMetaFile_DrawEllipse(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1222,7 +1216,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPoint(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawPoint(_arg0,*_arg1); + wxPseudoMetaFile_DrawPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1254,22 +1248,9 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { _arg2 = &temp; @@ -1278,7 +1259,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawText(_arg0,*_arg1,*_arg2); + wxPseudoMetaFile_DrawText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1324,7 +1305,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLines(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawLines(_arg0,_arg1,_arg2); + wxPseudoMetaFile_DrawLines(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1351,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPolygon(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawPolygon(_arg0,_arg1,_arg2,_arg3); + wxPseudoMetaFile_DrawPolygon(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1415,7 +1396,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawSpline(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DrawSpline(_arg0,_arg1,_arg2); + wxPseudoMetaFile_DrawSpline(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1454,7 +1435,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetClippingRect(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetClippingRect(_arg0,*_arg1); + wxPseudoMetaFile_SetClippingRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1482,7 +1463,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DestroyClippingRect(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_DestroyClippingRect(_arg0); + wxPseudoMetaFile_DestroyClippingRect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1531,7 +1512,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetPen(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetPen(_arg0,_arg1,_arg2); + wxPseudoMetaFile_SetPen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1578,7 +1559,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBrush(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetBrush(_arg0,_arg1,_arg2); + wxPseudoMetaFile_SetBrush(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1628,7 +1609,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetFont(_arg0,_arg1); + wxPseudoMetaFile_SetFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1664,7 +1645,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetTextColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetTextColour(_arg0,*_arg1); + wxPseudoMetaFile_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1700,7 +1681,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBackgroundColour(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetBackgroundColour(_arg0,*_arg1); + wxPseudoMetaFile_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1729,7 +1710,7 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBackgroundMode(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile_SetBackgroundMode(_arg0,_arg1); + wxPseudoMetaFile_SetBackgroundMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1776,7 +1757,7 @@ static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyRectangleShape *)new_wxPyRectangleShape(_arg0,_arg1); + _result = (wxPyRectangleShape *)new_wxPyRectangleShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1819,7 +1800,7 @@ static PyObject *_wrap_wxPyRectangleShape__setCallbackInfo(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyRectangleShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1848,7 +1829,7 @@ static PyObject *_wrap_wxPyRectangleShape_SetCornerRadius(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_SetCornerRadius(_arg0,_arg1); + wxPyRectangleShape_SetCornerRadius(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1876,7 +1857,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDelete(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDelete(_arg0); + wxPyRectangleShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1913,7 +1894,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDraw(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDraw(_arg0,*_arg1); + wxPyRectangleShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1950,7 +1931,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawContents(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDrawContents(_arg0,*_arg1); + wxPyRectangleShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1990,7 +1971,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawBranches(PyObject *self, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyRectangleShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2027,7 +2008,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMoveLinks(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyRectangleShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2064,7 +2045,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnErase(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnErase(_arg0,*_arg1); + wxPyRectangleShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2101,7 +2082,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEraseContents(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnEraseContents(_arg0,*_arg1); + wxPyRectangleShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2138,7 +2119,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnHighlight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnHighlight(_arg0,*_arg1); + wxPyRectangleShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2170,7 +2151,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnLeftClick(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2202,7 +2183,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnLeftDoubleClick(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2234,7 +2215,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnRightClick(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2264,7 +2245,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyRectangleShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2309,7 +2290,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMovePre(PyObject *self, PyObjec _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyRectangleShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyRectangleShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2352,7 +2333,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMovePost(PyObject *self, PyObje _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyRectangleShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2387,7 +2368,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDragLeft(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyRectangleShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2419,7 +2400,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnBeginDragLeft(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2451,7 +2432,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEndDragLeft(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2486,7 +2467,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDragRight(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyRectangleShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2518,7 +2499,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnBeginDragRight(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2550,7 +2531,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEndDragRight(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyRectangleShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2591,7 +2572,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawOutline(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyRectangleShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2628,7 +2609,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawControlPoints(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyRectangleShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2665,7 +2646,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEraseControlPoints(PyObject *se } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyRectangleShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2705,7 +2686,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMoveLink(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyRectangleShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2749,7 +2730,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSizingDragLeft(PyObject *self, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyRectangleShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2790,7 +2771,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSizingBeginDragLeft(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyRectangleShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2831,7 +2812,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSizingEndDragLeft(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyRectangleShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2861,7 +2842,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnBeginSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyRectangleShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2891,7 +2872,7 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEndSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyRectangleShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyRectangleShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2966,7 +2947,7 @@ static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyControlPoint *)new_wxPyControlPoint(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + _result = (wxPyControlPoint *)new_wxPyControlPoint(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3009,7 +2990,7 @@ static PyObject *_wrap_wxPyControlPoint__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyControlPoint__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3038,7 +3019,7 @@ static PyObject *_wrap_wxPyControlPoint_SetCornerRadius(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_SetCornerRadius(_arg0,_arg1); + wxPyControlPoint_SetCornerRadius(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3066,7 +3047,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDelete(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDelete(_arg0); + wxPyControlPoint_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3103,7 +3084,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDraw(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDraw(_arg0,*_arg1); + wxPyControlPoint_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3140,7 +3121,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDrawContents(_arg0,*_arg1); + wxPyControlPoint_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3180,7 +3161,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawBranches(PyObject *self, PyOb _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyControlPoint_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3217,7 +3198,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMoveLinks(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnMoveLinks(_arg0,*_arg1); + wxPyControlPoint_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3254,7 +3235,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnErase(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnErase(_arg0,*_arg1); + wxPyControlPoint_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3291,7 +3272,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEraseContents(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnEraseContents(_arg0,*_arg1); + wxPyControlPoint_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3328,7 +3309,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnHighlight(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnHighlight(_arg0,*_arg1); + wxPyControlPoint_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3360,7 +3341,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnLeftClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3392,7 +3373,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnLeftDoubleClick(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3424,7 +3405,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnRightClick(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3454,7 +3435,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnSize(_arg0,_arg1,_arg2); + wxPyControlPoint_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3499,7 +3480,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMovePre(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyControlPoint_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyControlPoint_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3542,7 +3523,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMovePost(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyControlPoint_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3577,7 +3558,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyControlPoint_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3609,7 +3590,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnBeginDragLeft(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3641,7 +3622,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEndDragLeft(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3676,7 +3657,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDragRight(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyControlPoint_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3708,7 +3689,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnBeginDragRight(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3740,7 +3721,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEndDragRight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyControlPoint_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3781,7 +3762,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawOutline(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyControlPoint_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3818,7 +3799,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyControlPoint_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3855,7 +3836,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEraseControlPoints(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyControlPoint_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3895,7 +3876,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMoveLink(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyControlPoint_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3939,7 +3920,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSizingDragLeft(PyObject *self, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyControlPoint_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3980,7 +3961,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSizingBeginDragLeft(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyControlPoint_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4021,7 +4002,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSizingEndDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyControlPoint_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4051,7 +4032,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnBeginSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyControlPoint_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4081,7 +4062,7 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEndSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyControlPoint_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyControlPoint_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4134,7 +4115,7 @@ static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyBitmapShape *)new_wxPyBitmapShape(); + _result = (wxPyBitmapShape *)new_wxPyBitmapShape(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4177,7 +4158,7 @@ static PyObject *_wrap_wxPyBitmapShape__setCallbackInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyBitmapShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4207,7 +4188,7 @@ static PyObject *_wrap_wxPyBitmapShape_GetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap & _result_ref = wxPyBitmapShape_GetBitmap(_arg0); + wxBitmap & _result_ref = wxPyBitmapShape_GetBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4242,12 +4223,16 @@ static PyObject *_wrap_wxPyBitmapShape_GetFilename(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyBitmapShape_GetFilename(_arg0)); + _result = new wxString (wxPyBitmapShape_GetFilename(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4283,7 +4268,7 @@ static PyObject *_wrap_wxPyBitmapShape_SetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_SetBitmap(_arg0,*_arg1); + wxPyBitmapShape_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4312,26 +4297,13 @@ static PyObject *_wrap_wxPyBitmapShape_SetFilename(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_SetFilename(_arg0,*_arg1); + wxPyBitmapShape_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4363,7 +4335,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDelete(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDelete(_arg0); + wxPyBitmapShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4400,7 +4372,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDraw(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDraw(_arg0,*_arg1); + wxPyBitmapShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4437,7 +4409,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawContents(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDrawContents(_arg0,*_arg1); + wxPyBitmapShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4477,7 +4449,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawBranches(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyBitmapShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4514,7 +4486,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMoveLinks(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyBitmapShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4551,7 +4523,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnErase(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnErase(_arg0,*_arg1); + wxPyBitmapShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4588,7 +4560,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEraseContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnEraseContents(_arg0,*_arg1); + wxPyBitmapShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4625,7 +4597,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnHighlight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnHighlight(_arg0,*_arg1); + wxPyBitmapShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4657,7 +4629,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnLeftClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4689,7 +4661,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnLeftDoubleClick(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4721,7 +4693,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnRightClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4751,7 +4723,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyBitmapShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4796,7 +4768,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMovePre(PyObject *self, PyObject * _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyBitmapShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyBitmapShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4839,7 +4811,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMovePost(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyBitmapShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4874,7 +4846,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyBitmapShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4906,7 +4878,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnBeginDragLeft(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4938,7 +4910,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEndDragLeft(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4973,7 +4945,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDragRight(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyBitmapShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5005,7 +4977,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnBeginDragRight(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5037,7 +5009,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEndDragRight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyBitmapShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5078,7 +5050,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawOutline(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyBitmapShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5115,7 +5087,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyBitmapShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5152,7 +5124,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEraseControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyBitmapShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5192,7 +5164,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMoveLink(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyBitmapShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5236,7 +5208,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSizingDragLeft(PyObject *self, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyBitmapShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5277,7 +5249,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSizingBeginDragLeft(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyBitmapShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5318,7 +5290,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSizingEndDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyBitmapShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5348,7 +5320,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnBeginSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyBitmapShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5378,7 +5350,7 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEndSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyBitmapShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5431,7 +5403,7 @@ static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDrawnShape *)new_wxPyDrawnShape(); + _result = (wxPyDrawnShape *)new_wxPyDrawnShape(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5474,7 +5446,7 @@ static PyObject *_wrap_wxPyDrawnShape__setCallbackInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDrawnShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5502,7 +5474,7 @@ static PyObject *_wrap_wxPyDrawnShape_CalculateSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_CalculateSize(_arg0); + wxPyDrawnShape_CalculateSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5530,7 +5502,7 @@ static PyObject *_wrap_wxPyDrawnShape_DestroyClippingRect(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DestroyClippingRect(_arg0); + wxPyDrawnShape_DestroyClippingRect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5582,7 +5554,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawArc(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawArc(_arg0,*_arg1,*_arg2,*_arg3); + wxPyDrawnShape_DrawArc(_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5611,7 +5583,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawAtAngle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawAtAngle(_arg0,_arg1); + wxPyDrawnShape_DrawAtAngle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5649,7 +5621,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawEllipticArc(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3); + wxPyDrawnShape_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5693,7 +5665,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLine(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawLine(_arg0,*_arg1,*_arg2); + wxPyDrawnShape_DrawLine(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5735,7 +5707,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLines(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawLines(_arg0,_arg1,_arg2); + wxPyDrawnShape_DrawLines(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5774,7 +5746,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPoint(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawPoint(_arg0,*_arg1); + wxPyDrawnShape_DrawPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5817,7 +5789,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPolygon(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawPolygon(_arg0,_arg1,_arg2,_arg3); + wxPyDrawnShape_DrawPolygon(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5856,7 +5828,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawRectangle(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawRectangle(_arg0,*_arg1); + wxPyDrawnShape_DrawRectangle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5893,7 +5865,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawRoundedRectangle(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawRoundedRectangle(_arg0,*_arg1,_arg2); + wxPyDrawnShape_DrawRoundedRectangle(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5935,7 +5907,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawSpline(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawSpline(_arg0,_arg1,_arg2); + wxPyDrawnShape_DrawSpline(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5970,22 +5942,9 @@ static PyObject *_wrap_wxPyDrawnShape_DrawText(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { _arg2 = &temp; @@ -5994,7 +5953,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawText(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_DrawText(_arg0,*_arg1,*_arg2); + wxPyDrawnShape_DrawText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6027,7 +5986,7 @@ static PyObject *_wrap_wxPyDrawnShape_GetAngle(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyDrawnShape_GetAngle(_arg0); + _result = (int )wxPyDrawnShape_GetAngle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6055,7 +6014,7 @@ static PyObject *_wrap_wxPyDrawnShape_GetMetaFile(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPseudoMetaFile & _result_ref = wxPyDrawnShape_GetMetaFile(_arg0); + wxPseudoMetaFile & _result_ref = wxPyDrawnShape_GetMetaFile(_arg0); _result = (wxPseudoMetaFile *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6084,7 +6043,7 @@ static PyObject *_wrap_wxPyDrawnShape_GetRotation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPyDrawnShape_GetRotation(_arg0); + _result = (double )wxPyDrawnShape_GetRotation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6113,7 +6072,7 @@ static PyObject *_wrap_wxPyDrawnShape_LoadFromMetaFile(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDrawnShape_LoadFromMetaFile(_arg0,_arg1); + _result = (bool )wxPyDrawnShape_LoadFromMetaFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6143,7 +6102,7 @@ static PyObject *_wrap_wxPyDrawnShape_Rotate(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_Rotate(_arg0,_arg1,_arg2,_arg3); + wxPyDrawnShape_Rotate(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6179,7 +6138,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetClippingRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetClippingRect(_arg0,*_arg1); + wxPyDrawnShape_SetClippingRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6215,7 +6174,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBackgroundColour(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetDrawnBackgroundColour(_arg0,*_arg1); + wxPyDrawnShape_SetDrawnBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6244,7 +6203,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBackgroundMode(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetDrawnBackgroundMode(_arg0,_arg1); + wxPyDrawnShape_SetDrawnBackgroundMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6291,7 +6250,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *ar _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetDrawnBrush(_arg0,_arg1,_arg2); + wxPyDrawnShape_SetDrawnBrush(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6341,7 +6300,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnFont(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetDrawnFont(_arg0,_arg1); + wxPyDrawnShape_SetDrawnFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6390,7 +6349,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetDrawnPen(_arg0,_arg1,_arg2); + wxPyDrawnShape_SetDrawnPen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6426,7 +6385,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnTextColour(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetDrawnTextColour(_arg0,*_arg1); + wxPyDrawnShape_SetDrawnTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6456,7 +6415,7 @@ static PyObject *_wrap_wxPyDrawnShape_Scale(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_Scale(_arg0,_arg1,_arg2); + wxPyDrawnShape_Scale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6487,7 +6446,7 @@ static PyObject *_wrap_wxPyDrawnShape_SetSaveToFile(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_SetSaveToFile(_arg0,_arg1); + wxPyDrawnShape_SetSaveToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6517,7 +6476,7 @@ static PyObject *_wrap_wxPyDrawnShape_Translate(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_Translate(_arg0,_arg1,_arg2); + wxPyDrawnShape_Translate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6545,7 +6504,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDelete(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDelete(_arg0); + wxPyDrawnShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6582,7 +6541,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDraw(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDraw(_arg0,*_arg1); + wxPyDrawnShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6619,7 +6578,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawContents(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDrawContents(_arg0,*_arg1); + wxPyDrawnShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6659,7 +6618,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawBranches(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyDrawnShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6696,7 +6655,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMoveLinks(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyDrawnShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6733,7 +6692,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnErase(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnErase(_arg0,*_arg1); + wxPyDrawnShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6770,7 +6729,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEraseContents(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnEraseContents(_arg0,*_arg1); + wxPyDrawnShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6807,7 +6766,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnHighlight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnHighlight(_arg0,*_arg1); + wxPyDrawnShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6839,7 +6798,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnLeftClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6871,7 +6830,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnLeftDoubleClick(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6903,7 +6862,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnRightClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6933,7 +6892,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSize(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyDrawnShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6978,7 +6937,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMovePre(PyObject *self, PyObject *a _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDrawnShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyDrawnShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7021,7 +6980,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMovePost(PyObject *self, PyObject * _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyDrawnShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7056,7 +7015,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDragLeft(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDrawnShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7088,7 +7047,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnBeginDragLeft(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7120,7 +7079,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndDragLeft(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7155,7 +7114,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDragRight(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDrawnShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7187,7 +7146,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnBeginDragRight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7219,7 +7178,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndDragRight(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDrawnShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7260,7 +7219,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawOutline(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDrawnShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7297,7 +7256,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawControlPoints(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyDrawnShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7334,7 +7293,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEraseControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyDrawnShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7374,7 +7333,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMoveLink(PyObject *self, PyObject * _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyDrawnShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7418,7 +7377,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSizingDragLeft(PyObject *self, PyOb _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyDrawnShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7459,7 +7418,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSizingBeginDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDrawnShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7500,7 +7459,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSizingEndDragLeft(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDrawnShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7530,7 +7489,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnBeginSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyDrawnShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7560,7 +7519,7 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDrawnShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyDrawnShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7610,7 +7569,7 @@ static PyObject *_wrap_new_wxOGLConstraint(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxOGLConstraint *)new_wxOGLConstraint(_arg0,_arg1,_arg2); + _result = (wxOGLConstraint *)new_wxOGLConstraint(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7644,7 +7603,7 @@ static PyObject *_wrap_wxOGLConstraint_Evaluate(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxOGLConstraint_Evaluate(_arg0); + _result = (bool )wxOGLConstraint_Evaluate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7673,7 +7632,7 @@ static PyObject *_wrap_wxOGLConstraint_SetSpacing(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxOGLConstraint_SetSpacing(_arg0,_arg1,_arg2); + wxOGLConstraint_SetSpacing(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7704,7 +7663,7 @@ static PyObject *_wrap_wxOGLConstraint_Equals(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxOGLConstraint_Equals(_arg0,_arg1,_arg2); + _result = (bool )wxOGLConstraint_Equals(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7756,7 +7715,7 @@ static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyCompositeShape *)new_wxPyCompositeShape(); + _result = (wxPyCompositeShape *)new_wxPyCompositeShape(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7799,7 +7758,7 @@ static PyObject *_wrap_wxPyCompositeShape__setCallbackInfo(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyCompositeShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7845,7 +7804,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddChild(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_AddChild(_arg0,_arg1,_arg2); + wxPyCompositeShape_AddChild(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7883,7 +7842,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstraint(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstraint(_arg0,_arg1); + _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstraint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7931,7 +7890,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstrainedShapes(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstrainedShapes(_arg0,_arg1,_arg2,_arg3); + _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstrainedShapes(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7978,7 +7937,7 @@ static PyObject *_wrap_wxPyCompositeShape_AddSimpleConstraint(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxOGLConstraint *)wxPyCompositeShape_AddSimpleConstraint(_arg0,_arg1,_arg2,_arg3); + _result = (wxOGLConstraint *)wxPyCompositeShape_AddSimpleConstraint(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8005,7 +7964,7 @@ static PyObject *_wrap_wxPyCompositeShape_CalculateSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_CalculateSize(_arg0); + wxPyCompositeShape_CalculateSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8043,7 +8002,7 @@ static PyObject *_wrap_wxPyCompositeShape_ContainsDivision(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyCompositeShape_ContainsDivision(_arg0,_arg1); + _result = (bool )wxPyCompositeShape_ContainsDivision(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8079,7 +8038,7 @@ static PyObject *_wrap_wxPyCompositeShape_DeleteConstraint(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_DeleteConstraint(_arg0,_arg1); + wxPyCompositeShape_DeleteConstraint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8116,7 +8075,7 @@ static PyObject *_wrap_wxPyCompositeShape_DeleteConstraintsInvolvingChild(PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_DeleteConstraintsInvolvingChild(_arg0,_arg1); + wxPyCompositeShape_DeleteConstraintsInvolvingChild(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8145,7 +8104,7 @@ static PyObject *_wrap_wxPyCompositeShape_FindContainerImage(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0); + _result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8176,7 +8135,7 @@ static PyObject *_wrap_wxPyCompositeShape_GetConstraints(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyCompositeShape_GetConstraints(_arg0); + _result = (PyObject *)wxPyCompositeShape_GetConstraints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8209,7 +8168,7 @@ static PyObject *_wrap_wxPyCompositeShape_GetDivisions(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyCompositeShape_GetDivisions(_arg0); + _result = (PyObject *)wxPyCompositeShape_GetDivisions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8238,7 +8197,7 @@ static PyObject *_wrap_wxPyCompositeShape_MakeContainer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_MakeContainer(_arg0); + wxPyCompositeShape_MakeContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8267,7 +8226,7 @@ static PyObject *_wrap_wxPyCompositeShape_Recompute(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyCompositeShape_Recompute(_arg0); + _result = (bool )wxPyCompositeShape_Recompute(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8303,7 +8262,7 @@ static PyObject *_wrap_wxPyCompositeShape_RemoveChild(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_RemoveChild(_arg0,_arg1); + wxPyCompositeShape_RemoveChild(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8331,7 +8290,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDelete(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDelete(_arg0); + wxPyCompositeShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8368,7 +8327,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDraw(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDraw(_arg0,*_arg1); + wxPyCompositeShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8405,7 +8364,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawContents(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDrawContents(_arg0,*_arg1); + wxPyCompositeShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8445,7 +8404,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawBranches(PyObject *self, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyCompositeShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8482,7 +8441,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMoveLinks(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyCompositeShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8519,7 +8478,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnErase(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnErase(_arg0,*_arg1); + wxPyCompositeShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8556,7 +8515,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEraseContents(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnEraseContents(_arg0,*_arg1); + wxPyCompositeShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8593,7 +8552,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnHighlight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnHighlight(_arg0,*_arg1); + wxPyCompositeShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8625,7 +8584,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnLeftClick(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8657,7 +8616,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnLeftDoubleClick(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8689,7 +8648,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnRightClick(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8719,7 +8678,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyCompositeShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8764,7 +8723,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMovePre(PyObject *self, PyObjec _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyCompositeShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyCompositeShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8807,7 +8766,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMovePost(PyObject *self, PyObje _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyCompositeShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8842,7 +8801,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDragLeft(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCompositeShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8874,7 +8833,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnBeginDragLeft(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8906,7 +8865,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEndDragLeft(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8941,7 +8900,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDragRight(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCompositeShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8973,7 +8932,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnBeginDragRight(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9005,7 +8964,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEndDragRight(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCompositeShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9046,7 +9005,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawOutline(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCompositeShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9083,7 +9042,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawControlPoints(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyCompositeShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9120,7 +9079,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEraseControlPoints(PyObject *se } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyCompositeShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9160,7 +9119,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMoveLink(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyCompositeShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9204,7 +9163,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSizingDragLeft(PyObject *self, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyCompositeShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9245,7 +9204,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSizingBeginDragLeft(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCompositeShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9286,7 +9245,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSizingEndDragLeft(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCompositeShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9316,7 +9275,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnBeginSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyCompositeShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9346,7 +9305,7 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEndSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCompositeShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyCompositeShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9401,7 +9360,7 @@ static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDividedShape *)new_wxPyDividedShape(_arg0,_arg1); + _result = (wxPyDividedShape *)new_wxPyDividedShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9444,7 +9403,7 @@ static PyObject *_wrap_wxPyDividedShape__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDividedShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9472,7 +9431,7 @@ static PyObject *_wrap_wxPyDividedShape_EditRegions(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_EditRegions(_arg0); + wxPyDividedShape_EditRegions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9500,7 +9459,7 @@ static PyObject *_wrap_wxPyDividedShape_SetRegionSizes(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_SetRegionSizes(_arg0); + wxPyDividedShape_SetRegionSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9528,7 +9487,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDelete(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDelete(_arg0); + wxPyDividedShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9565,7 +9524,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDraw(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDraw(_arg0,*_arg1); + wxPyDividedShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9602,7 +9561,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDrawContents(_arg0,*_arg1); + wxPyDividedShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9642,7 +9601,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawBranches(PyObject *self, PyOb _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyDividedShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9679,7 +9638,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMoveLinks(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyDividedShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9716,7 +9675,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnErase(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnErase(_arg0,*_arg1); + wxPyDividedShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9753,7 +9712,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEraseContents(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnEraseContents(_arg0,*_arg1); + wxPyDividedShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9790,7 +9749,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnHighlight(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnHighlight(_arg0,*_arg1); + wxPyDividedShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9822,7 +9781,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnLeftClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9854,7 +9813,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnLeftDoubleClick(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9886,7 +9845,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnRightClick(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9916,7 +9875,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyDividedShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9961,7 +9920,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMovePre(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDividedShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyDividedShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10004,7 +9963,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMovePost(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyDividedShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10039,7 +9998,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDividedShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10071,7 +10030,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnBeginDragLeft(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10103,7 +10062,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEndDragLeft(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10138,7 +10097,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDragRight(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDividedShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10170,7 +10129,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnBeginDragRight(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10202,7 +10161,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEndDragRight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDividedShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10243,7 +10202,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawOutline(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDividedShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10280,7 +10239,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyDividedShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10317,7 +10276,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEraseControlPoints(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyDividedShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10357,7 +10316,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMoveLink(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyDividedShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10401,7 +10360,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSizingDragLeft(PyObject *self, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyDividedShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10442,7 +10401,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSizingBeginDragLeft(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDividedShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10483,7 +10442,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSizingEndDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDividedShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10513,7 +10472,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnBeginSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyDividedShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10543,7 +10502,7 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEndSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDividedShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyDividedShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10604,7 +10563,7 @@ static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDivisionShape *)new_wxPyDivisionShape(); + _result = (wxPyDivisionShape *)new_wxPyDivisionShape(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10647,7 +10606,7 @@ static PyObject *_wrap_wxPyDivisionShape__setCallbackInfo(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDivisionShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10679,7 +10638,7 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustBottom(PyObject *self, PyObject * _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_AdjustBottom(_arg0,_arg1,_arg2); + wxPyDivisionShape_AdjustBottom(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10711,7 +10670,7 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustLeft(PyObject *self, PyObject *ar _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_AdjustLeft(_arg0,_arg1,_arg2); + wxPyDivisionShape_AdjustLeft(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10743,7 +10702,7 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustRight(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_AdjustRight(_arg0,_arg1,_arg2); + wxPyDivisionShape_AdjustRight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10775,7 +10734,7 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustTop(PyObject *self, PyObject *arg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_AdjustTop(_arg0,_arg1,_arg2); + wxPyDivisionShape_AdjustTop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10804,7 +10763,7 @@ static PyObject *_wrap_wxPyDivisionShape_Divide(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_Divide(_arg0,_arg1); + wxPyDivisionShape_Divide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10833,7 +10792,7 @@ static PyObject *_wrap_wxPyDivisionShape_EditEdge(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_EditEdge(_arg0,_arg1); + wxPyDivisionShape_EditEdge(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10862,7 +10821,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetBottomSide(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0); + _result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10890,7 +10849,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetHandleSide(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyDivisionShape_GetHandleSide(_arg0); + _result = (int )wxPyDivisionShape_GetHandleSide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10918,7 +10877,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSide(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0); + _result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10946,12 +10905,16 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSideColour(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyDivisionShape_GetLeftSideColour(_arg0)); + _result = new wxString (wxPyDivisionShape_GetLeftSideColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10980,7 +10943,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSidePen(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxPyDivisionShape_GetLeftSidePen(_arg0); + _result = (wxPen *)wxPyDivisionShape_GetLeftSidePen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11014,7 +10977,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetRightSide(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0); + _result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11042,7 +11005,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSide(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0); + _result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11071,7 +11034,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSidePen(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxPyDivisionShape_GetTopSidePen(_arg0); + _result = (wxPen *)wxPyDivisionShape_GetTopSidePen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11109,7 +11072,7 @@ static PyObject *_wrap_wxPyDivisionShape_ResizeAdjoining(PyObject *self, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_ResizeAdjoining(_arg0,_arg1,_arg2,_arg3); + wxPyDivisionShape_ResizeAdjoining(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11139,7 +11102,7 @@ static PyObject *_wrap_wxPyDivisionShape_PopupMenu(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_PopupMenu(_arg0,_arg1,_arg2); + wxPyDivisionShape_PopupMenu(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11176,7 +11139,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetBottomSide(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetBottomSide(_arg0,_arg1); + wxPyDivisionShape_SetBottomSide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11205,7 +11168,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetHandleSide(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetHandleSide(_arg0,_arg1); + wxPyDivisionShape_SetHandleSide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11242,7 +11205,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSide(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetLeftSide(_arg0,_arg1); + wxPyDivisionShape_SetLeftSide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11271,26 +11234,13 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSideColour(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetLeftSideColour(_arg0,*_arg1); + wxPyDivisionShape_SetLeftSideColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11340,7 +11290,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSidePen(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetLeftSidePen(_arg0,_arg1); + wxPyDivisionShape_SetLeftSidePen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11377,7 +11327,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetRightSide(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetRightSide(_arg0,_arg1); + wxPyDivisionShape_SetRightSide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11414,7 +11364,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSide(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetTopSide(_arg0,_arg1); + wxPyDivisionShape_SetTopSide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11443,26 +11393,13 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSideColour(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetTopSideColour(_arg0,*_arg1); + wxPyDivisionShape_SetTopSideColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11512,7 +11449,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSidePen(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_SetTopSidePen(_arg0,_arg1); + wxPyDivisionShape_SetTopSidePen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11540,7 +11477,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDelete(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDelete(_arg0); + wxPyDivisionShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11577,7 +11514,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDraw(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDraw(_arg0,*_arg1); + wxPyDivisionShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11614,7 +11551,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawContents(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDrawContents(_arg0,*_arg1); + wxPyDivisionShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11654,7 +11591,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawBranches(PyObject *self, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyDivisionShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11691,7 +11628,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMoveLinks(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyDivisionShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11728,7 +11665,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnErase(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnErase(_arg0,*_arg1); + wxPyDivisionShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11765,7 +11702,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEraseContents(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnEraseContents(_arg0,*_arg1); + wxPyDivisionShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11802,7 +11739,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnHighlight(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnHighlight(_arg0,*_arg1); + wxPyDivisionShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11834,7 +11771,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnLeftClick(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11866,7 +11803,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnLeftDoubleClick(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11898,7 +11835,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnRightClick(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11928,7 +11865,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyDivisionShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11973,7 +11910,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMovePre(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDivisionShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyDivisionShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12016,7 +11953,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMovePost(PyObject *self, PyObjec _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyDivisionShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12051,7 +11988,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDragLeft(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDivisionShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12083,7 +12020,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnBeginDragLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12115,7 +12052,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEndDragLeft(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12150,7 +12087,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDragRight(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDivisionShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12182,7 +12119,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnBeginDragRight(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12214,7 +12151,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEndDragRight(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyDivisionShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12255,7 +12192,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawOutline(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDivisionShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12292,7 +12229,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawControlPoints(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyDivisionShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12329,7 +12266,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEraseControlPoints(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyDivisionShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12369,7 +12306,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMoveLink(PyObject *self, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyDivisionShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12413,7 +12350,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSizingDragLeft(PyObject *self, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyDivisionShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12454,7 +12391,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSizingBeginDragLeft(PyObject *se } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDivisionShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12495,7 +12432,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSizingEndDragLeft(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyDivisionShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12525,7 +12462,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnBeginSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyDivisionShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12555,7 +12492,7 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEndSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDivisionShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyDivisionShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/ogl/oglshapes2.cpp b/wxPython/contrib/ogl/oglshapes2.cpp index 290f07f2a6..28e6c17042 100644 --- a/wxPython/contrib/ogl/oglshapes2.cpp +++ b/wxPython/contrib/ogl/oglshapes2.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - WXSHAPE_IMP_CALLBACKS(wxPyEllipseShape, wxEllipseShape); WXSHAPE_IMP_CALLBACKS(wxPyCircleShape, wxCircleShape); @@ -141,7 +135,7 @@ static PyObject *_wrap_new_wxPyEllipseShape(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyEllipseShape *)new_wxPyEllipseShape(_arg0,_arg1); + _result = (wxPyEllipseShape *)new_wxPyEllipseShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -184,7 +178,7 @@ static PyObject *_wrap_wxPyEllipseShape__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyEllipseShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -221,7 +215,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDraw(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDraw(_arg0,*_arg1); + wxPyEllipseShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -258,7 +252,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDrawContents(_arg0,*_arg1); + wxPyEllipseShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -298,7 +292,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawBranches(PyObject *self, PyOb _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyEllipseShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -335,7 +329,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMoveLinks(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyEllipseShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -372,7 +366,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnErase(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnErase(_arg0,*_arg1); + wxPyEllipseShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -409,7 +403,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEraseContents(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnEraseContents(_arg0,*_arg1); + wxPyEllipseShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -446,7 +440,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnHighlight(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnHighlight(_arg0,*_arg1); + wxPyEllipseShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -478,7 +472,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnLeftClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -510,7 +504,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnLeftDoubleClick(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -542,7 +536,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnRightClick(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -572,7 +566,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyEllipseShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -617,7 +611,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMovePre(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyEllipseShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyEllipseShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -660,7 +654,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMovePost(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyEllipseShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -695,7 +689,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyEllipseShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -727,7 +721,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnBeginDragLeft(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -759,7 +753,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEndDragLeft(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -794,7 +788,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDragRight(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyEllipseShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -826,7 +820,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnBeginDragRight(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -858,7 +852,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEndDragRight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyEllipseShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -899,7 +893,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawOutline(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyEllipseShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -936,7 +930,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyEllipseShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -973,7 +967,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEraseControlPoints(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyEllipseShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1013,7 +1007,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMoveLink(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyEllipseShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1057,7 +1051,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnSizingDragLeft(PyObject *self, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyEllipseShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1098,7 +1092,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnSizingBeginDragLeft(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyEllipseShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1139,7 +1133,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnSizingEndDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyEllipseShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1169,7 +1163,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnBeginSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyEllipseShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1199,7 +1193,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEndSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEllipseShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyEllipseShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1253,7 +1247,7 @@ static PyObject *_wrap_new_wxPyCircleShape(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyCircleShape *)new_wxPyCircleShape(_arg0); + _result = (wxPyCircleShape *)new_wxPyCircleShape(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1296,7 +1290,7 @@ static PyObject *_wrap_wxPyCircleShape__setCallbackInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyCircleShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1333,7 +1327,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDraw(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDraw(_arg0,*_arg1); + wxPyCircleShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1364,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawContents(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDrawContents(_arg0,*_arg1); + wxPyCircleShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1410,7 +1404,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawBranches(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyCircleShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1447,7 +1441,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMoveLinks(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyCircleShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1484,7 +1478,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnErase(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnErase(_arg0,*_arg1); + wxPyCircleShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1521,7 +1515,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEraseContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnEraseContents(_arg0,*_arg1); + wxPyCircleShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1558,7 +1552,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnHighlight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnHighlight(_arg0,*_arg1); + wxPyCircleShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1590,7 +1584,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnLeftClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1622,7 +1616,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnLeftDoubleClick(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1654,7 +1648,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnRightClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1684,7 +1678,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyCircleShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1729,7 +1723,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMovePre(PyObject *self, PyObject * _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyCircleShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyCircleShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1772,7 +1766,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMovePost(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyCircleShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1807,7 +1801,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCircleShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1839,7 +1833,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnBeginDragLeft(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1871,7 +1865,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEndDragLeft(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1906,7 +1900,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDragRight(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCircleShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1938,7 +1932,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnBeginDragRight(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1970,7 +1964,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEndDragRight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyCircleShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2011,7 +2005,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawOutline(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCircleShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2048,7 +2042,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyCircleShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2085,7 +2079,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEraseControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyCircleShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2125,7 +2119,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMoveLink(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyCircleShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2169,7 +2163,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnSizingDragLeft(PyObject *self, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyCircleShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2210,7 +2204,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnSizingBeginDragLeft(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCircleShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2251,7 +2245,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnSizingEndDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyCircleShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2281,7 +2275,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnBeginSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyCircleShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2311,7 +2305,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEndSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCircleShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyCircleShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +2349,7 @@ static PyObject *_wrap_new_wxArrowHead(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxArrowHead *)new_wxArrowHead(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxArrowHead *)new_wxArrowHead(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2388,7 +2382,7 @@ static PyObject *_wrap_delete_wxArrowHead(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxArrowHead(_arg0); + delete_wxArrowHead(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2417,7 +2411,7 @@ static PyObject *_wrap_wxArrowHead__GetType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxArrowHead__GetType(_arg0); + _result = (int )wxArrowHead__GetType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2445,7 +2439,7 @@ static PyObject *_wrap_wxArrowHead_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxArrowHead_GetPosition(_arg0); + _result = (int )wxArrowHead_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2473,7 +2467,7 @@ static PyObject *_wrap_wxArrowHead_SetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxArrowHead_SetPosition(_arg0,_arg1); + wxArrowHead_SetPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2502,7 +2496,7 @@ static PyObject *_wrap_wxArrowHead_GetXOffset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxArrowHead_GetXOffset(_arg0); + _result = (double )wxArrowHead_GetXOffset(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2530,7 +2524,7 @@ static PyObject *_wrap_wxArrowHead_GetYOffset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxArrowHead_GetYOffset(_arg0); + _result = (double )wxArrowHead_GetYOffset(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2558,7 +2552,7 @@ static PyObject *_wrap_wxArrowHead_GetSpacing(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxArrowHead_GetSpacing(_arg0); + _result = (double )wxArrowHead_GetSpacing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2580,7 @@ static PyObject *_wrap_wxArrowHead_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxArrowHead_GetSize(_arg0); + _result = (double )wxArrowHead_GetSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2614,12 +2608,16 @@ static PyObject *_wrap_wxArrowHead_GetName(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxArrowHead_GetName(_arg0)); + _result = new wxString (wxArrowHead_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2647,7 +2645,7 @@ static PyObject *_wrap_wxArrowHead_SetXOffset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxArrowHead_SetXOffset(_arg0,_arg1); + wxArrowHead_SetXOffset(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2676,7 +2674,7 @@ static PyObject *_wrap_wxArrowHead_SetYOffset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxArrowHead_SetYOffset(_arg0,_arg1); + wxArrowHead_SetYOffset(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2705,7 +2703,7 @@ static PyObject *_wrap_wxArrowHead_GetMetaFile(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPseudoMetaFile *)wxArrowHead_GetMetaFile(_arg0); + _result = (wxPseudoMetaFile *)wxArrowHead_GetMetaFile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2733,7 +2731,7 @@ static PyObject *_wrap_wxArrowHead_GetId(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxArrowHead_GetId(_arg0); + _result = (long )wxArrowHead_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2761,7 +2759,7 @@ static PyObject *_wrap_wxArrowHead_GetArrowEnd(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxArrowHead_GetArrowEnd(_arg0); + _result = (int )wxArrowHead_GetArrowEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2789,7 +2787,7 @@ static PyObject *_wrap_wxArrowHead_GetArrowSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxArrowHead_GetArrowSize(_arg0); + _result = (double )wxArrowHead_GetArrowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2817,7 +2815,7 @@ static PyObject *_wrap_wxArrowHead_SetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxArrowHead_SetSize(_arg0,_arg1); + wxArrowHead_SetSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2846,7 +2844,7 @@ static PyObject *_wrap_wxArrowHead_SetSpacing(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxArrowHead_SetSpacing(_arg0,_arg1); + wxArrowHead_SetSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2891,7 +2889,7 @@ static PyObject *_wrap_new_wxPyLineShape(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyLineShape *)new_wxPyLineShape(); + _result = (wxPyLineShape *)new_wxPyLineShape(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2934,7 +2932,7 @@ static PyObject *_wrap_wxPyLineShape__setCallbackInfo(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyLineShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2977,7 +2975,7 @@ static PyObject *_wrap_wxPyLineShape_AddArrow(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_AddArrow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxPyLineShape_AddArrow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3024,7 +3022,7 @@ static PyObject *_wrap_wxPyLineShape_AddArrowOrdered(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_AddArrowOrdered(_arg0,_arg1,_arg2,_arg3); + wxPyLineShape_AddArrowOrdered(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3054,26 +3052,13 @@ static PyObject *_wrap_wxPyLineShape_ClearArrow(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_ClearArrow(_arg0,*_arg1); + _result = (bool )wxPyLineShape_ClearArrow(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3105,7 +3090,7 @@ static PyObject *_wrap_wxPyLineShape_ClearArrowsAtPosition(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_ClearArrowsAtPosition(_arg0,_arg1); + wxPyLineShape_ClearArrowsAtPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3155,7 +3140,7 @@ static PyObject *_wrap_wxPyLineShape_DrawArrow(PyObject *self, PyObject *args, P _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_DrawArrow(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_DrawArrow(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3185,7 +3170,7 @@ static PyObject *_wrap_wxPyLineShape_DeleteArrowHeadId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_DeleteArrowHeadId(_arg0,_arg1); + _result = (bool )wxPyLineShape_DeleteArrowHeadId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3215,26 +3200,13 @@ static PyObject *_wrap_wxPyLineShape_DeleteArrowHead(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_DeleteArrowHead(_arg0,_arg1,*_arg2); + _result = (bool )wxPyLineShape_DeleteArrowHead(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3266,7 +3238,7 @@ static PyObject *_wrap_wxPyLineShape_DeleteLineControlPoint(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_DeleteLineControlPoint(_arg0); + _result = (bool )wxPyLineShape_DeleteLineControlPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3302,7 +3274,7 @@ static PyObject *_wrap_wxPyLineShape_DrawArrows(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_DrawArrows(_arg0,*_arg1); + wxPyLineShape_DrawArrows(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3350,7 +3322,7 @@ static PyObject *_wrap_wxPyLineShape_DrawRegion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_DrawRegion(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_DrawRegion(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3398,7 +3370,7 @@ static PyObject *_wrap_wxPyLineShape_EraseRegion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_EraseRegion(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_EraseRegion(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3428,7 +3400,7 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHeadId(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxArrowHead *)wxPyLineShape_FindArrowHeadId(_arg0,_arg1); + _result = (wxArrowHead *)wxPyLineShape_FindArrowHeadId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3458,26 +3430,13 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHead(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxArrowHead *)wxPyLineShape_FindArrowHead(_arg0,_arg1,*_arg2); + _result = (wxArrowHead *)wxPyLineShape_FindArrowHead(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3528,7 +3487,7 @@ static PyObject *_wrap_wxPyLineShape_FindLineEndPoints(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_FindLineEndPoints(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_FindLineEndPoints(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3579,7 +3538,7 @@ static PyObject *_wrap_wxPyLineShape_FindLinePosition(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyLineShape_FindLinePosition(_arg0,_arg1,_arg2); + _result = (int )wxPyLineShape_FindLinePosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3607,7 +3566,7 @@ static PyObject *_wrap_wxPyLineShape_FindMinimumWidth(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPyLineShape_FindMinimumWidth(_arg0); + _result = (double )wxPyLineShape_FindMinimumWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3656,7 +3615,7 @@ static PyObject *_wrap_wxPyLineShape_FindNth(PyObject *self, PyObject *args, PyO _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_FindNth(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_FindNth(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3695,7 +3654,7 @@ static PyObject *_wrap_wxPyLineShape_GetAttachmentFrom(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyLineShape_GetAttachmentFrom(_arg0); + _result = (int )wxPyLineShape_GetAttachmentFrom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3723,7 +3682,7 @@ static PyObject *_wrap_wxPyLineShape_GetAttachmentTo(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyLineShape_GetAttachmentTo(_arg0); + _result = (int )wxPyLineShape_GetAttachmentTo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3770,7 +3729,7 @@ static PyObject *_wrap_wxPyLineShape_GetEnds(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_GetEnds(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_GetEnds(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3819,7 +3778,7 @@ static PyObject *_wrap_wxPyLineShape_GetFrom(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyLineShape_GetFrom(_arg0); + _result = (wxPyShape *)wxPyLineShape_GetFrom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3857,7 +3816,7 @@ static PyObject *_wrap_wxPyLineShape_GetLabelPosition(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_GetLabelPosition(_arg0,_arg1,_arg2,_arg3); + wxPyLineShape_GetLabelPosition(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3906,7 +3865,7 @@ static PyObject *_wrap_wxPyLineShape_GetNextControlPoint(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxPyLineShape_GetNextControlPoint(_arg0,_arg1); + _result = (wxPoint *)wxPyLineShape_GetNextControlPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3940,7 +3899,7 @@ static PyObject *_wrap_wxPyLineShape_GetTo(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyShape *)wxPyLineShape_GetTo(_arg0); + _result = (wxPyShape *)wxPyLineShape_GetTo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3967,7 +3926,7 @@ static PyObject *_wrap_wxPyLineShape_Initialise(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_Initialise(_arg0); + wxPyLineShape_Initialise(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4004,7 +3963,7 @@ static PyObject *_wrap_wxPyLineShape_InsertLineControlPoint(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_InsertLineControlPoint(_arg0,_arg1); + wxPyLineShape_InsertLineControlPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4042,7 +4001,7 @@ static PyObject *_wrap_wxPyLineShape_IsEnd(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_IsEnd(_arg0,_arg1); + _result = (bool )wxPyLineShape_IsEnd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4070,7 +4029,7 @@ static PyObject *_wrap_wxPyLineShape_IsSpline(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_IsSpline(_arg0); + _result = (bool )wxPyLineShape_IsSpline(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4098,7 +4057,7 @@ static PyObject *_wrap_wxPyLineShape_MakeLineControlPoints(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_MakeLineControlPoints(_arg0,_arg1); + wxPyLineShape_MakeLineControlPoints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4130,7 +4089,7 @@ static PyObject *_wrap_wxPyLineShape_GetLineControlPoints(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyLineShape_GetLineControlPoints(_arg0); + _result = (PyObject *)wxPyLineShape_GetLineControlPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4160,7 +4119,7 @@ static PyObject *_wrap_wxPyLineShape_SetAttachmentFrom(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetAttachmentFrom(_arg0,_arg1); + wxPyLineShape_SetAttachmentFrom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4190,7 +4149,7 @@ static PyObject *_wrap_wxPyLineShape_SetAttachments(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetAttachments(_arg0,_arg1,_arg2); + wxPyLineShape_SetAttachments(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4219,7 +4178,7 @@ static PyObject *_wrap_wxPyLineShape_SetAttachmentTo(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetAttachmentTo(_arg0,_arg1); + wxPyLineShape_SetAttachmentTo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4251,7 +4210,7 @@ static PyObject *_wrap_wxPyLineShape_SetEnds(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetEnds(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_SetEnds(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4288,7 +4247,7 @@ static PyObject *_wrap_wxPyLineShape_SetFrom(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetFrom(_arg0,_arg1); + wxPyLineShape_SetFrom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4319,7 +4278,7 @@ static PyObject *_wrap_wxPyLineShape_SetIgnoreOffsets(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetIgnoreOffsets(_arg0,_arg1); + wxPyLineShape_SetIgnoreOffsets(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4350,7 +4309,7 @@ static PyObject *_wrap_wxPyLineShape_SetSpline(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetSpline(_arg0,_arg1); + wxPyLineShape_SetSpline(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4387,7 +4346,7 @@ static PyObject *_wrap_wxPyLineShape_SetTo(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_SetTo(_arg0,_arg1); + wxPyLineShape_SetTo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4424,7 +4383,7 @@ static PyObject *_wrap_wxPyLineShape_Straighten(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_Straighten(_arg0,_arg1); + wxPyLineShape_Straighten(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4452,7 +4411,7 @@ static PyObject *_wrap_wxPyLineShape_Unlink(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_Unlink(_arg0); + wxPyLineShape_Unlink(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4489,7 +4448,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDraw(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDraw(_arg0,*_arg1); + wxPyLineShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4526,7 +4485,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawContents(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDrawContents(_arg0,*_arg1); + wxPyLineShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4566,7 +4525,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawBranches(PyObject *self, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyLineShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4603,7 +4562,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMoveLinks(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyLineShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4640,7 +4599,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnErase(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnErase(_arg0,*_arg1); + wxPyLineShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4677,7 +4636,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEraseContents(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnEraseContents(_arg0,*_arg1); + wxPyLineShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4714,7 +4673,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnHighlight(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnHighlight(_arg0,*_arg1); + wxPyLineShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4746,7 +4705,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnLeftClick(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4778,7 +4737,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnLeftDoubleClick(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4810,7 +4769,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnRightClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4840,7 +4799,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyLineShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4885,7 +4844,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMovePre(PyObject *self, PyObject *ar _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyLineShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyLineShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4928,7 +4887,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMovePost(PyObject *self, PyObject *a _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyLineShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4963,7 +4922,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDragLeft(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyLineShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4995,7 +4954,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnBeginDragLeft(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5027,7 +4986,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEndDragLeft(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5062,7 +5021,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDragRight(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyLineShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5094,7 +5053,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnBeginDragRight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5126,7 +5085,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEndDragRight(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyLineShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5167,7 +5126,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawOutline(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyLineShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5204,7 +5163,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawControlPoints(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyLineShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5241,7 +5200,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEraseControlPoints(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyLineShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5281,7 +5240,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMoveLink(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyLineShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5325,7 +5284,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnSizingDragLeft(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyLineShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5366,7 +5325,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnSizingBeginDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyLineShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5407,7 +5366,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnSizingEndDragLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyLineShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5437,7 +5396,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnBeginSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyLineShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5467,7 +5426,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEndSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLineShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyLineShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5512,7 +5471,7 @@ static PyObject *_wrap_new_wxPyPolygonShape(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPolygonShape *)new_wxPyPolygonShape(); + _result = (wxPyPolygonShape *)new_wxPyPolygonShape(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5555,7 +5514,7 @@ static PyObject *_wrap_wxPyPolygonShape__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyPolygonShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5597,7 +5556,7 @@ static PyObject *_wrap_wxPyPolygonShape_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyPolygonShape_Create(_arg0,_arg1); + _result = (PyObject *)wxPyPolygonShape_Create(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5627,7 +5586,7 @@ static PyObject *_wrap_wxPyPolygonShape_AddPolygonPoint(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_AddPolygonPoint(_arg0,_arg1); + wxPyPolygonShape_AddPolygonPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5655,7 +5614,7 @@ static PyObject *_wrap_wxPyPolygonShape_CalculatePolygonCentre(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_CalculatePolygonCentre(_arg0); + wxPyPolygonShape_CalculatePolygonCentre(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5684,7 +5643,7 @@ static PyObject *_wrap_wxPyPolygonShape_DeletePolygonPoint(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_DeletePolygonPoint(_arg0,_arg1); + wxPyPolygonShape_DeletePolygonPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5716,7 +5675,7 @@ static PyObject *_wrap_wxPyPolygonShape_GetPoints(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyPolygonShape_GetPoints(_arg0); + _result = (PyObject *)wxPyPolygonShape_GetPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5745,7 +5704,7 @@ static PyObject *_wrap_wxPyPolygonShape_UpdateOriginalPoints(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_UpdateOriginalPoints(_arg0); + wxPyPolygonShape_UpdateOriginalPoints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5782,7 +5741,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDraw(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDraw(_arg0,*_arg1); + wxPyPolygonShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5819,7 +5778,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDrawContents(_arg0,*_arg1); + wxPyPolygonShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5859,7 +5818,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawBranches(PyObject *self, PyOb _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyPolygonShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5896,7 +5855,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMoveLinks(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyPolygonShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5933,7 +5892,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnErase(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnErase(_arg0,*_arg1); + wxPyPolygonShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5970,7 +5929,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEraseContents(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnEraseContents(_arg0,*_arg1); + wxPyPolygonShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6007,7 +5966,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnHighlight(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnHighlight(_arg0,*_arg1); + wxPyPolygonShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6039,7 +5998,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnLeftClick(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6071,7 +6030,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnLeftDoubleClick(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6103,7 +6062,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnRightClick(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6133,7 +6092,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyPolygonShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6178,7 +6137,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMovePre(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyPolygonShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyPolygonShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6221,7 +6180,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMovePost(PyObject *self, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyPolygonShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6256,7 +6215,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDragLeft(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyPolygonShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6288,7 +6247,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnBeginDragLeft(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6320,7 +6279,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEndDragLeft(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6355,7 +6314,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDragRight(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyPolygonShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6387,7 +6346,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnBeginDragRight(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6419,7 +6378,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEndDragRight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyPolygonShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6460,7 +6419,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawOutline(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyPolygonShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6497,7 +6456,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawControlPoints(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyPolygonShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6534,7 +6493,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEraseControlPoints(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyPolygonShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6574,7 +6533,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMoveLink(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyPolygonShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6618,7 +6577,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnSizingDragLeft(PyObject *self, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyPolygonShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6659,7 +6618,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnSizingBeginDragLeft(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyPolygonShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6700,7 +6659,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnSizingEndDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyPolygonShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6730,7 +6689,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnBeginSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyPolygonShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6760,7 +6719,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEndSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPolygonShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyPolygonShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6815,7 +6774,7 @@ static PyObject *_wrap_new_wxPyTextShape(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTextShape *)new_wxPyTextShape(_arg0,_arg1); + _result = (wxPyTextShape *)new_wxPyTextShape(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6858,7 +6817,7 @@ static PyObject *_wrap_wxPyTextShape__setCallbackInfo(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyTextShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6886,7 +6845,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDelete(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDelete(_arg0); + wxPyTextShape_base_OnDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6923,7 +6882,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDraw(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDraw(_arg0,*_arg1); + wxPyTextShape_base_OnDraw(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6960,7 +6919,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawContents(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDrawContents(_arg0,*_arg1); + wxPyTextShape_base_OnDrawContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7000,7 +6959,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawBranches(PyObject *self, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); + wxPyTextShape_base_OnDrawBranches(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7037,7 +6996,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMoveLinks(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnMoveLinks(_arg0,*_arg1); + wxPyTextShape_base_OnMoveLinks(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7074,7 +7033,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnErase(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnErase(_arg0,*_arg1); + wxPyTextShape_base_OnErase(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7111,7 +7070,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEraseContents(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnEraseContents(_arg0,*_arg1); + wxPyTextShape_base_OnEraseContents(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7148,7 +7107,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnHighlight(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnHighlight(_arg0,*_arg1); + wxPyTextShape_base_OnHighlight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7180,7 +7139,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnLeftClick(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7212,7 +7171,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnLeftDoubleClick(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7244,7 +7203,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnRightClick(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7274,7 +7233,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnSize(_arg0,_arg1,_arg2); + wxPyTextShape_base_OnSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7319,7 +7278,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMovePre(PyObject *self, PyObject *ar _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyTextShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxPyTextShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7362,7 +7321,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMovePost(PyObject *self, PyObject *a _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyTextShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7397,7 +7356,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDragLeft(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyTextShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7429,7 +7388,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnBeginDragLeft(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7461,7 +7420,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEndDragLeft(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7496,7 +7455,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDragRight(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyTextShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7528,7 +7487,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnBeginDragRight(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7560,7 +7519,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEndDragRight(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPyTextShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7601,7 +7560,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawOutline(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyTextShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7638,7 +7597,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawControlPoints(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnDrawControlPoints(_arg0,*_arg1); + wxPyTextShape_base_OnDrawControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7675,7 +7634,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEraseControlPoints(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnEraseControlPoints(_arg0,*_arg1); + wxPyTextShape_base_OnEraseControlPoints(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7715,7 +7674,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMoveLink(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnMoveLink(_arg0,*_arg1,_arg2); + wxPyTextShape_base_OnMoveLink(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7759,7 +7718,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnSizingDragLeft(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxPyTextShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7800,7 +7759,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnSizingBeginDragLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyTextShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7841,7 +7800,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnSizingEndDragLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxPyTextShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7871,7 +7830,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnBeginSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnBeginSize(_arg0,_arg1,_arg2); + wxPyTextShape_base_OnBeginSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7901,7 +7860,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEndSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextShape_base_OnEndSize(_arg0,_arg1,_arg2); + wxPyTextShape_base_OnEndSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/stc/gtk/stc_.cpp b/wxPython/contrib/stc/gtk/stc_.cpp index c9bb255e13..61ec8bb272 100644 --- a/wxPython/contrib/stc/gtk/stc_.cpp +++ b/wxPython/contrib/stc/gtk/stc_.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -167,7 +161,7 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -201,26 +195,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AddText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AddText(_arg0,*_arg1); + wxStyledTextCtrl_AddText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -253,26 +234,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AddStyledText(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AddStyledText(_arg0,*_arg1); + wxStyledTextCtrl_AddStyledText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -306,26 +274,13 @@ static PyObject *_wrap_wxStyledTextCtrl_InsertText(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_InsertText(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_InsertText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -357,7 +312,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ClearAll(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ClearAll(_arg0); + wxStyledTextCtrl_ClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -385,7 +340,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ClearDocumentStyle(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ClearDocumentStyle(_arg0); + wxStyledTextCtrl_ClearDocumentStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -414,7 +369,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLength(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLength(_arg0); + _result = (int )wxStyledTextCtrl_GetLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -443,7 +398,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCharAt(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCharAt(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetCharAt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -471,7 +426,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurrentPos(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCurrentPos(_arg0); + _result = (int )wxStyledTextCtrl_GetCurrentPos(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -499,7 +454,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetAnchor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetAnchor(_arg0); + _result = (int )wxStyledTextCtrl_GetAnchor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +483,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyleAt(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetStyleAt(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetStyleAt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -555,7 +510,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Redo(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Redo(_arg0); + wxStyledTextCtrl_Redo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -586,7 +541,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetUndoCollection(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetUndoCollection(_arg0,_arg1); + wxStyledTextCtrl_SetUndoCollection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -614,7 +569,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SelectAll(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SelectAll(_arg0); + wxStyledTextCtrl_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -642,7 +597,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSavePoint(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSavePoint(_arg0); + wxStyledTextCtrl_SetSavePoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -673,12 +628,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyledText(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2)); + _result = new wxString (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -706,7 +665,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CanRedo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CanRedo(_arg0); + _result = (bool )wxStyledTextCtrl_CanRedo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -735,7 +694,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerLineFromHandle(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerLineFromHandle(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_MarkerLineFromHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -763,7 +722,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDeleteHandle(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDeleteHandle(_arg0,_arg1); + wxStyledTextCtrl_MarkerDeleteHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -792,7 +751,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetUndoCollection(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetUndoCollection(_arg0); + _result = (bool )wxStyledTextCtrl_GetUndoCollection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -820,7 +779,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetViewWhiteSpace(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetViewWhiteSpace(_arg0); + _result = (int )wxStyledTextCtrl_GetViewWhiteSpace(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -848,7 +807,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetViewWhiteSpace(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetViewWhiteSpace(_arg0,_arg1); + wxStyledTextCtrl_SetViewWhiteSpace(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -885,7 +844,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PositionFromPoint(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_PositionFromPoint(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_PositionFromPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -915,7 +874,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PositionFromPointClose(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_PositionFromPointClose(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_PositionFromPointClose(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -943,7 +902,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GotoLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_GotoLine(_arg0,_arg1); + wxStyledTextCtrl_GotoLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -972,7 +931,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GotoPos(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_GotoPos(_arg0,_arg1); + wxStyledTextCtrl_GotoPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1001,7 +960,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetAnchor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetAnchor(_arg0,_arg1); + wxStyledTextCtrl_SetAnchor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1035,12 +994,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurLine(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetCurLine(_arg0,_arg1)); + _result = new wxString (wxStyledTextCtrl_GetCurLine(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { PyObject *o; @@ -1073,7 +1036,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEndStyled(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEndStyled(_arg0); + _result = (int )wxStyledTextCtrl_GetEndStyled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1101,7 +1064,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ConvertEOLs(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ConvertEOLs(_arg0,_arg1); + wxStyledTextCtrl_ConvertEOLs(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1130,7 +1093,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEOLMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEOLMode(_arg0); + _result = (int )wxStyledTextCtrl_GetEOLMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1158,7 +1121,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEOLMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEOLMode(_arg0,_arg1); + wxStyledTextCtrl_SetEOLMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1188,7 +1151,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StartStyling(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StartStyling(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StartStyling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1218,7 +1181,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStyling(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStyling(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetStyling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1247,7 +1210,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetBufferedDraw(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetBufferedDraw(_arg0); + _result = (bool )wxStyledTextCtrl_GetBufferedDraw(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1277,7 +1240,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetBufferedDraw(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetBufferedDraw(_arg0,_arg1); + wxStyledTextCtrl_SetBufferedDraw(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1306,7 +1269,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTabWidth(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTabWidth(_arg0,_arg1); + wxStyledTextCtrl_SetTabWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1335,7 +1298,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTabWidth(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTabWidth(_arg0); + _result = (int )wxStyledTextCtrl_GetTabWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1363,7 +1326,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCodePage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCodePage(_arg0,_arg1); + wxStyledTextCtrl_SetCodePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1374,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDefine(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDefine(_arg0,_arg1,_arg2,*_arg3,*_arg4); + wxStyledTextCtrl_MarkerDefine(_arg0,_arg1,_arg2,*_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1448,7 +1411,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetForeground(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerSetForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_MarkerSetForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1485,7 +1448,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetBackground(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerSetBackground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_MarkerSetBackground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1515,7 +1478,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerAdd(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerAdd(_arg0,_arg1,_arg2); + wxStyledTextCtrl_MarkerAdd(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1545,7 +1508,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDelete(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDelete(_arg0,_arg1,_arg2); + wxStyledTextCtrl_MarkerDelete(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1574,7 +1537,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDeleteAll(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDeleteAll(_arg0,_arg1); + wxStyledTextCtrl_MarkerDeleteAll(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1604,7 +1567,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerGet(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerGet(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_MarkerGet(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1634,7 +1597,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerNext(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerNext(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_MarkerNext(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1664,7 +1627,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerPrevious(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerPrevious(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_MarkerPrevious(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1693,7 +1656,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginType(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginType(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginType(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1723,7 +1686,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginType(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginType(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetMarginType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1752,7 +1715,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginWidth(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginWidth(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1782,7 +1745,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginWidth(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetMarginWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1811,7 +1774,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginMask(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginMask(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginMask(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1841,7 +1804,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginMask(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginMask(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetMarginMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1872,7 +1835,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginSensitive(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginSensitive(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginSensitive(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1902,7 +1865,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginSensitive(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetMarginSensitive(_arg0,_arg1); + _result = (bool )wxStyledTextCtrl_GetMarginSensitive(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1929,7 +1892,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleClearAll(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleClearAll(_arg0); + wxStyledTextCtrl_StyleClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1966,7 +1929,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetForeground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2003,7 +1966,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetBackground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetBackground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetBackground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2035,7 +1998,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetBold(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetBold(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetBold(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2067,7 +2030,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetItalic(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetItalic(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetItalic(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2097,7 +2060,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetSize(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2127,26 +2090,13 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFaceName(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetFaceName(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetFaceName(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2182,7 +2132,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetEOLFilled(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetEOLFilled(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetEOLFilled(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2210,7 +2160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleResetDefault(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleResetDefault(_arg0); + wxStyledTextCtrl_StyleResetDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2242,7 +2192,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetUnderline(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetUnderline(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetUnderline(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2272,7 +2222,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetCase(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetCase(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetCase(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2311,7 +2261,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelForeground(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_SetSelForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2350,7 +2300,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelBackground(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelBackground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_SetSelBackground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2386,7 +2336,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretForeground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretForeground(_arg0,*_arg1); + wxStyledTextCtrl_SetCaretForeground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2417,7 +2367,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyAssign(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyAssign(_arg0,_arg1,_arg2,_arg3); + wxStyledTextCtrl_CmdKeyAssign(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2447,7 +2397,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyClear(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyClear(_arg0,_arg1,_arg2); + wxStyledTextCtrl_CmdKeyClear(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2475,7 +2425,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyClearAll(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyClearAll(_arg0); + wxStyledTextCtrl_CmdKeyClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2505,7 +2455,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStyleBytes(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStyleBytes(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetStyleBytes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2537,7 +2487,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetVisible(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetVisible(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2566,7 +2516,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretPeriod(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCaretPeriod(_arg0); + _result = (int )wxStyledTextCtrl_GetCaretPeriod(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2594,7 +2544,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretPeriod(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretPeriod(_arg0,_arg1); + wxStyledTextCtrl_SetCaretPeriod(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2623,26 +2573,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetWordChars(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetWordChars(_arg0,*_arg1); + wxStyledTextCtrl_SetWordChars(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2674,7 +2611,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BeginUndoAction(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_BeginUndoAction(_arg0); + wxStyledTextCtrl_BeginUndoAction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2702,7 +2639,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EndUndoAction(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EndUndoAction(_arg0); + wxStyledTextCtrl_EndUndoAction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2732,7 +2669,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetStyle(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_IndicatorSetStyle(_arg0,_arg1,_arg2); + wxStyledTextCtrl_IndicatorSetStyle(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2762,7 +2699,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorGetStyle(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_IndicatorGetStyle(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_IndicatorGetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2798,7 +2735,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetForeground(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_IndicatorSetForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_IndicatorSetForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2829,7 +2766,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorGetForeground(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_IndicatorGetForeground(_arg0,_arg1)); + _result = new wxColour (wxStyledTextCtrl_IndicatorGetForeground(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2858,7 +2795,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStyleBits(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStyleBits(_arg0,_arg1); + wxStyledTextCtrl_SetStyleBits(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2887,7 +2824,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyleBits(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetStyleBits(_arg0); + _result = (int )wxStyledTextCtrl_GetStyleBits(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2916,7 +2853,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLineState(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLineState(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetLineState(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2946,7 +2883,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineState(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineState(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2974,7 +2911,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMaxLineState(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMaxLineState(_arg0); + _result = (int )wxStyledTextCtrl_GetMaxLineState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3002,7 +2939,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretLineVisible(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetCaretLineVisible(_arg0); + _result = (bool )wxStyledTextCtrl_GetCaretLineVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3032,7 +2969,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretLineVisible(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretLineVisible(_arg0,_arg1); + wxStyledTextCtrl_SetCaretLineVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3062,7 +2999,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretLineBack(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_GetCaretLineBack(_arg0)); + _result = new wxColour (wxStyledTextCtrl_GetCaretLineBack(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3098,7 +3035,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretLineBack(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretLineBack(_arg0,*_arg1); + wxStyledTextCtrl_SetCaretLineBack(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3128,26 +3065,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompShow(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompShow(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_AutoCompShow(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3179,7 +3103,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompCancel(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompCancel(_arg0); + wxStyledTextCtrl_AutoCompCancel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3208,7 +3132,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompActive(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompActive(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3236,7 +3160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompPosStart(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_AutoCompPosStart(_arg0); + _result = (int )wxStyledTextCtrl_AutoCompPosStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3263,7 +3187,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompComplete(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompComplete(_arg0); + wxStyledTextCtrl_AutoCompComplete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3292,26 +3216,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompStops(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompStops(_arg0,*_arg1); + wxStyledTextCtrl_AutoCompStops(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3344,7 +3255,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetSeparator(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetSeparator(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetSeparator(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3373,7 +3284,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetSeparator(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_AutoCompGetSeparator(_arg0); + _result = (int )wxStyledTextCtrl_AutoCompGetSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3401,26 +3312,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSelect(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSelect(_arg0,*_arg1); + wxStyledTextCtrl_AutoCompSelect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3455,7 +3353,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetCancelAtStart(PyObject *self, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetCancelAtStart(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetCancelAtStart(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3484,7 +3382,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetCancelAtStart(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetCancelAtStart(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetCancelAtStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3512,26 +3410,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetFillUps(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetFillUps(_arg0,*_arg1); + wxStyledTextCtrl_AutoCompSetFillUps(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3566,7 +3451,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetChooseSingle(PyObject *self, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetChooseSingle(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetChooseSingle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3595,7 +3480,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetChooseSingle(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetChooseSingle(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetChooseSingle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3625,7 +3510,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetIgnoreCase(PyObject *self, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetIgnoreCase(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetIgnoreCase(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3654,7 +3539,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetIgnoreCase(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetIgnoreCase(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetIgnoreCase(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3683,26 +3568,13 @@ static PyObject *_wrap_wxStyledTextCtrl_UserListShow(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_UserListShow(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_UserListShow(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3737,7 +3609,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetAutoHide(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetAutoHide(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetAutoHide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3766,7 +3638,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetAutoHide(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetAutoHide(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetAutoHide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3794,7 +3666,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetIndent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetIndent(_arg0,_arg1); + wxStyledTextCtrl_SetIndent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3823,7 +3695,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetIndent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetIndent(_arg0); + _result = (int )wxStyledTextCtrl_GetIndent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3853,7 +3725,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetUseTabs(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetUseTabs(_arg0,_arg1); + wxStyledTextCtrl_SetUseTabs(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3882,7 +3754,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetUseTabs(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetUseTabs(_arg0); + _result = (bool )wxStyledTextCtrl_GetUseTabs(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3911,7 +3783,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLineIndentation(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLineIndentation(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetLineIndentation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3941,7 +3813,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineIndentation(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineIndentation(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineIndentation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3970,7 +3842,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineIndentPosition(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineIndentPosition(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineIndentPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3999,7 +3871,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetColumn(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetColumn(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4029,7 +3901,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetUseHorizontalScrollBar(PyObject *self _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetUseHorizontalScrollBar(_arg0,_arg1); + wxStyledTextCtrl_SetUseHorizontalScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4058,7 +3930,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetUseHorizontalScrollBar(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetUseHorizontalScrollBar(_arg0); + _result = (bool )wxStyledTextCtrl_GetUseHorizontalScrollBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4088,7 +3960,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetIndentationGuides(PyObject *self, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetIndentationGuides(_arg0,_arg1); + wxStyledTextCtrl_SetIndentationGuides(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4117,7 +3989,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetIndentationGuides(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetIndentationGuides(_arg0); + _result = (bool )wxStyledTextCtrl_GetIndentationGuides(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4145,7 +4017,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetHighlightGuide(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetHighlightGuide(_arg0,_arg1); + wxStyledTextCtrl_SetHighlightGuide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4174,7 +4046,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetHighlightGuide(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetHighlightGuide(_arg0); + _result = (int )wxStyledTextCtrl_GetHighlightGuide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4203,7 +4075,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineEndPosition(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineEndPosition(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineEndPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4231,7 +4103,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCodePage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCodePage(_arg0); + _result = (int )wxStyledTextCtrl_GetCodePage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4260,7 +4132,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretForeground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_GetCaretForeground(_arg0)); + _result = new wxColour (wxStyledTextCtrl_GetCaretForeground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4289,7 +4161,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetReadOnly(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetReadOnly(_arg0); + _result = (bool )wxStyledTextCtrl_GetReadOnly(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4317,7 +4189,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCurrentPos(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCurrentPos(_arg0,_arg1); + wxStyledTextCtrl_SetCurrentPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4346,7 +4218,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionStart(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelectionStart(_arg0,_arg1); + wxStyledTextCtrl_SetSelectionStart(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4375,7 +4247,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectionStart(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetSelectionStart(_arg0); + _result = (int )wxStyledTextCtrl_GetSelectionStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4403,7 +4275,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelectionEnd(_arg0,_arg1); + wxStyledTextCtrl_SetSelectionEnd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4432,7 +4304,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectionEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetSelectionEnd(_arg0); + _result = (int )wxStyledTextCtrl_GetSelectionEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4460,7 +4332,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetPrintMagnification(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetPrintMagnification(_arg0,_arg1); + wxStyledTextCtrl_SetPrintMagnification(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4489,7 +4361,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetPrintMagnification(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetPrintMagnification(_arg0); + _result = (int )wxStyledTextCtrl_GetPrintMagnification(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4517,7 +4389,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetPrintColourMode(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetPrintColourMode(_arg0,_arg1); + wxStyledTextCtrl_SetPrintColourMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4546,7 +4418,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetPrintColourMode(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetPrintColourMode(_arg0); + _result = (int )wxStyledTextCtrl_GetPrintColourMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4581,28 +4453,15 @@ static PyObject *_wrap_wxStyledTextCtrl_FindText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_FindText(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + _result = (int )wxStyledTextCtrl_FindText(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4673,7 +4532,7 @@ static PyObject *_wrap_wxStyledTextCtrl_FormatRange(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_FormatRange(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7); + _result = (int )wxStyledTextCtrl_FormatRange(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4701,7 +4560,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFirstVisibleLine(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetFirstVisibleLine(_arg0); + _result = (int )wxStyledTextCtrl_GetFirstVisibleLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4730,12 +4589,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetLine(_arg0,_arg1)); + _result = new wxString (wxStyledTextCtrl_GetLine(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4763,7 +4626,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineCount(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineCount(_arg0); + _result = (int )wxStyledTextCtrl_GetLineCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4791,7 +4654,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginLeft(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginLeft(_arg0,_arg1); + wxStyledTextCtrl_SetMarginLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4820,7 +4683,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginLeft(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginLeft(_arg0); + _result = (int )wxStyledTextCtrl_GetMarginLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4848,7 +4711,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginRight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginRight(_arg0,_arg1); + wxStyledTextCtrl_SetMarginRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4877,7 +4740,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginRight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginRight(_arg0); + _result = (int )wxStyledTextCtrl_GetMarginRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4905,7 +4768,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetModify(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetModify(_arg0); + _result = (bool )wxStyledTextCtrl_GetModify(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4934,7 +4797,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelection(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4963,12 +4826,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectedText(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetSelectedText(_arg0)); + _result = new wxString (wxStyledTextCtrl_GetSelectedText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4998,12 +4865,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTextRange(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetTextRange(_arg0,_arg1,_arg2)); + _result = new wxString (wxStyledTextCtrl_GetTextRange(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5033,7 +4904,7 @@ static PyObject *_wrap_wxStyledTextCtrl_HideSelection(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_HideSelection(_arg0,_arg1); + wxStyledTextCtrl_HideSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5063,7 +4934,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LineFromPosition(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_LineFromPosition(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_LineFromPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5092,7 +4963,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PositionFromLine(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_PositionFromLine(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_PositionFromLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5121,7 +4992,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LineScroll(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_LineScroll(_arg0,_arg1,_arg2); + wxStyledTextCtrl_LineScroll(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5149,7 +5020,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EnsureCaretVisible(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EnsureCaretVisible(_arg0); + wxStyledTextCtrl_EnsureCaretVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5178,26 +5049,13 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceSelection(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ReplaceSelection(_arg0,*_arg1); + wxStyledTextCtrl_ReplaceSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5232,7 +5090,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetReadOnly(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetReadOnly(_arg0,_arg1); + wxStyledTextCtrl_SetReadOnly(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5261,7 +5119,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CanPaste(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CanPaste(_arg0); + _result = (bool )wxStyledTextCtrl_CanPaste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5289,7 +5147,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CanUndo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CanUndo(_arg0); + _result = (bool )wxStyledTextCtrl_CanUndo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5316,7 +5174,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EmptyUndoBuffer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EmptyUndoBuffer(_arg0); + wxStyledTextCtrl_EmptyUndoBuffer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5344,7 +5202,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Undo(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Undo(_arg0); + wxStyledTextCtrl_Undo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5372,7 +5230,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Cut(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Cut(_arg0); + wxStyledTextCtrl_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5400,7 +5258,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Copy(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Copy(_arg0); + wxStyledTextCtrl_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5428,7 +5286,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Paste(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Paste(_arg0); + wxStyledTextCtrl_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5456,7 +5314,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Clear(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Clear(_arg0); + wxStyledTextCtrl_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5485,26 +5343,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetText(_arg0,*_arg1); + wxStyledTextCtrl_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5537,12 +5382,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetText(_arg0)); + _result = new wxString (wxStyledTextCtrl_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5570,7 +5419,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTextLength(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTextLength(_arg0); + _result = (int )wxStyledTextCtrl_GetTextLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5600,7 +5449,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetOvertype(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetOvertype(_arg0,_arg1); + wxStyledTextCtrl_SetOvertype(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5629,7 +5478,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetOvertype(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetOvertype(_arg0); + _result = (bool )wxStyledTextCtrl_GetOvertype(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5657,7 +5506,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretWidth(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretWidth(_arg0,_arg1); + wxStyledTextCtrl_SetCaretWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5686,7 +5535,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretWidth(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCaretWidth(_arg0); + _result = (int )wxStyledTextCtrl_GetCaretWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5714,7 +5563,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTargetStart(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTargetStart(_arg0,_arg1); + wxStyledTextCtrl_SetTargetStart(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5743,7 +5592,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTargetStart(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTargetStart(_arg0); + _result = (int )wxStyledTextCtrl_GetTargetStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5771,7 +5620,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTargetEnd(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTargetEnd(_arg0,_arg1); + wxStyledTextCtrl_SetTargetEnd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5800,7 +5649,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTargetEnd(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTargetEnd(_arg0); + _result = (int )wxStyledTextCtrl_GetTargetEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5829,26 +5678,13 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceTarget(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_ReplaceTarget(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_ReplaceTarget(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5881,26 +5717,13 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceTargetRE(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_ReplaceTargetRE(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_ReplaceTargetRE(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5933,26 +5756,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchInTarget(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_SearchInTarget(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_SearchInTarget(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5984,7 +5794,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSearchFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSearchFlags(_arg0,_arg1); + wxStyledTextCtrl_SetSearchFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6013,7 +5823,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSearchFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetSearchFlags(_arg0); + _result = (int )wxStyledTextCtrl_GetSearchFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6042,26 +5852,13 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipShow(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipShow(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_CallTipShow(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6093,7 +5890,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipCancel(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipCancel(_arg0); + wxStyledTextCtrl_CallTipCancel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6122,7 +5919,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipActive(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CallTipActive(_arg0); + _result = (bool )wxStyledTextCtrl_CallTipActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6150,7 +5947,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipPosAtStart(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_CallTipPosAtStart(_arg0); + _result = (int )wxStyledTextCtrl_CallTipPosAtStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6179,7 +5976,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipSetHighlight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipSetHighlight(_arg0,_arg1,_arg2); + wxStyledTextCtrl_CallTipSetHighlight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6215,7 +6012,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipSetBackground(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipSetBackground(_arg0,*_arg1); + wxStyledTextCtrl_CallTipSetBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6245,7 +6042,7 @@ static PyObject *_wrap_wxStyledTextCtrl_VisibleFromDocLine(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_VisibleFromDocLine(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_VisibleFromDocLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6274,7 +6071,7 @@ static PyObject *_wrap_wxStyledTextCtrl_DocLineFromVisible(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_DocLineFromVisible(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_DocLineFromVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6303,7 +6100,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetFoldLevel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetFoldLevel(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetFoldLevel(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6333,7 +6130,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFoldLevel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetFoldLevel(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetFoldLevel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6363,7 +6160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLastChild(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLastChild(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_GetLastChild(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6392,7 +6189,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFoldParent(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetFoldParent(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetFoldParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6421,7 +6218,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ShowLines(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ShowLines(_arg0,_arg1,_arg2); + wxStyledTextCtrl_ShowLines(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6451,7 +6248,7 @@ static PyObject *_wrap_wxStyledTextCtrl_HideLines(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_HideLines(_arg0,_arg1,_arg2); + wxStyledTextCtrl_HideLines(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6481,7 +6278,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineVisible(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetLineVisible(_arg0,_arg1); + _result = (bool )wxStyledTextCtrl_GetLineVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6512,7 +6309,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetFoldExpanded(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetFoldExpanded(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetFoldExpanded(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6542,7 +6339,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFoldExpanded(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetFoldExpanded(_arg0,_arg1); + _result = (bool )wxStyledTextCtrl_GetFoldExpanded(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6570,7 +6367,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ToggleFold(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ToggleFold(_arg0,_arg1); + wxStyledTextCtrl_ToggleFold(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6599,7 +6396,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EnsureVisible(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EnsureVisible(_arg0,_arg1); + wxStyledTextCtrl_EnsureVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6628,7 +6425,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetFoldFlags(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetFoldFlags(_arg0,_arg1); + wxStyledTextCtrl_SetFoldFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6657,7 +6454,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EnsureVisibleEnforcePolicy(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EnsureVisibleEnforcePolicy(_arg0,_arg1); + wxStyledTextCtrl_EnsureVisibleEnforcePolicy(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6688,7 +6485,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTabIndents(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTabIndents(_arg0,_arg1); + wxStyledTextCtrl_SetTabIndents(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6717,7 +6514,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTabIndents(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetTabIndents(_arg0); + _result = (bool )wxStyledTextCtrl_GetTabIndents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6747,7 +6544,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetBackSpaceUnIndents(PyObject *self, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetBackSpaceUnIndents(_arg0,_arg1); + wxStyledTextCtrl_SetBackSpaceUnIndents(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6776,7 +6573,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetBackSpaceUnIndents(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetBackSpaceUnIndents(_arg0); + _result = (bool )wxStyledTextCtrl_GetBackSpaceUnIndents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6804,7 +6601,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMouseDwellTime(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMouseDwellTime(_arg0,_arg1); + wxStyledTextCtrl_SetMouseDwellTime(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6833,7 +6630,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMouseDwellTime(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMouseDwellTime(_arg0); + _result = (int )wxStyledTextCtrl_GetMouseDwellTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6860,7 +6657,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MoveCaretInsideView(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MoveCaretInsideView(_arg0); + wxStyledTextCtrl_MoveCaretInsideView(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6890,7 +6687,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LineLength(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_LineLength(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_LineLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6919,7 +6716,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BraceHighlight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_BraceHighlight(_arg0,_arg1,_arg2); + wxStyledTextCtrl_BraceHighlight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6948,7 +6745,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BraceBadLight(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_BraceBadLight(_arg0,_arg1); + wxStyledTextCtrl_BraceBadLight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6978,7 +6775,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BraceMatch(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_BraceMatch(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_BraceMatch(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7006,7 +6803,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetViewEOL(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetViewEOL(_arg0); + _result = (bool )wxStyledTextCtrl_GetViewEOL(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7036,7 +6833,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetViewEOL(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetViewEOL(_arg0,_arg1); + wxStyledTextCtrl_SetViewEOL(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7066,7 +6863,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetDocPointer(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (void *)wxStyledTextCtrl_GetDocPointer(_arg0); + _result = (void *)wxStyledTextCtrl_GetDocPointer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7108,7 +6905,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetDocPointer(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetDocPointer(_arg0,_arg1); + wxStyledTextCtrl_SetDocPointer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7137,7 +6934,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetModEventMask(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetModEventMask(_arg0,_arg1); + wxStyledTextCtrl_SetModEventMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7166,7 +6963,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEdgeColumn(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEdgeColumn(_arg0); + _result = (int )wxStyledTextCtrl_GetEdgeColumn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7194,7 +6991,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColumn(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEdgeColumn(_arg0,_arg1); + wxStyledTextCtrl_SetEdgeColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7223,7 +7020,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEdgeMode(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEdgeMode(_arg0); + _result = (int )wxStyledTextCtrl_GetEdgeMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7251,7 +7048,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeMode(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEdgeMode(_arg0,_arg1); + wxStyledTextCtrl_SetEdgeMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7281,7 +7078,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEdgeColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_GetEdgeColour(_arg0)); + _result = new wxColour (wxStyledTextCtrl_GetEdgeColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7317,7 +7114,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEdgeColour(_arg0,*_arg1); + wxStyledTextCtrl_SetEdgeColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7345,7 +7142,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchAnchor(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SearchAnchor(_arg0); + wxStyledTextCtrl_SearchAnchor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7376,26 +7173,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchNext(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_SearchNext(_arg0,_arg1,*_arg2); + _result = (int )wxStyledTextCtrl_SearchNext(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7429,26 +7213,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchPrev(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_SearchPrev(_arg0,_arg1,*_arg2); + _result = (int )wxStyledTextCtrl_SearchPrev(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7481,7 +7252,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretPolicy(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretPolicy(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetCaretPolicy(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7510,7 +7281,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LinesOnScreen(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_LinesOnScreen(_arg0); + _result = (int )wxStyledTextCtrl_LinesOnScreen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7540,7 +7311,7 @@ static PyObject *_wrap_wxStyledTextCtrl_UsePopUp(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_UsePopUp(_arg0,_arg1); + wxStyledTextCtrl_UsePopUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7569,7 +7340,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SelectionIsRectangle(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_SelectionIsRectangle(_arg0); + _result = (bool )wxStyledTextCtrl_SelectionIsRectangle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7597,7 +7368,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetZoom(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetZoom(_arg0,_arg1); + wxStyledTextCtrl_SetZoom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7626,7 +7397,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetZoom(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetZoom(_arg0); + _result = (int )wxStyledTextCtrl_GetZoom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7655,7 +7426,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CreateDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (void *)wxStyledTextCtrl_CreateDocument(_arg0); + _result = (void *)wxStyledTextCtrl_CreateDocument(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7697,7 +7468,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AddRefDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AddRefDocument(_arg0,_arg1); + wxStyledTextCtrl_AddRefDocument(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7734,7 +7505,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ReleaseDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ReleaseDocument(_arg0,_arg1); + wxStyledTextCtrl_ReleaseDocument(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7763,7 +7534,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetModEventMask(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetModEventMask(_arg0); + _result = (int )wxStyledTextCtrl_GetModEventMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7793,7 +7564,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSTCFocus(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSTCFocus(_arg0,_arg1); + wxStyledTextCtrl_SetSTCFocus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7822,7 +7593,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSTCFocus(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetSTCFocus(_arg0); + _result = (bool )wxStyledTextCtrl_GetSTCFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7850,7 +7621,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStatus(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStatus(_arg0,_arg1); + wxStyledTextCtrl_SetStatus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7879,7 +7650,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStatus(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetStatus(_arg0); + _result = (int )wxStyledTextCtrl_GetStatus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7909,7 +7680,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMouseDownCaptures(PyObject *self, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMouseDownCaptures(_arg0,_arg1); + wxStyledTextCtrl_SetMouseDownCaptures(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7938,7 +7709,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMouseDownCaptures(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetMouseDownCaptures(_arg0); + _result = (bool )wxStyledTextCtrl_GetMouseDownCaptures(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7966,7 +7737,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCursor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCursor(_arg0,_arg1); + wxStyledTextCtrl_SetCursor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7995,7 +7766,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCursor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCursor(_arg0); + _result = (int )wxStyledTextCtrl_GetCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8022,7 +7793,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartLeft(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartLeft(_arg0); + wxStyledTextCtrl_WordPartLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8050,7 +7821,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartLeftExtend(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartLeftExtend(_arg0); + wxStyledTextCtrl_WordPartLeftExtend(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8078,7 +7849,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartRight(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartRight(_arg0); + wxStyledTextCtrl_WordPartRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8106,7 +7877,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartRightExtend(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartRightExtend(_arg0); + wxStyledTextCtrl_WordPartRightExtend(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8136,7 +7907,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetVisiblePolicy(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetVisiblePolicy(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetVisiblePolicy(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8164,7 +7935,7 @@ static PyObject *_wrap_wxStyledTextCtrl_DelLineLeft(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_DelLineLeft(_arg0); + wxStyledTextCtrl_DelLineLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8192,7 +7963,7 @@ static PyObject *_wrap_wxStyledTextCtrl_DelLineRight(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_DelLineRight(_arg0); + wxStyledTextCtrl_DelLineRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8220,7 +7991,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StartRecord(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StartRecord(_arg0); + wxStyledTextCtrl_StartRecord(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8248,7 +8019,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StopRecord(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StopRecord(_arg0); + wxStyledTextCtrl_StopRecord(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8277,7 +8048,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLexer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLexer(_arg0,_arg1); + wxStyledTextCtrl_SetLexer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8306,7 +8077,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLexer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLexer(_arg0); + _result = (int )wxStyledTextCtrl_GetLexer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8335,7 +8106,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Colourise(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Colourise(_arg0,_arg1,_arg2); + wxStyledTextCtrl_Colourise(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8366,44 +8137,18 @@ static PyObject *_wrap_wxStyledTextCtrl_SetProperty(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetProperty(_arg0,*_arg1,*_arg2); + wxStyledTextCtrl_SetProperty(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8441,26 +8186,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetKeyWords(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetKeyWords(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_SetKeyWords(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8493,26 +8225,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLexerLanguage(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLexerLanguage(_arg0,*_arg1); + wxStyledTextCtrl_SetLexerLanguage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8545,7 +8264,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurrentLine(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCurrentLine(_arg0); + _result = (int )wxStyledTextCtrl_GetCurrentLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8574,26 +8293,13 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetSpec(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetSpec(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetSpec(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8635,7 +8341,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFont(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetFont(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetFont(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8672,29 +8378,16 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFontAttr(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; _arg5 = (bool ) tempbool5; _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetFontAttr(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6); + wxStyledTextCtrl_StyleSetFontAttr(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8727,7 +8420,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyExecute(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyExecute(_arg0,_arg1); + wxStyledTextCtrl_CmdKeyExecute(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8757,7 +8450,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMargins(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMargins(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8795,7 +8488,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_GetSelection(_arg0,_arg1,_arg2); + wxStyledTextCtrl_GetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8836,7 +8529,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PointFromPosition(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxStyledTextCtrl_PointFromPosition(_arg0,_arg1)); + _result = new wxPoint (wxStyledTextCtrl_PointFromPosition(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8865,7 +8558,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ScrollToLine(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ScrollToLine(_arg0,_arg1); + wxStyledTextCtrl_ScrollToLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8894,7 +8587,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ScrollToColumn(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ScrollToColumn(_arg0,_arg1); + wxStyledTextCtrl_ScrollToColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8926,7 +8619,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SendMsg(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxStyledTextCtrl_SendMsg(_arg0,_arg1,_arg2,_arg3); + _result = (long )wxStyledTextCtrl_SendMsg(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8962,7 +8655,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetVScrollBar(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetVScrollBar(_arg0,_arg1); + wxStyledTextCtrl_SetVScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8999,7 +8692,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetHScrollBar(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetHScrollBar(_arg0,_arg1); + wxStyledTextCtrl_SetHScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9046,7 +8739,7 @@ static PyObject *_wrap_new_wxStyledTextEvent(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStyledTextEvent *)new_wxStyledTextEvent(_arg0,_arg1); + _result = (wxStyledTextEvent *)new_wxStyledTextEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9079,7 +8772,7 @@ static PyObject *_wrap_delete_wxStyledTextEvent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxStyledTextEvent(_arg0); + delete_wxStyledTextEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9108,7 +8801,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetPosition(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetPosition(_arg0,_arg1); + wxStyledTextEvent_SetPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9137,7 +8830,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetKey(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetKey(_arg0,_arg1); + wxStyledTextEvent_SetKey(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9166,7 +8859,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetModifiers(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetModifiers(_arg0,_arg1); + wxStyledTextEvent_SetModifiers(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9195,7 +8888,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetModificationType(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetModificationType(_arg0,_arg1); + wxStyledTextEvent_SetModificationType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9224,7 +8917,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetText(_arg0,_arg1); + wxStyledTextEvent_SetText(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9253,7 +8946,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLength(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLength(_arg0,_arg1); + wxStyledTextEvent_SetLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9282,7 +8975,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLinesAdded(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLinesAdded(_arg0,_arg1); + wxStyledTextEvent_SetLinesAdded(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9311,7 +9004,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLine(_arg0,_arg1); + wxStyledTextEvent_SetLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9340,7 +9033,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetFoldLevelNow(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetFoldLevelNow(_arg0,_arg1); + wxStyledTextEvent_SetFoldLevelNow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9369,7 +9062,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetFoldLevelPrev(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetFoldLevelPrev(_arg0,_arg1); + wxStyledTextEvent_SetFoldLevelPrev(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9398,7 +9091,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetMargin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetMargin(_arg0,_arg1); + wxStyledTextEvent_SetMargin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9427,7 +9120,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetMessage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetMessage(_arg0,_arg1); + wxStyledTextEvent_SetMessage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9456,7 +9149,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetWParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetWParam(_arg0,_arg1); + wxStyledTextEvent_SetWParam(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9485,7 +9178,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLParam(_arg0,_arg1); + wxStyledTextEvent_SetLParam(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9514,7 +9207,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetListType(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetListType(_arg0,_arg1); + wxStyledTextEvent_SetListType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9543,7 +9236,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetX(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetX(_arg0,_arg1); + wxStyledTextEvent_SetX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9572,7 +9265,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetY(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetY(_arg0,_arg1); + wxStyledTextEvent_SetY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9601,26 +9294,13 @@ static PyObject *_wrap_wxStyledTextEvent_SetDragText(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetDragText(_arg0,*_arg1); + wxStyledTextEvent_SetDragText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9655,7 +9335,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetDragAllowMove(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetDragAllowMove(_arg0,_arg1); + wxStyledTextEvent_SetDragAllowMove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9684,7 +9364,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetDragResult(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetDragResult(_arg0,_arg1); + wxStyledTextEvent_SetDragResult(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9713,7 +9393,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetPosition(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetPosition(_arg0); + _result = (int )wxStyledTextEvent_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9741,7 +9421,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetKey(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetKey(_arg0); + _result = (int )wxStyledTextEvent_GetKey(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9769,7 +9449,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetModifiers(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetModifiers(_arg0); + _result = (int )wxStyledTextEvent_GetModifiers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9797,7 +9477,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetModificationType(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetModificationType(_arg0); + _result = (int )wxStyledTextEvent_GetModificationType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9825,12 +9505,16 @@ static PyObject *_wrap_wxStyledTextEvent_GetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextEvent_GetText(_arg0)); + _result = new wxString (wxStyledTextEvent_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9858,7 +9542,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLength(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLength(_arg0); + _result = (int )wxStyledTextEvent_GetLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9886,7 +9570,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLinesAdded(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLinesAdded(_arg0); + _result = (int )wxStyledTextEvent_GetLinesAdded(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9914,7 +9598,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLine(_arg0); + _result = (int )wxStyledTextEvent_GetLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9942,7 +9626,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetFoldLevelNow(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetFoldLevelNow(_arg0); + _result = (int )wxStyledTextEvent_GetFoldLevelNow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9970,7 +9654,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetFoldLevelPrev(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetFoldLevelPrev(_arg0); + _result = (int )wxStyledTextEvent_GetFoldLevelPrev(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9998,7 +9682,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetMargin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetMargin(_arg0); + _result = (int )wxStyledTextEvent_GetMargin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10026,7 +9710,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetMessage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetMessage(_arg0); + _result = (int )wxStyledTextEvent_GetMessage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10054,7 +9738,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetWParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetWParam(_arg0); + _result = (int )wxStyledTextEvent_GetWParam(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10082,7 +9766,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLParam(_arg0); + _result = (int )wxStyledTextEvent_GetLParam(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10110,7 +9794,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetListType(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetListType(_arg0); + _result = (int )wxStyledTextEvent_GetListType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10138,7 +9822,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetX(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetX(_arg0); + _result = (int )wxStyledTextEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10166,7 +9850,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetY(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetY(_arg0); + _result = (int )wxStyledTextEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10194,12 +9878,16 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragText(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextEvent_GetDragText(_arg0)); + _result = new wxString (wxStyledTextEvent_GetDragText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10227,7 +9915,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragAllowMove(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetDragAllowMove(_arg0); + _result = (bool )wxStyledTextEvent_GetDragAllowMove(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10255,7 +9943,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragResult(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxStyledTextEvent_GetDragResult(_arg0); + _result = (wxDragResult )wxStyledTextEvent_GetDragResult(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10283,7 +9971,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetShift(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetShift(_arg0); + _result = (bool )wxStyledTextEvent_GetShift(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10311,7 +9999,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetControl(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetControl(_arg0); + _result = (bool )wxStyledTextEvent_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10339,7 +10027,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetAlt(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetAlt(_arg0); + _result = (bool )wxStyledTextEvent_GetAlt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10368,7 +10056,7 @@ static PyObject *_wrap_wxStyledTextEvent_Clone(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvent *)wxStyledTextEvent_Clone(_arg0); + _result = (wxEvent *)wxStyledTextEvent_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/stc/msw/stc_.cpp b/wxPython/contrib/stc/msw/stc_.cpp index facac9ce89..2f67fd7736 100644 --- a/wxPython/contrib/stc/msw/stc_.cpp +++ b/wxPython/contrib/stc/msw/stc_.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -167,7 +161,7 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -201,26 +195,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AddText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AddText(_arg0,*_arg1); + wxStyledTextCtrl_AddText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -253,26 +234,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AddStyledText(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AddStyledText(_arg0,*_arg1); + wxStyledTextCtrl_AddStyledText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -306,26 +274,13 @@ static PyObject *_wrap_wxStyledTextCtrl_InsertText(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_InsertText(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_InsertText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -357,7 +312,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ClearAll(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ClearAll(_arg0); + wxStyledTextCtrl_ClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -385,7 +340,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ClearDocumentStyle(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ClearDocumentStyle(_arg0); + wxStyledTextCtrl_ClearDocumentStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -414,7 +369,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLength(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLength(_arg0); + _result = (int )wxStyledTextCtrl_GetLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -443,7 +398,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCharAt(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCharAt(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetCharAt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -471,7 +426,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurrentPos(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCurrentPos(_arg0); + _result = (int )wxStyledTextCtrl_GetCurrentPos(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -499,7 +454,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetAnchor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetAnchor(_arg0); + _result = (int )wxStyledTextCtrl_GetAnchor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +483,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyleAt(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetStyleAt(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetStyleAt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -555,7 +510,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Redo(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Redo(_arg0); + wxStyledTextCtrl_Redo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -586,7 +541,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetUndoCollection(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetUndoCollection(_arg0,_arg1); + wxStyledTextCtrl_SetUndoCollection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -614,7 +569,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SelectAll(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SelectAll(_arg0); + wxStyledTextCtrl_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -642,7 +597,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSavePoint(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSavePoint(_arg0); + wxStyledTextCtrl_SetSavePoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -673,12 +628,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyledText(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2)); + _result = new wxString (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -706,7 +665,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CanRedo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CanRedo(_arg0); + _result = (bool )wxStyledTextCtrl_CanRedo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -735,7 +694,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerLineFromHandle(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerLineFromHandle(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_MarkerLineFromHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -763,7 +722,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDeleteHandle(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDeleteHandle(_arg0,_arg1); + wxStyledTextCtrl_MarkerDeleteHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -792,7 +751,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetUndoCollection(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetUndoCollection(_arg0); + _result = (bool )wxStyledTextCtrl_GetUndoCollection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -820,7 +779,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetViewWhiteSpace(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetViewWhiteSpace(_arg0); + _result = (int )wxStyledTextCtrl_GetViewWhiteSpace(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -848,7 +807,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetViewWhiteSpace(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetViewWhiteSpace(_arg0,_arg1); + wxStyledTextCtrl_SetViewWhiteSpace(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -885,7 +844,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PositionFromPoint(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_PositionFromPoint(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_PositionFromPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -915,7 +874,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PositionFromPointClose(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_PositionFromPointClose(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_PositionFromPointClose(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -943,7 +902,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GotoLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_GotoLine(_arg0,_arg1); + wxStyledTextCtrl_GotoLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -972,7 +931,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GotoPos(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_GotoPos(_arg0,_arg1); + wxStyledTextCtrl_GotoPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1001,7 +960,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetAnchor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetAnchor(_arg0,_arg1); + wxStyledTextCtrl_SetAnchor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1035,12 +994,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurLine(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetCurLine(_arg0,_arg1)); + _result = new wxString (wxStyledTextCtrl_GetCurLine(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { PyObject *o; @@ -1073,7 +1036,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEndStyled(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEndStyled(_arg0); + _result = (int )wxStyledTextCtrl_GetEndStyled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1101,7 +1064,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ConvertEOLs(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ConvertEOLs(_arg0,_arg1); + wxStyledTextCtrl_ConvertEOLs(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1130,7 +1093,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEOLMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEOLMode(_arg0); + _result = (int )wxStyledTextCtrl_GetEOLMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1158,7 +1121,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEOLMode(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEOLMode(_arg0,_arg1); + wxStyledTextCtrl_SetEOLMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1188,7 +1151,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StartStyling(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StartStyling(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StartStyling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1218,7 +1181,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStyling(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStyling(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetStyling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1247,7 +1210,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetBufferedDraw(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetBufferedDraw(_arg0); + _result = (bool )wxStyledTextCtrl_GetBufferedDraw(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1277,7 +1240,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetBufferedDraw(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetBufferedDraw(_arg0,_arg1); + wxStyledTextCtrl_SetBufferedDraw(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1306,7 +1269,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTabWidth(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTabWidth(_arg0,_arg1); + wxStyledTextCtrl_SetTabWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1335,7 +1298,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTabWidth(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTabWidth(_arg0); + _result = (int )wxStyledTextCtrl_GetTabWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1363,7 +1326,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCodePage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCodePage(_arg0,_arg1); + wxStyledTextCtrl_SetCodePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1374,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDefine(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDefine(_arg0,_arg1,_arg2,*_arg3,*_arg4); + wxStyledTextCtrl_MarkerDefine(_arg0,_arg1,_arg2,*_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1448,7 +1411,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetForeground(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerSetForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_MarkerSetForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1485,7 +1448,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetBackground(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerSetBackground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_MarkerSetBackground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1515,7 +1478,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerAdd(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerAdd(_arg0,_arg1,_arg2); + wxStyledTextCtrl_MarkerAdd(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1545,7 +1508,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDelete(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDelete(_arg0,_arg1,_arg2); + wxStyledTextCtrl_MarkerDelete(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1574,7 +1537,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDeleteAll(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MarkerDeleteAll(_arg0,_arg1); + wxStyledTextCtrl_MarkerDeleteAll(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1604,7 +1567,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerGet(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerGet(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_MarkerGet(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1634,7 +1597,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerNext(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerNext(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_MarkerNext(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1664,7 +1627,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerPrevious(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_MarkerPrevious(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_MarkerPrevious(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1693,7 +1656,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginType(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginType(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginType(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1723,7 +1686,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginType(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginType(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetMarginType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1752,7 +1715,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginWidth(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginWidth(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1782,7 +1745,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginWidth(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetMarginWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1811,7 +1774,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginMask(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginMask(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginMask(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1841,7 +1804,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginMask(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginMask(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetMarginMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1872,7 +1835,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginSensitive(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginSensitive(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMarginSensitive(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1902,7 +1865,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginSensitive(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetMarginSensitive(_arg0,_arg1); + _result = (bool )wxStyledTextCtrl_GetMarginSensitive(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1929,7 +1892,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleClearAll(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleClearAll(_arg0); + wxStyledTextCtrl_StyleClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1966,7 +1929,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetForeground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2003,7 +1966,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetBackground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetBackground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetBackground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2035,7 +1998,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetBold(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetBold(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetBold(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2067,7 +2030,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetItalic(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetItalic(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetItalic(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2097,7 +2060,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetSize(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2127,26 +2090,13 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFaceName(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetFaceName(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetFaceName(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2182,7 +2132,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetEOLFilled(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetEOLFilled(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetEOLFilled(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2210,7 +2160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleResetDefault(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleResetDefault(_arg0); + wxStyledTextCtrl_StyleResetDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2242,7 +2192,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetUnderline(PyObject *self, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetUnderline(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetUnderline(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2272,7 +2222,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetCase(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetCase(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetCase(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2311,7 +2261,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelForeground(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_SetSelForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2350,7 +2300,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelBackground(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelBackground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_SetSelBackground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2386,7 +2336,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretForeground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretForeground(_arg0,*_arg1); + wxStyledTextCtrl_SetCaretForeground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2417,7 +2367,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyAssign(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyAssign(_arg0,_arg1,_arg2,_arg3); + wxStyledTextCtrl_CmdKeyAssign(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2447,7 +2397,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyClear(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyClear(_arg0,_arg1,_arg2); + wxStyledTextCtrl_CmdKeyClear(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2475,7 +2425,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyClearAll(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyClearAll(_arg0); + wxStyledTextCtrl_CmdKeyClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2505,7 +2455,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStyleBytes(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStyleBytes(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetStyleBytes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2537,7 +2487,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetVisible(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetVisible(_arg0,_arg1,_arg2); + wxStyledTextCtrl_StyleSetVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2566,7 +2516,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretPeriod(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCaretPeriod(_arg0); + _result = (int )wxStyledTextCtrl_GetCaretPeriod(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2594,7 +2544,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretPeriod(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretPeriod(_arg0,_arg1); + wxStyledTextCtrl_SetCaretPeriod(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2623,26 +2573,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetWordChars(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetWordChars(_arg0,*_arg1); + wxStyledTextCtrl_SetWordChars(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2674,7 +2611,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BeginUndoAction(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_BeginUndoAction(_arg0); + wxStyledTextCtrl_BeginUndoAction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2702,7 +2639,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EndUndoAction(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EndUndoAction(_arg0); + wxStyledTextCtrl_EndUndoAction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2732,7 +2669,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetStyle(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_IndicatorSetStyle(_arg0,_arg1,_arg2); + wxStyledTextCtrl_IndicatorSetStyle(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2762,7 +2699,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorGetStyle(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_IndicatorGetStyle(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_IndicatorGetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2798,7 +2735,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetForeground(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_IndicatorSetForeground(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_IndicatorSetForeground(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2829,7 +2766,7 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorGetForeground(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_IndicatorGetForeground(_arg0,_arg1)); + _result = new wxColour (wxStyledTextCtrl_IndicatorGetForeground(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2858,7 +2795,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStyleBits(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStyleBits(_arg0,_arg1); + wxStyledTextCtrl_SetStyleBits(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2887,7 +2824,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyleBits(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetStyleBits(_arg0); + _result = (int )wxStyledTextCtrl_GetStyleBits(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2916,7 +2853,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLineState(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLineState(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetLineState(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2946,7 +2883,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineState(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineState(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2974,7 +2911,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMaxLineState(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMaxLineState(_arg0); + _result = (int )wxStyledTextCtrl_GetMaxLineState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3002,7 +2939,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretLineVisible(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetCaretLineVisible(_arg0); + _result = (bool )wxStyledTextCtrl_GetCaretLineVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3032,7 +2969,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretLineVisible(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretLineVisible(_arg0,_arg1); + wxStyledTextCtrl_SetCaretLineVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3062,7 +2999,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretLineBack(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_GetCaretLineBack(_arg0)); + _result = new wxColour (wxStyledTextCtrl_GetCaretLineBack(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3098,7 +3035,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretLineBack(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretLineBack(_arg0,*_arg1); + wxStyledTextCtrl_SetCaretLineBack(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3128,26 +3065,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompShow(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompShow(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_AutoCompShow(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3179,7 +3103,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompCancel(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompCancel(_arg0); + wxStyledTextCtrl_AutoCompCancel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3208,7 +3132,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompActive(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompActive(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3236,7 +3160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompPosStart(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_AutoCompPosStart(_arg0); + _result = (int )wxStyledTextCtrl_AutoCompPosStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3263,7 +3187,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompComplete(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompComplete(_arg0); + wxStyledTextCtrl_AutoCompComplete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3292,26 +3216,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompStops(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompStops(_arg0,*_arg1); + wxStyledTextCtrl_AutoCompStops(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3344,7 +3255,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetSeparator(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetSeparator(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetSeparator(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3373,7 +3284,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetSeparator(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_AutoCompGetSeparator(_arg0); + _result = (int )wxStyledTextCtrl_AutoCompGetSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3401,26 +3312,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSelect(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSelect(_arg0,*_arg1); + wxStyledTextCtrl_AutoCompSelect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3455,7 +3353,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetCancelAtStart(PyObject *self, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetCancelAtStart(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetCancelAtStart(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3484,7 +3382,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetCancelAtStart(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetCancelAtStart(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetCancelAtStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3512,26 +3410,13 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetFillUps(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetFillUps(_arg0,*_arg1); + wxStyledTextCtrl_AutoCompSetFillUps(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3566,7 +3451,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetChooseSingle(PyObject *self, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetChooseSingle(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetChooseSingle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3595,7 +3480,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetChooseSingle(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetChooseSingle(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetChooseSingle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3625,7 +3510,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetIgnoreCase(PyObject *self, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetIgnoreCase(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetIgnoreCase(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3654,7 +3539,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetIgnoreCase(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetIgnoreCase(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetIgnoreCase(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3683,26 +3568,13 @@ static PyObject *_wrap_wxStyledTextCtrl_UserListShow(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_UserListShow(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_UserListShow(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3737,7 +3609,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetAutoHide(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AutoCompSetAutoHide(_arg0,_arg1); + wxStyledTextCtrl_AutoCompSetAutoHide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3766,7 +3638,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetAutoHide(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_AutoCompGetAutoHide(_arg0); + _result = (bool )wxStyledTextCtrl_AutoCompGetAutoHide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3794,7 +3666,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetIndent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetIndent(_arg0,_arg1); + wxStyledTextCtrl_SetIndent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3823,7 +3695,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetIndent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetIndent(_arg0); + _result = (int )wxStyledTextCtrl_GetIndent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3853,7 +3725,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetUseTabs(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetUseTabs(_arg0,_arg1); + wxStyledTextCtrl_SetUseTabs(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3882,7 +3754,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetUseTabs(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetUseTabs(_arg0); + _result = (bool )wxStyledTextCtrl_GetUseTabs(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3911,7 +3783,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLineIndentation(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLineIndentation(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetLineIndentation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3941,7 +3813,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineIndentation(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineIndentation(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineIndentation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3970,7 +3842,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineIndentPosition(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineIndentPosition(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineIndentPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3999,7 +3871,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetColumn(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetColumn(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4029,7 +3901,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetUseHorizontalScrollBar(PyObject *self _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetUseHorizontalScrollBar(_arg0,_arg1); + wxStyledTextCtrl_SetUseHorizontalScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4058,7 +3930,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetUseHorizontalScrollBar(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetUseHorizontalScrollBar(_arg0); + _result = (bool )wxStyledTextCtrl_GetUseHorizontalScrollBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4088,7 +3960,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetIndentationGuides(PyObject *self, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetIndentationGuides(_arg0,_arg1); + wxStyledTextCtrl_SetIndentationGuides(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4117,7 +3989,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetIndentationGuides(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetIndentationGuides(_arg0); + _result = (bool )wxStyledTextCtrl_GetIndentationGuides(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4145,7 +4017,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetHighlightGuide(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetHighlightGuide(_arg0,_arg1); + wxStyledTextCtrl_SetHighlightGuide(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4174,7 +4046,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetHighlightGuide(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetHighlightGuide(_arg0); + _result = (int )wxStyledTextCtrl_GetHighlightGuide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4203,7 +4075,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineEndPosition(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineEndPosition(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetLineEndPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4231,7 +4103,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCodePage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCodePage(_arg0); + _result = (int )wxStyledTextCtrl_GetCodePage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4260,7 +4132,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretForeground(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_GetCaretForeground(_arg0)); + _result = new wxColour (wxStyledTextCtrl_GetCaretForeground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4289,7 +4161,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetReadOnly(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetReadOnly(_arg0); + _result = (bool )wxStyledTextCtrl_GetReadOnly(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4317,7 +4189,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCurrentPos(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCurrentPos(_arg0,_arg1); + wxStyledTextCtrl_SetCurrentPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4346,7 +4218,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionStart(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelectionStart(_arg0,_arg1); + wxStyledTextCtrl_SetSelectionStart(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4375,7 +4247,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectionStart(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetSelectionStart(_arg0); + _result = (int )wxStyledTextCtrl_GetSelectionStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4403,7 +4275,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelectionEnd(_arg0,_arg1); + wxStyledTextCtrl_SetSelectionEnd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4432,7 +4304,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectionEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetSelectionEnd(_arg0); + _result = (int )wxStyledTextCtrl_GetSelectionEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4460,7 +4332,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetPrintMagnification(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetPrintMagnification(_arg0,_arg1); + wxStyledTextCtrl_SetPrintMagnification(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4489,7 +4361,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetPrintMagnification(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetPrintMagnification(_arg0); + _result = (int )wxStyledTextCtrl_GetPrintMagnification(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4517,7 +4389,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetPrintColourMode(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetPrintColourMode(_arg0,_arg1); + wxStyledTextCtrl_SetPrintColourMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4546,7 +4418,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetPrintColourMode(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetPrintColourMode(_arg0); + _result = (int )wxStyledTextCtrl_GetPrintColourMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4581,28 +4453,15 @@ static PyObject *_wrap_wxStyledTextCtrl_FindText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_FindText(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + _result = (int )wxStyledTextCtrl_FindText(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4673,7 +4532,7 @@ static PyObject *_wrap_wxStyledTextCtrl_FormatRange(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_FormatRange(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7); + _result = (int )wxStyledTextCtrl_FormatRange(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4701,7 +4560,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFirstVisibleLine(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetFirstVisibleLine(_arg0); + _result = (int )wxStyledTextCtrl_GetFirstVisibleLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4730,12 +4589,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetLine(_arg0,_arg1)); + _result = new wxString (wxStyledTextCtrl_GetLine(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4763,7 +4626,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineCount(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLineCount(_arg0); + _result = (int )wxStyledTextCtrl_GetLineCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4791,7 +4654,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginLeft(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginLeft(_arg0,_arg1); + wxStyledTextCtrl_SetMarginLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4820,7 +4683,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginLeft(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginLeft(_arg0); + _result = (int )wxStyledTextCtrl_GetMarginLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4848,7 +4711,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMarginRight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMarginRight(_arg0,_arg1); + wxStyledTextCtrl_SetMarginRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4877,7 +4740,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMarginRight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMarginRight(_arg0); + _result = (int )wxStyledTextCtrl_GetMarginRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4905,7 +4768,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetModify(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetModify(_arg0); + _result = (bool )wxStyledTextCtrl_GetModify(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4934,7 +4797,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSelection(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4963,12 +4826,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectedText(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetSelectedText(_arg0)); + _result = new wxString (wxStyledTextCtrl_GetSelectedText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4998,12 +4865,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTextRange(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetTextRange(_arg0,_arg1,_arg2)); + _result = new wxString (wxStyledTextCtrl_GetTextRange(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5033,7 +4904,7 @@ static PyObject *_wrap_wxStyledTextCtrl_HideSelection(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_HideSelection(_arg0,_arg1); + wxStyledTextCtrl_HideSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5063,7 +4934,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LineFromPosition(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_LineFromPosition(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_LineFromPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5092,7 +4963,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PositionFromLine(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_PositionFromLine(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_PositionFromLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5121,7 +4992,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LineScroll(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_LineScroll(_arg0,_arg1,_arg2); + wxStyledTextCtrl_LineScroll(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5149,7 +5020,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EnsureCaretVisible(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EnsureCaretVisible(_arg0); + wxStyledTextCtrl_EnsureCaretVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5178,26 +5049,13 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceSelection(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ReplaceSelection(_arg0,*_arg1); + wxStyledTextCtrl_ReplaceSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5232,7 +5090,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetReadOnly(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetReadOnly(_arg0,_arg1); + wxStyledTextCtrl_SetReadOnly(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5261,7 +5119,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CanPaste(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CanPaste(_arg0); + _result = (bool )wxStyledTextCtrl_CanPaste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5289,7 +5147,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CanUndo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CanUndo(_arg0); + _result = (bool )wxStyledTextCtrl_CanUndo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5316,7 +5174,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EmptyUndoBuffer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EmptyUndoBuffer(_arg0); + wxStyledTextCtrl_EmptyUndoBuffer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5344,7 +5202,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Undo(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Undo(_arg0); + wxStyledTextCtrl_Undo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5372,7 +5230,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Cut(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Cut(_arg0); + wxStyledTextCtrl_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5400,7 +5258,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Copy(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Copy(_arg0); + wxStyledTextCtrl_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5428,7 +5286,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Paste(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Paste(_arg0); + wxStyledTextCtrl_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5456,7 +5314,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Clear(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Clear(_arg0); + wxStyledTextCtrl_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5485,26 +5343,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetText(_arg0,*_arg1); + wxStyledTextCtrl_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5537,12 +5382,16 @@ static PyObject *_wrap_wxStyledTextCtrl_GetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextCtrl_GetText(_arg0)); + _result = new wxString (wxStyledTextCtrl_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5570,7 +5419,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTextLength(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTextLength(_arg0); + _result = (int )wxStyledTextCtrl_GetTextLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5600,7 +5449,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetOvertype(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetOvertype(_arg0,_arg1); + wxStyledTextCtrl_SetOvertype(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5629,7 +5478,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetOvertype(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetOvertype(_arg0); + _result = (bool )wxStyledTextCtrl_GetOvertype(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5657,7 +5506,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretWidth(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretWidth(_arg0,_arg1); + wxStyledTextCtrl_SetCaretWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5686,7 +5535,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCaretWidth(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCaretWidth(_arg0); + _result = (int )wxStyledTextCtrl_GetCaretWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5714,7 +5563,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTargetStart(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTargetStart(_arg0,_arg1); + wxStyledTextCtrl_SetTargetStart(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5743,7 +5592,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTargetStart(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTargetStart(_arg0); + _result = (int )wxStyledTextCtrl_GetTargetStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5771,7 +5620,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTargetEnd(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTargetEnd(_arg0,_arg1); + wxStyledTextCtrl_SetTargetEnd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5800,7 +5649,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTargetEnd(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetTargetEnd(_arg0); + _result = (int )wxStyledTextCtrl_GetTargetEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5829,26 +5678,13 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceTarget(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_ReplaceTarget(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_ReplaceTarget(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5881,26 +5717,13 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceTargetRE(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_ReplaceTargetRE(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_ReplaceTargetRE(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5933,26 +5756,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchInTarget(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_SearchInTarget(_arg0,*_arg1); + _result = (int )wxStyledTextCtrl_SearchInTarget(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5984,7 +5794,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSearchFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSearchFlags(_arg0,_arg1); + wxStyledTextCtrl_SetSearchFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6013,7 +5823,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSearchFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetSearchFlags(_arg0); + _result = (int )wxStyledTextCtrl_GetSearchFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6042,26 +5852,13 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipShow(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipShow(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_CallTipShow(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6093,7 +5890,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipCancel(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipCancel(_arg0); + wxStyledTextCtrl_CallTipCancel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6122,7 +5919,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipActive(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_CallTipActive(_arg0); + _result = (bool )wxStyledTextCtrl_CallTipActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6150,7 +5947,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipPosAtStart(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_CallTipPosAtStart(_arg0); + _result = (int )wxStyledTextCtrl_CallTipPosAtStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6179,7 +5976,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipSetHighlight(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipSetHighlight(_arg0,_arg1,_arg2); + wxStyledTextCtrl_CallTipSetHighlight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6215,7 +6012,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipSetBackground(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CallTipSetBackground(_arg0,*_arg1); + wxStyledTextCtrl_CallTipSetBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6245,7 +6042,7 @@ static PyObject *_wrap_wxStyledTextCtrl_VisibleFromDocLine(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_VisibleFromDocLine(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_VisibleFromDocLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6274,7 +6071,7 @@ static PyObject *_wrap_wxStyledTextCtrl_DocLineFromVisible(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_DocLineFromVisible(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_DocLineFromVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6303,7 +6100,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetFoldLevel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetFoldLevel(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetFoldLevel(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6333,7 +6130,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFoldLevel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetFoldLevel(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetFoldLevel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6363,7 +6160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLastChild(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLastChild(_arg0,_arg1,_arg2); + _result = (int )wxStyledTextCtrl_GetLastChild(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6392,7 +6189,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFoldParent(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetFoldParent(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_GetFoldParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6421,7 +6218,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ShowLines(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ShowLines(_arg0,_arg1,_arg2); + wxStyledTextCtrl_ShowLines(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6451,7 +6248,7 @@ static PyObject *_wrap_wxStyledTextCtrl_HideLines(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_HideLines(_arg0,_arg1,_arg2); + wxStyledTextCtrl_HideLines(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6481,7 +6278,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLineVisible(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetLineVisible(_arg0,_arg1); + _result = (bool )wxStyledTextCtrl_GetLineVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6512,7 +6309,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetFoldExpanded(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetFoldExpanded(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetFoldExpanded(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6542,7 +6339,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetFoldExpanded(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetFoldExpanded(_arg0,_arg1); + _result = (bool )wxStyledTextCtrl_GetFoldExpanded(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6570,7 +6367,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ToggleFold(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ToggleFold(_arg0,_arg1); + wxStyledTextCtrl_ToggleFold(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6599,7 +6396,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EnsureVisible(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EnsureVisible(_arg0,_arg1); + wxStyledTextCtrl_EnsureVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6628,7 +6425,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetFoldFlags(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetFoldFlags(_arg0,_arg1); + wxStyledTextCtrl_SetFoldFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6657,7 +6454,7 @@ static PyObject *_wrap_wxStyledTextCtrl_EnsureVisibleEnforcePolicy(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_EnsureVisibleEnforcePolicy(_arg0,_arg1); + wxStyledTextCtrl_EnsureVisibleEnforcePolicy(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6688,7 +6485,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetTabIndents(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetTabIndents(_arg0,_arg1); + wxStyledTextCtrl_SetTabIndents(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6717,7 +6514,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTabIndents(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetTabIndents(_arg0); + _result = (bool )wxStyledTextCtrl_GetTabIndents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6747,7 +6544,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetBackSpaceUnIndents(PyObject *self, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetBackSpaceUnIndents(_arg0,_arg1); + wxStyledTextCtrl_SetBackSpaceUnIndents(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6776,7 +6573,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetBackSpaceUnIndents(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetBackSpaceUnIndents(_arg0); + _result = (bool )wxStyledTextCtrl_GetBackSpaceUnIndents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6804,7 +6601,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMouseDwellTime(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMouseDwellTime(_arg0,_arg1); + wxStyledTextCtrl_SetMouseDwellTime(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6833,7 +6630,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMouseDwellTime(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetMouseDwellTime(_arg0); + _result = (int )wxStyledTextCtrl_GetMouseDwellTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6860,7 +6657,7 @@ static PyObject *_wrap_wxStyledTextCtrl_MoveCaretInsideView(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_MoveCaretInsideView(_arg0); + wxStyledTextCtrl_MoveCaretInsideView(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6890,7 +6687,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LineLength(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_LineLength(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_LineLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6919,7 +6716,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BraceHighlight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_BraceHighlight(_arg0,_arg1,_arg2); + wxStyledTextCtrl_BraceHighlight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6948,7 +6745,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BraceBadLight(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_BraceBadLight(_arg0,_arg1); + wxStyledTextCtrl_BraceBadLight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6978,7 +6775,7 @@ static PyObject *_wrap_wxStyledTextCtrl_BraceMatch(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_BraceMatch(_arg0,_arg1); + _result = (int )wxStyledTextCtrl_BraceMatch(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7006,7 +6803,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetViewEOL(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetViewEOL(_arg0); + _result = (bool )wxStyledTextCtrl_GetViewEOL(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7036,7 +6833,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetViewEOL(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetViewEOL(_arg0,_arg1); + wxStyledTextCtrl_SetViewEOL(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7066,7 +6863,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetDocPointer(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (void *)wxStyledTextCtrl_GetDocPointer(_arg0); + _result = (void *)wxStyledTextCtrl_GetDocPointer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7108,7 +6905,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetDocPointer(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetDocPointer(_arg0,_arg1); + wxStyledTextCtrl_SetDocPointer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7137,7 +6934,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetModEventMask(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetModEventMask(_arg0,_arg1); + wxStyledTextCtrl_SetModEventMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7166,7 +6963,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEdgeColumn(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEdgeColumn(_arg0); + _result = (int )wxStyledTextCtrl_GetEdgeColumn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7194,7 +6991,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColumn(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEdgeColumn(_arg0,_arg1); + wxStyledTextCtrl_SetEdgeColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7223,7 +7020,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEdgeMode(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetEdgeMode(_arg0); + _result = (int )wxStyledTextCtrl_GetEdgeMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7251,7 +7048,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeMode(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEdgeMode(_arg0,_arg1); + wxStyledTextCtrl_SetEdgeMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7281,7 +7078,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetEdgeColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxStyledTextCtrl_GetEdgeColour(_arg0)); + _result = new wxColour (wxStyledTextCtrl_GetEdgeColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7317,7 +7114,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetEdgeColour(_arg0,*_arg1); + wxStyledTextCtrl_SetEdgeColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7345,7 +7142,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchAnchor(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SearchAnchor(_arg0); + wxStyledTextCtrl_SearchAnchor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7376,26 +7173,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchNext(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_SearchNext(_arg0,_arg1,*_arg2); + _result = (int )wxStyledTextCtrl_SearchNext(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7429,26 +7213,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchPrev(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_SearchPrev(_arg0,_arg1,*_arg2); + _result = (int )wxStyledTextCtrl_SearchPrev(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7481,7 +7252,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretPolicy(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCaretPolicy(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetCaretPolicy(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7510,7 +7281,7 @@ static PyObject *_wrap_wxStyledTextCtrl_LinesOnScreen(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_LinesOnScreen(_arg0); + _result = (int )wxStyledTextCtrl_LinesOnScreen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7540,7 +7311,7 @@ static PyObject *_wrap_wxStyledTextCtrl_UsePopUp(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_UsePopUp(_arg0,_arg1); + wxStyledTextCtrl_UsePopUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7569,7 +7340,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SelectionIsRectangle(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_SelectionIsRectangle(_arg0); + _result = (bool )wxStyledTextCtrl_SelectionIsRectangle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7597,7 +7368,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetZoom(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetZoom(_arg0,_arg1); + wxStyledTextCtrl_SetZoom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7626,7 +7397,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetZoom(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetZoom(_arg0); + _result = (int )wxStyledTextCtrl_GetZoom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7655,7 +7426,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CreateDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (void *)wxStyledTextCtrl_CreateDocument(_arg0); + _result = (void *)wxStyledTextCtrl_CreateDocument(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7697,7 +7468,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AddRefDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_AddRefDocument(_arg0,_arg1); + wxStyledTextCtrl_AddRefDocument(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7734,7 +7505,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ReleaseDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ReleaseDocument(_arg0,_arg1); + wxStyledTextCtrl_ReleaseDocument(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7763,7 +7534,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetModEventMask(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetModEventMask(_arg0); + _result = (int )wxStyledTextCtrl_GetModEventMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7793,7 +7564,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSTCFocus(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetSTCFocus(_arg0,_arg1); + wxStyledTextCtrl_SetSTCFocus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7822,7 +7593,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSTCFocus(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetSTCFocus(_arg0); + _result = (bool )wxStyledTextCtrl_GetSTCFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7850,7 +7621,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetStatus(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetStatus(_arg0,_arg1); + wxStyledTextCtrl_SetStatus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7879,7 +7650,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStatus(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetStatus(_arg0); + _result = (int )wxStyledTextCtrl_GetStatus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7909,7 +7680,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMouseDownCaptures(PyObject *self, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMouseDownCaptures(_arg0,_arg1); + wxStyledTextCtrl_SetMouseDownCaptures(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7938,7 +7709,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetMouseDownCaptures(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextCtrl_GetMouseDownCaptures(_arg0); + _result = (bool )wxStyledTextCtrl_GetMouseDownCaptures(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7966,7 +7737,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCursor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetCursor(_arg0,_arg1); + wxStyledTextCtrl_SetCursor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7995,7 +7766,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCursor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCursor(_arg0); + _result = (int )wxStyledTextCtrl_GetCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8022,7 +7793,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartLeft(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartLeft(_arg0); + wxStyledTextCtrl_WordPartLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8050,7 +7821,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartLeftExtend(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartLeftExtend(_arg0); + wxStyledTextCtrl_WordPartLeftExtend(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8078,7 +7849,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartRight(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartRight(_arg0); + wxStyledTextCtrl_WordPartRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8106,7 +7877,7 @@ static PyObject *_wrap_wxStyledTextCtrl_WordPartRightExtend(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_WordPartRightExtend(_arg0); + wxStyledTextCtrl_WordPartRightExtend(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8136,7 +7907,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetVisiblePolicy(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetVisiblePolicy(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetVisiblePolicy(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8164,7 +7935,7 @@ static PyObject *_wrap_wxStyledTextCtrl_DelLineLeft(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_DelLineLeft(_arg0); + wxStyledTextCtrl_DelLineLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8192,7 +7963,7 @@ static PyObject *_wrap_wxStyledTextCtrl_DelLineRight(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_DelLineRight(_arg0); + wxStyledTextCtrl_DelLineRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8220,7 +7991,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StartRecord(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StartRecord(_arg0); + wxStyledTextCtrl_StartRecord(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8248,7 +8019,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StopRecord(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StopRecord(_arg0); + wxStyledTextCtrl_StopRecord(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8277,7 +8048,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLexer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLexer(_arg0,_arg1); + wxStyledTextCtrl_SetLexer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8306,7 +8077,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLexer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetLexer(_arg0); + _result = (int )wxStyledTextCtrl_GetLexer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8335,7 +8106,7 @@ static PyObject *_wrap_wxStyledTextCtrl_Colourise(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_Colourise(_arg0,_arg1,_arg2); + wxStyledTextCtrl_Colourise(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8366,44 +8137,18 @@ static PyObject *_wrap_wxStyledTextCtrl_SetProperty(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetProperty(_arg0,*_arg1,*_arg2); + wxStyledTextCtrl_SetProperty(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8441,26 +8186,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetKeyWords(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetKeyWords(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_SetKeyWords(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8493,26 +8225,13 @@ static PyObject *_wrap_wxStyledTextCtrl_SetLexerLanguage(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetLexerLanguage(_arg0,*_arg1); + wxStyledTextCtrl_SetLexerLanguage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8545,7 +8264,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurrentLine(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextCtrl_GetCurrentLine(_arg0); + _result = (int )wxStyledTextCtrl_GetCurrentLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8574,26 +8293,13 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetSpec(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetSpec(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetSpec(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8635,7 +8341,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFont(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetFont(_arg0,_arg1,*_arg2); + wxStyledTextCtrl_StyleSetFont(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8672,29 +8378,16 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFontAttr(PyObject *self, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; _arg5 = (bool ) tempbool5; _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_StyleSetFontAttr(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6); + wxStyledTextCtrl_StyleSetFontAttr(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8727,7 +8420,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CmdKeyExecute(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_CmdKeyExecute(_arg0,_arg1); + wxStyledTextCtrl_CmdKeyExecute(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8757,7 +8450,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetMargins(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetMargins(_arg0,_arg1,_arg2); + wxStyledTextCtrl_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8795,7 +8488,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_GetSelection(_arg0,_arg1,_arg2); + wxStyledTextCtrl_GetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8836,7 +8529,7 @@ static PyObject *_wrap_wxStyledTextCtrl_PointFromPosition(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxStyledTextCtrl_PointFromPosition(_arg0,_arg1)); + _result = new wxPoint (wxStyledTextCtrl_PointFromPosition(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8865,7 +8558,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ScrollToLine(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ScrollToLine(_arg0,_arg1); + wxStyledTextCtrl_ScrollToLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8894,7 +8587,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ScrollToColumn(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_ScrollToColumn(_arg0,_arg1); + wxStyledTextCtrl_ScrollToColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8926,7 +8619,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SendMsg(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxStyledTextCtrl_SendMsg(_arg0,_arg1,_arg2,_arg3); + _result = (long )wxStyledTextCtrl_SendMsg(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8962,7 +8655,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetVScrollBar(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetVScrollBar(_arg0,_arg1); + wxStyledTextCtrl_SetVScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8999,7 +8692,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetHScrollBar(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextCtrl_SetHScrollBar(_arg0,_arg1); + wxStyledTextCtrl_SetHScrollBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9046,7 +8739,7 @@ static PyObject *_wrap_new_wxStyledTextEvent(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStyledTextEvent *)new_wxStyledTextEvent(_arg0,_arg1); + _result = (wxStyledTextEvent *)new_wxStyledTextEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9079,7 +8772,7 @@ static PyObject *_wrap_delete_wxStyledTextEvent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxStyledTextEvent(_arg0); + delete_wxStyledTextEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9108,7 +8801,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetPosition(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetPosition(_arg0,_arg1); + wxStyledTextEvent_SetPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9137,7 +8830,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetKey(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetKey(_arg0,_arg1); + wxStyledTextEvent_SetKey(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9166,7 +8859,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetModifiers(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetModifiers(_arg0,_arg1); + wxStyledTextEvent_SetModifiers(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9195,7 +8888,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetModificationType(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetModificationType(_arg0,_arg1); + wxStyledTextEvent_SetModificationType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9224,7 +8917,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetText(_arg0,_arg1); + wxStyledTextEvent_SetText(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9253,7 +8946,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLength(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLength(_arg0,_arg1); + wxStyledTextEvent_SetLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9282,7 +8975,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLinesAdded(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLinesAdded(_arg0,_arg1); + wxStyledTextEvent_SetLinesAdded(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9311,7 +9004,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLine(_arg0,_arg1); + wxStyledTextEvent_SetLine(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9340,7 +9033,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetFoldLevelNow(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetFoldLevelNow(_arg0,_arg1); + wxStyledTextEvent_SetFoldLevelNow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9369,7 +9062,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetFoldLevelPrev(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetFoldLevelPrev(_arg0,_arg1); + wxStyledTextEvent_SetFoldLevelPrev(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9398,7 +9091,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetMargin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetMargin(_arg0,_arg1); + wxStyledTextEvent_SetMargin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9427,7 +9120,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetMessage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetMessage(_arg0,_arg1); + wxStyledTextEvent_SetMessage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9456,7 +9149,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetWParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetWParam(_arg0,_arg1); + wxStyledTextEvent_SetWParam(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9485,7 +9178,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetLParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetLParam(_arg0,_arg1); + wxStyledTextEvent_SetLParam(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9514,7 +9207,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetListType(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetListType(_arg0,_arg1); + wxStyledTextEvent_SetListType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9543,7 +9236,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetX(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetX(_arg0,_arg1); + wxStyledTextEvent_SetX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9572,7 +9265,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetY(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetY(_arg0,_arg1); + wxStyledTextEvent_SetY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9601,26 +9294,13 @@ static PyObject *_wrap_wxStyledTextEvent_SetDragText(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetDragText(_arg0,*_arg1); + wxStyledTextEvent_SetDragText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9655,7 +9335,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetDragAllowMove(PyObject *self, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetDragAllowMove(_arg0,_arg1); + wxStyledTextEvent_SetDragAllowMove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9684,7 +9364,7 @@ static PyObject *_wrap_wxStyledTextEvent_SetDragResult(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStyledTextEvent_SetDragResult(_arg0,_arg1); + wxStyledTextEvent_SetDragResult(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9713,7 +9393,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetPosition(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetPosition(_arg0); + _result = (int )wxStyledTextEvent_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9741,7 +9421,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetKey(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetKey(_arg0); + _result = (int )wxStyledTextEvent_GetKey(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9769,7 +9449,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetModifiers(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetModifiers(_arg0); + _result = (int )wxStyledTextEvent_GetModifiers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9797,7 +9477,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetModificationType(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetModificationType(_arg0); + _result = (int )wxStyledTextEvent_GetModificationType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9825,12 +9505,16 @@ static PyObject *_wrap_wxStyledTextEvent_GetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextEvent_GetText(_arg0)); + _result = new wxString (wxStyledTextEvent_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9858,7 +9542,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLength(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLength(_arg0); + _result = (int )wxStyledTextEvent_GetLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9886,7 +9570,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLinesAdded(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLinesAdded(_arg0); + _result = (int )wxStyledTextEvent_GetLinesAdded(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9914,7 +9598,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLine(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLine(_arg0); + _result = (int )wxStyledTextEvent_GetLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9942,7 +9626,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetFoldLevelNow(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetFoldLevelNow(_arg0); + _result = (int )wxStyledTextEvent_GetFoldLevelNow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9970,7 +9654,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetFoldLevelPrev(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetFoldLevelPrev(_arg0); + _result = (int )wxStyledTextEvent_GetFoldLevelPrev(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9998,7 +9682,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetMargin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetMargin(_arg0); + _result = (int )wxStyledTextEvent_GetMargin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10026,7 +9710,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetMessage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetMessage(_arg0); + _result = (int )wxStyledTextEvent_GetMessage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10054,7 +9738,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetWParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetWParam(_arg0); + _result = (int )wxStyledTextEvent_GetWParam(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10082,7 +9766,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetLParam(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetLParam(_arg0); + _result = (int )wxStyledTextEvent_GetLParam(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10110,7 +9794,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetListType(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetListType(_arg0); + _result = (int )wxStyledTextEvent_GetListType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10138,7 +9822,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetX(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetX(_arg0); + _result = (int )wxStyledTextEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10166,7 +9850,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetY(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStyledTextEvent_GetY(_arg0); + _result = (int )wxStyledTextEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10194,12 +9878,16 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragText(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStyledTextEvent_GetDragText(_arg0)); + _result = new wxString (wxStyledTextEvent_GetDragText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10227,7 +9915,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragAllowMove(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetDragAllowMove(_arg0); + _result = (bool )wxStyledTextEvent_GetDragAllowMove(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10255,7 +9943,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragResult(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxStyledTextEvent_GetDragResult(_arg0); + _result = (wxDragResult )wxStyledTextEvent_GetDragResult(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10283,7 +9971,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetShift(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetShift(_arg0); + _result = (bool )wxStyledTextEvent_GetShift(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10311,7 +9999,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetControl(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetControl(_arg0); + _result = (bool )wxStyledTextEvent_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10339,7 +10027,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetAlt(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStyledTextEvent_GetAlt(_arg0); + _result = (bool )wxStyledTextEvent_GetAlt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10368,7 +10056,7 @@ static PyObject *_wrap_wxStyledTextEvent_Clone(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvent *)wxStyledTextEvent_Clone(_arg0); + _result = (wxEvent *)wxStyledTextEvent_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/contrib/xrc/xrc.cpp b/wxPython/contrib/xrc/xrc.cpp index 24d53d08a2..3dca1cc560 100644 --- a/wxPython/contrib/xrc/xrc.cpp +++ b/wxPython/contrib/xrc/xrc.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -114,7 +108,7 @@ static PyObject *_wrap_new_wxXmlResourceEmpty(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxXmlResource *)new_wxXmlResourceEmpty(_arg0); + _result = (wxXmlResource *)new_wxXmlResourceEmpty(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -147,26 +141,13 @@ static PyObject *_wrap_new_wxXmlResource(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxXmlResource",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxXmlResource *)new_wxXmlResource(_arg0,_arg1); + _result = (wxXmlResource *)new_wxXmlResource(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -203,7 +184,7 @@ static PyObject *_wrap_delete_wxXmlResource(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxXmlResource(_arg0); + delete_wxXmlResource(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -233,26 +214,13 @@ static PyObject *_wrap_wxXmlResource_Load(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxXmlResource_Load(_arg0,*_arg1); + _result = (bool )wxXmlResource_Load(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -283,7 +251,7 @@ static PyObject *_wrap_wxXmlResource_InitAllHandlers(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxXmlResource_InitAllHandlers(_arg0); + wxXmlResource_InitAllHandlers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -320,7 +288,7 @@ static PyObject *_wrap_wxXmlResource_AddHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxXmlResource_AddHandler(_arg0,_arg1); + wxXmlResource_AddHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -348,7 +316,7 @@ static PyObject *_wrap_wxXmlResource_ClearHandlers(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxXmlResource_ClearHandlers(_arg0); + wxXmlResource_ClearHandlers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -378,26 +346,13 @@ static PyObject *_wrap_wxXmlResource_LoadMenu(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxXmlResource_LoadMenu(_arg0,*_arg1); + _result = (wxMenu *)wxXmlResource_LoadMenu(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -430,26 +385,13 @@ static PyObject *_wrap_wxXmlResource_LoadMenuBar(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)wxXmlResource_LoadMenuBar(_arg0,*_arg1); + _result = (wxMenuBar *)wxXmlResource_LoadMenuBar(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -491,26 +433,13 @@ static PyObject *_wrap_wxXmlResource_LoadToolBar(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)wxXmlResource_LoadToolBar(_arg0,_arg1,*_arg2); + _result = (wxToolBar *)wxXmlResource_LoadToolBar(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -553,26 +482,13 @@ static PyObject *_wrap_wxXmlResource_LoadDialog(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDialog *)wxXmlResource_LoadDialog(_arg0,_arg1,*_arg2); + _result = (wxDialog *)wxXmlResource_LoadDialog(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -629,26 +545,13 @@ static PyObject *_wrap_wxXmlResource_LoadOnDialog(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxXmlResource_LoadOnDialog(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxXmlResource_LoadOnDialog(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -691,26 +594,13 @@ static PyObject *_wrap_wxXmlResource_LoadPanel(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPanel *)wxXmlResource_LoadPanel(_arg0,_arg1,*_arg2); + _result = (wxPanel *)wxXmlResource_LoadPanel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -767,26 +657,13 @@ static PyObject *_wrap_wxXmlResource_LoadOnPanel(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxXmlResource_LoadOnPanel(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxXmlResource_LoadOnPanel(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -837,26 +714,13 @@ static PyObject *_wrap_wxXmlResource_LoadFrame(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxXmlResource_LoadFrame(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxXmlResource_LoadFrame(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -890,26 +754,13 @@ static PyObject *_wrap_wxXmlResource_LoadBitmap(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxXmlResource_LoadBitmap(_arg0,*_arg1)); + _result = new wxBitmap (wxXmlResource_LoadBitmap(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -944,26 +795,13 @@ static PyObject *_wrap_wxXmlResource_LoadIcon(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxXmlResource_LoadIcon(_arg0,*_arg1)); + _result = new wxIcon (wxXmlResource_LoadIcon(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1001,22 +839,9 @@ static PyObject *_wrap_wxXmlResource_AttachUnknownControl(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -1034,7 +859,7 @@ static PyObject *_wrap_wxXmlResource_AttachUnknownControl(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxXmlResource_AttachUnknownControl(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxXmlResource_AttachUnknownControl(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1057,7 +882,7 @@ static PyObject *_wrap_wxXmlResource_GetXRCID(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxXmlResource::GetXRCID(_arg0); + _result = (int )wxXmlResource::GetXRCID(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1085,7 +910,7 @@ static PyObject *_wrap_wxXmlResource_GetVersion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxXmlResource_GetVersion(_arg0); + _result = (long )wxXmlResource_GetVersion(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1117,7 +942,7 @@ static PyObject *_wrap_wxXmlResource_CompareVersion(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxXmlResource_CompareVersion(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (int )wxXmlResource_CompareVersion(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1136,7 +961,7 @@ static PyObject *_wrap_wxXmlResource_Get(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxXmlResource *)wxXmlResource::Get(); + _result = (wxXmlResource *)wxXmlResource::Get(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1170,7 +995,7 @@ static PyObject *_wrap_wxXmlResource_Set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxXmlResource *)wxXmlResource::Set(_arg0); + _result = (wxXmlResource *)wxXmlResource::Set(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/setup.py b/wxPython/setup.py index 4d4f531992..59f662d0e9 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -47,6 +47,9 @@ GL_ONLY = 0 # Only used when making the -gl RPM. See the "b" script USE_SWIG = 0 # Should we actually execute SWIG, or just use the # files already in the distribution? +USE_UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG. + # At the moment only tested for 'CORE_ONLY = 1' + IN_CVS_TREE = 0 # Set to true if building in a full wxWindows CVS # tree, otherwise will assume all needed files are # available in the wxPython source distribution @@ -84,11 +87,14 @@ def opj(*args): def libFlag(): if FINAL: - return '' + rv = '' elif HYBRID: - return 'h' + rv = 'h' else: - return 'd' + rv = 'd' + if USE_UNICODE: + rv = 'u' + rv + return rv #---------------------------------------------------------------------- @@ -117,7 +123,7 @@ if bcpp_compiling: for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC', 'BUILD_GIZMOS', 'BUILD_DLLWIDGET', - 'CORE_ONLY', 'USE_SWIG', 'IN_CVS_TREE', + 'CORE_ONLY', 'USE_SWIG', 'IN_CVS_TREE', 'USE_UNICODE', 'FINAL', 'HYBRID', ]: for x in range(len(sys.argv)): if string.find(sys.argv[x], flag) == 0: @@ -137,6 +143,10 @@ for option in ['WX_CONFIG', 'WXDLLVER', ]: sys.argv = filter(None, sys.argv) + +#---------------------------------------------------------------------- +# sanity checks + if CORE_ONLY: BUILD_GLCANVAS = 0 BUILD_OGL = 0 @@ -146,6 +156,10 @@ if CORE_ONLY: BUILD_DLLWIDGET = 0 +if USE_UNICODE and os.name != 'nt': + print "UNICODE is currently only supported on Win32" + sys.exit() + #---------------------------------------------------------------------- # Setup some platform specific stuff #---------------------------------------------------------------------- @@ -313,6 +327,9 @@ swig_args = ['-c++', '-shadow', '-python', '-keyword', #'-docstring', '-Sbefore', '-I./src', '-D'+WXPLAT, ] +if USE_UNICODE: + swig_args.append('-DwxUSE_UNICODE') + swig_deps = ['src/my_typemaps.i'] diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index a5457180dd..ea59320ca1 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -72,7 +72,7 @@ public: wxDataFormatId GetType() const; wxString GetId() const; - void SetId(const char *format); + void SetId(const wxChar *format); }; %new wxDataFormat* wxCustomDataFormat(const wxString &id); diff --git a/wxPython/src/events.i b/wxPython/src/events.i index b5b27ce5ed..b735d07ae3 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -374,7 +374,11 @@ public: } for (int i=0; ip_wxPyConstructObject(a,b,c)) #define wxPy_ConvertList(a,b) (wxPyCoreAPIPtr->p_wxPy_ConvertList(a,b)) + +#define wxString_in_helper(a) (wxPyCoreAPIPtr->p_wxString_in_helper(a)) #define byte_LIST_helper(a) (wxPyCoreAPIPtr->p_byte_LIST_helper(a)) #define int_LIST_helper(a) (wxPyCoreAPIPtr->p_int_LIST_helper(a)) #define long_LIST_helper(a) (wxPyCoreAPIPtr->p_long_LIST_helper(a)) diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 997c8a10e1..9926f86910 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -131,7 +131,7 @@ } - +// TODO: unicode fix #define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ wxString CBNAME(int a, int b) { \ wxPyBeginBlockThreads(); \ @@ -150,7 +150,7 @@ } - +// TODO: unicode fix #define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ void CBNAME(int a, int b, const wxString& c) { \ wxPyBeginBlockThreads(); \ @@ -159,7 +159,7 @@ wxPyEndBlockThreads(); \ } - +// TODO: unicode fix #define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ wxString CBNAME(int a, int b) { \ bool found; \ @@ -184,7 +184,7 @@ } - +// TODO: unicode fix #define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ bool CBNAME(int a, int b, const wxString& c) { \ bool rval = 0; \ @@ -317,7 +317,7 @@ } - +// TODO: unicode fix #define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ wxString CBNAME(int a) { \ bool found; \ @@ -342,7 +342,7 @@ } - +// TODO: unicode fix #define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ void CBNAME(int a, const wxString& c) { \ bool found; \ @@ -1070,8 +1070,13 @@ public: PyObject* ro; ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); if (ro) { - PyObject* str = PyObject_Str(ro); - rval = PyString_AsString(str); +#if wxUSE_UNICODE + PyObject* str = PyObject_Unicode(ro); + rval = PyUnicode_AS_UNICODE(str); +#else + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); +#endif Py_DECREF(ro); Py_DECREF(str); } @@ -1082,8 +1087,13 @@ public: void SetValue(int row, int col, const wxString& val) { wxPyBeginBlockThreads(); - if (wxPyCBH_findCallback(m_myInst, "SetValue")) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { +#if wxUSE_UNICODE + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiu)",row,col,val.c_str())); +#else + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); +#endif + } wxPyEndBlockThreads(); } diff --git a/wxPython/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp index a1de6b2343..e1ecb53bba 100644 --- a/wxPython/src/gtk/calendar.cpp +++ b/wxPython/src/gtk/calendar.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -141,7 +135,7 @@ static PyObject *_wrap_new_wxCalendarDateAttr(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateAttr *)new_wxCalendarDateAttr(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttr(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -177,7 +171,7 @@ static PyObject *_wrap_new_wxCalendarDateAttrBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateAttr *)new_wxCalendarDateAttrBorder(_arg0,*_arg1); + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttrBorder(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -218,7 +212,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetTextColour(_arg0,*_arg1); + wxCalendarDateAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -254,7 +248,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetBackgroundColour(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetBackgroundColour(_arg0,*_arg1); + wxCalendarDateAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -290,7 +284,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetBorderColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetBorderColour(_arg0,*_arg1); + wxCalendarDateAttr_SetBorderColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -327,7 +321,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetFont(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetFont(_arg0,*_arg1); + wxCalendarDateAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -356,7 +350,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetBorder(_arg0,_arg1); + wxCalendarDateAttr_SetBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -387,7 +381,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetHoliday(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetHoliday(_arg0,_arg1); + wxCalendarDateAttr_SetHoliday(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -416,7 +410,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasTextColour(_arg0); + _result = (bool )wxCalendarDateAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -444,7 +438,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasBackgroundColour(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasBackgroundColour(_arg0); + _result = (bool )wxCalendarDateAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -472,7 +466,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasBorderColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasBorderColour(_arg0); + _result = (bool )wxCalendarDateAttr_HasBorderColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -500,7 +494,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasFont(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasFont(_arg0); + _result = (bool )wxCalendarDateAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +522,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasBorder(_arg0); + _result = (bool )wxCalendarDateAttr_HasBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -556,7 +550,7 @@ static PyObject *_wrap_wxCalendarDateAttr_IsHoliday(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_IsHoliday(_arg0); + _result = (bool )wxCalendarDateAttr_IsHoliday(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -585,7 +579,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarDateAttr_GetTextColour(_arg0)); + _result = new wxColour (wxCalendarDateAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -615,7 +609,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBackgroundColour(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarDateAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxCalendarDateAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -645,7 +639,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBorderColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarDateAttr_GetBorderColour(_arg0)); + _result = new wxColour (wxCalendarDateAttr_GetBorderColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -675,7 +669,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetFont(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxCalendarDateAttr_GetFont(_arg0)); + _result = new wxFont (wxCalendarDateAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -704,7 +698,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateBorder )wxCalendarDateAttr_GetBorder(_arg0); + _result = (wxCalendarDateBorder )wxCalendarDateAttr_GetBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -758,7 +752,7 @@ static PyObject *_wrap_new_wxCalendarEvent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarEvent *)new_wxCalendarEvent(_arg0,_arg1); + _result = (wxCalendarEvent *)new_wxCalendarEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -793,7 +787,7 @@ static PyObject *_wrap_wxCalendarEvent_GetDate(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarEvent_GetDate(_arg0); + const wxDateTime & _result_ref = wxCalendarEvent_GetDate(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -828,7 +822,7 @@ static PyObject *_wrap_wxCalendarEvent_GetWeekDay(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::WeekDay )wxCalendarEvent_GetWeekDay(_arg0); + _result = (wxDateTime::WeekDay )wxCalendarEvent_GetWeekDay(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -919,7 +913,7 @@ static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarCtrl *)new_wxCalendarCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxCalendarCtrl *)new_wxCalendarCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -945,7 +939,7 @@ static PyObject *_wrap_new_wxPreCalendarCtrl(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarCtrl *)new_wxPreCalendarCtrl(); + _result = (wxCalendarCtrl *)new_wxPreCalendarCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1018,7 +1012,7 @@ static PyObject *_wrap_wxCalendarCtrl_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxCalendarCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1054,7 +1048,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetDate(_arg0,*_arg1); + wxCalendarCtrl_SetDate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1084,7 +1078,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetDate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarCtrl_GetDate(_arg0); + const wxDateTime & _result_ref = wxCalendarCtrl_GetDate(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1128,7 +1122,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetLowerDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_SetLowerDateLimit(_arg0,*_arg1); + _result = (bool )wxCalendarCtrl_SetLowerDateLimit(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1157,7 +1151,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetLowerDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarCtrl_GetLowerDateLimit(_arg0); + const wxDateTime & _result_ref = wxCalendarCtrl_GetLowerDateLimit(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1201,7 +1195,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetUpperDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_SetUpperDateLimit(_arg0,*_arg1); + _result = (bool )wxCalendarCtrl_SetUpperDateLimit(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1230,7 +1224,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetUpperDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarCtrl_GetUpperDateLimit(_arg0); + const wxDateTime & _result_ref = wxCalendarCtrl_GetUpperDateLimit(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1283,7 +1277,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetDateRange(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_SetDateRange(_arg0,*_arg1,*_arg2); + _result = (bool )wxCalendarCtrl_SetDateRange(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1313,7 +1307,7 @@ static PyObject *_wrap_wxCalendarCtrl_EnableYearChange(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_EnableYearChange(_arg0,_arg1); + wxCalendarCtrl_EnableYearChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1344,7 +1338,7 @@ static PyObject *_wrap_wxCalendarCtrl_EnableMonthChange(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_EnableMonthChange(_arg0,_arg1); + wxCalendarCtrl_EnableMonthChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1375,7 +1369,7 @@ static PyObject *_wrap_wxCalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_EnableHolidayDisplay(_arg0,_arg1); + wxCalendarCtrl_EnableHolidayDisplay(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1419,7 +1413,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHeaderColours(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHeaderColours(_arg0,*_arg1,*_arg2); + wxCalendarCtrl_SetHeaderColours(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1449,7 +1443,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourFg(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHeaderColourFg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHeaderColourFg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1473,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourBg(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHeaderColourBg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHeaderColourBg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1523,7 +1517,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHighlightColours(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHighlightColours(_arg0,*_arg1,*_arg2); + wxCalendarCtrl_SetHighlightColours(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1553,7 +1547,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourFg(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHighlightColourFg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHighlightColourFg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1583,7 +1577,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourBg(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHighlightColourBg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHighlightColourBg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1627,7 +1621,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHolidayColours(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHolidayColours(_arg0,*_arg1,*_arg2); + wxCalendarCtrl_SetHolidayColours(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1657,7 +1651,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourFg(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHolidayColourFg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHolidayColourFg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1687,7 +1681,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourBg(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHolidayColourBg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHolidayColourBg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1718,7 +1712,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetAttr(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateAttr *)wxCalendarCtrl_GetAttr(_arg0,_arg1); + _result = (wxCalendarDateAttr *)wxCalendarCtrl_GetAttr(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1761,7 +1755,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetAttr(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetAttr(_arg0,_arg1,_arg2); + wxCalendarCtrl_SetAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1790,7 +1784,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHoliday(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHoliday(_arg0,_arg1); + wxCalendarCtrl_SetHoliday(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1819,7 +1813,7 @@ static PyObject *_wrap_wxCalendarCtrl_ResetAttr(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_ResetAttr(_arg0,_arg1); + wxCalendarCtrl_ResetAttr(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1874,7 +1868,7 @@ static PyObject *_wrap_wxCalendarCtrl_HitTest(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarHitTestResult )wxCalendarCtrl_HitTest(_arg0,*_arg1,_arg2,_arg3); + _result = (wxCalendarHitTestResult )wxCalendarCtrl_HitTest(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1905,7 +1899,7 @@ static PyObject *_wrap_wxCalendarCtrl_Enable(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_Enable(_arg0,_arg1); + _result = (bool )wxCalendarCtrl_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1936,7 +1930,7 @@ static PyObject *_wrap_wxCalendarCtrl_Show(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_Show(_arg0,_arg1); + _result = (bool )wxCalendarCtrl_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/clip_dnd.cpp b/wxPython/src/gtk/clip_dnd.cpp index e4ed3e8d03..4879044f97 100644 --- a/wxPython/src/gtk/clip_dnd.cpp +++ b/wxPython/src/gtk/clip_dnd.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif // An alternate constructor... wxDataFormat* wxCustomDataFormat(const wxString &id) { return new wxDataFormat(id); @@ -325,26 +319,13 @@ static PyObject *_wrap_wxCustomDataFormat(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCustomDataFormat",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataFormat *)wxCustomDataFormat(*_arg0); + _result = (wxDataFormat *)wxCustomDataFormat(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -403,7 +384,7 @@ static PyObject *_wrap_wxIsDragResultOk(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIsDragResultOk(_arg0); + _result = (bool )wxIsDragResultOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -424,7 +405,7 @@ static PyObject *_wrap_new_wxDataFormat(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataFormat *)new_wxDataFormat(_arg0); + _result = (wxDataFormat *)new_wxDataFormat(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -457,7 +438,7 @@ static PyObject *_wrap_delete_wxDataFormat(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDataFormat(_arg0); + delete_wxDataFormat(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -486,7 +467,7 @@ static PyObject *_wrap_wxDataFormat_SetType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataFormat_SetType(_arg0,_arg1); + wxDataFormat_SetType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -515,7 +496,7 @@ static PyObject *_wrap_wxDataFormat_GetType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataFormatId )wxDataFormat_GetType(_arg0); + _result = (wxDataFormatId )wxDataFormat_GetType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -543,12 +524,16 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDataFormat_GetId(_arg0)); + _result = new wxString (wxDataFormat_GetId(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -560,7 +545,7 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxDataFormat_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDataFormat * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","format", NULL }; @@ -576,7 +561,7 @@ static PyObject *_wrap_wxDataFormat_SetId(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataFormat_SetId(_arg0,_arg1); + wxDataFormat_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -604,7 +589,7 @@ static PyObject *_wrap_delete_wxDataObject(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDataObject(_arg0); + delete_wxDataObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -635,7 +620,7 @@ static PyObject *_wrap_wxDataObject_GetPreferredFormat(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDataFormat (wxDataObject_GetPreferredFormat(_arg0,_arg1)); + _result = new wxDataFormat (wxDataObject_GetPreferredFormat(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -665,7 +650,7 @@ static PyObject *_wrap_wxDataObject_GetFormatCount(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxDataObject_GetFormatCount(_arg0,_arg1); + _result = (size_t )wxDataObject_GetFormatCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -702,7 +687,7 @@ static PyObject *_wrap_wxDataObject_GetAllFormats(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataObject_GetAllFormats(_arg0,_arg1,_arg2); + wxDataObject_GetAllFormats(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -740,7 +725,7 @@ static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); + _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -786,7 +771,7 @@ static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); + _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -833,7 +818,7 @@ static PyObject *_wrap_wxDataObject_SetData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_SetData(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxDataObject_SetData(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -870,7 +855,7 @@ static PyObject *_wrap_wxDataObject_IsSupportedFormat(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_IsSupportedFormat(_arg0,*_arg1); + _result = (bool )wxDataObject_IsSupportedFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -907,7 +892,7 @@ static PyObject *_wrap_new_wxDataObjectSimple(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObjectSimple *)new_wxDataObjectSimple(*_arg0); + _result = (wxDataObjectSimple *)new_wxDataObjectSimple(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -942,7 +927,7 @@ static PyObject *_wrap_wxDataObjectSimple_GetFormat(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDataFormat & _result_ref = wxDataObjectSimple_GetFormat(_arg0); + const wxDataFormat & _result_ref = wxDataObjectSimple_GetFormat(_arg0); _result = (wxDataFormat *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -985,7 +970,7 @@ static PyObject *_wrap_wxDataObjectSimple_SetFormat(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataObjectSimple_SetFormat(_arg0,*_arg1); + wxDataObjectSimple_SetFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1031,7 +1016,7 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDataObjectSimple *)new_wxPyDataObjectSimple(*_arg0); + _result = (wxPyDataObjectSimple *)new_wxPyDataObjectSimple(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1074,7 +1059,7 @@ static PyObject *_wrap_wxPyDataObjectSimple__setCallbackInfo(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDataObjectSimple__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDataObjectSimple__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1103,7 +1088,7 @@ static PyObject *_wrap_new_wxDataObjectComposite(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObjectComposite *)new_wxDataObjectComposite(); + _result = (wxDataObjectComposite *)new_wxDataObjectComposite(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1146,7 +1131,7 @@ static PyObject *_wrap_wxDataObjectComposite_Add(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataObjectComposite_Add(_arg0,_arg1,_arg2); + wxDataObjectComposite_Add(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1185,26 +1170,13 @@ static PyObject *_wrap_new_wxTextDataObject(PyObject *self, PyObject *args, PyOb return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextDataObject *)new_wxTextDataObject(*_arg0); + _result = (wxTextDataObject *)new_wxTextDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1242,7 +1214,7 @@ static PyObject *_wrap_wxTextDataObject_GetTextLength(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTextDataObject_GetTextLength(_arg0); + _result = (size_t )wxTextDataObject_GetTextLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1270,12 +1242,16 @@ static PyObject *_wrap_wxTextDataObject_GetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextDataObject_GetText(_arg0)); + _result = new wxString (wxTextDataObject_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1303,26 +1279,13 @@ static PyObject *_wrap_wxTextDataObject_SetText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextDataObject_SetText(_arg0,*_arg1); + wxTextDataObject_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1373,26 +1336,13 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTextDataObject *)new_wxPyTextDataObject(*_arg0); + _result = (wxPyTextDataObject *)new_wxPyTextDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1439,7 +1389,7 @@ static PyObject *_wrap_wxPyTextDataObject__setCallbackInfo(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextDataObject__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyTextDataObject__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1485,7 +1435,7 @@ static PyObject *_wrap_new_wxBitmapDataObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapDataObject *)new_wxBitmapDataObject(*_arg0); + _result = (wxBitmapDataObject *)new_wxBitmapDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1520,7 +1470,7 @@ static PyObject *_wrap_wxBitmapDataObject_GetBitmap(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapDataObject_GetBitmap(_arg0)); + _result = new wxBitmap (wxBitmapDataObject_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1557,7 +1507,7 @@ static PyObject *_wrap_wxBitmapDataObject_SetBitmap(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapDataObject_SetBitmap(_arg0,*_arg1); + wxBitmapDataObject_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1611,7 +1561,7 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyBitmapDataObject *)new_wxPyBitmapDataObject(*_arg0); + _result = (wxPyBitmapDataObject *)new_wxPyBitmapDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1654,7 +1604,7 @@ static PyObject *_wrap_wxPyBitmapDataObject__setCallbackInfo(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapDataObject__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyBitmapDataObject__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1691,7 +1641,7 @@ static PyObject *_wrap_new_wxFileDataObject(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileDataObject *)new_wxFileDataObject(); + _result = (wxFileDataObject *)new_wxFileDataObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1728,7 +1678,7 @@ static PyObject *_wrap_wxFileDataObject_GetFilenames(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileDataObject_GetFilenames(_arg0); + _result = (PyObject *)wxFileDataObject_GetFilenames(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1775,7 +1725,7 @@ static PyObject *_wrap_new_wxCustomDataObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCustomDataObject *)new_wxCustomDataObject(*_arg0); + _result = (wxCustomDataObject *)new_wxCustomDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1817,7 +1767,7 @@ static PyObject *_wrap_wxCustomDataObject_TakeData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCustomDataObject_TakeData(_arg0,_arg1); + wxCustomDataObject_TakeData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1856,7 +1806,7 @@ static PyObject *_wrap_wxCustomDataObject_SetData(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCustomDataObject_SetData(_arg0,_arg1); + _result = (bool )wxCustomDataObject_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1884,7 +1834,7 @@ static PyObject *_wrap_wxCustomDataObject_GetSize(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxCustomDataObject_GetSize(_arg0); + _result = (size_t )wxCustomDataObject_GetSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1914,7 +1864,7 @@ static PyObject *_wrap_wxCustomDataObject_GetData(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxCustomDataObject_GetData(_arg0); + _result = (PyObject *)wxCustomDataObject_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1952,7 +1902,7 @@ static PyObject *_wrap_new_wxURLDataObject(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxURLDataObject *)new_wxURLDataObject(); + _result = (wxURLDataObject *)new_wxURLDataObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1986,12 +1936,16 @@ static PyObject *_wrap_wxURLDataObject_GetURL(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxURLDataObject_GetURL(_arg0)); + _result = new wxString (wxURLDataObject_GetURL(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2019,26 +1973,13 @@ static PyObject *_wrap_wxURLDataObject_SetURL(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxURLDataObject_SetURL(_arg0,*_arg1); + wxURLDataObject_SetURL(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2071,7 +2012,7 @@ static PyObject *_wrap_new_wxClipboard(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxClipboard *)new_wxClipboard(); + _result = (wxClipboard *)new_wxClipboard(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2105,7 +2046,7 @@ static PyObject *_wrap_wxClipboard_Open(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_Open(_arg0); + _result = (bool )wxClipboard_Open(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2132,7 +2073,7 @@ static PyObject *_wrap_wxClipboard_Close(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClipboard_Close(_arg0); + wxClipboard_Close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2161,7 +2102,7 @@ static PyObject *_wrap_wxClipboard_IsOpened(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_IsOpened(_arg0); + _result = (bool )wxClipboard_IsOpened(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2198,7 +2139,7 @@ static PyObject *_wrap_wxClipboard_AddData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_AddData(_arg0,_arg1); + _result = (bool )wxClipboard_AddData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2235,7 +2176,7 @@ static PyObject *_wrap_wxClipboard_SetData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_SetData(_arg0,_arg1); + _result = (bool )wxClipboard_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2272,7 +2213,7 @@ static PyObject *_wrap_wxClipboard_IsSupported(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_IsSupported(_arg0,*_arg1); + _result = (bool )wxClipboard_IsSupported(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2309,7 +2250,7 @@ static PyObject *_wrap_wxClipboard_GetData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_GetData(_arg0,*_arg1); + _result = (bool )wxClipboard_GetData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2336,7 +2277,7 @@ static PyObject *_wrap_wxClipboard_Clear(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClipboard_Clear(_arg0); + wxClipboard_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2365,7 +2306,7 @@ static PyObject *_wrap_wxClipboard_Flush(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_Flush(_arg0); + _result = (bool )wxClipboard_Flush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2393,7 +2334,7 @@ static PyObject *_wrap_wxClipboard_UsePrimarySelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClipboard_UsePrimarySelection(_arg0,_arg1); + wxClipboard_UsePrimarySelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2432,7 +2373,7 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDropSource *)new_wxDropSource(_arg0,*_arg1); + _result = (wxPyDropSource *)new_wxDropSource(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2476,7 +2417,7 @@ static PyObject *_wrap_wxDropSource__setCallbackInfo(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDropSource__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); + wxDropSource__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2504,7 +2445,7 @@ static PyObject *_wrap_delete_wxDropSource(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyDropSource(_arg0); + delete_wxPyDropSource(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2541,7 +2482,7 @@ static PyObject *_wrap_wxDropSource_SetData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDropSource_SetData(_arg0,*_arg1); + wxDropSource_SetData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2571,7 +2512,7 @@ static PyObject *_wrap_wxDropSource_GetDataObject(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObject *)wxDropSource_GetDataObject(_arg0); + _result = (wxDataObject *)wxDropSource_GetDataObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2614,7 +2555,7 @@ static PyObject *_wrap_wxDropSource_SetCursor(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDropSource_SetCursor(_arg0,_arg1,*_arg2); + wxDropSource_SetCursor(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2644,7 +2585,7 @@ static PyObject *_wrap_wxDropSource_DoDragDrop(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxDropSource_DoDragDrop(_arg0,_arg1); + _result = (wxDragResult )wxDropSource_DoDragDrop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2673,7 +2614,7 @@ static PyObject *_wrap_wxDropSource_base_GiveFeedback(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDropSource_base_GiveFeedback(_arg0,_arg1); + _result = (bool )wxDropSource_base_GiveFeedback(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2710,7 +2651,7 @@ static PyObject *_wrap_new_wxPyDropTarget(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDropTarget *)new_wxPyDropTarget(_arg0); + _result = (wxPyDropTarget *)new_wxPyDropTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2753,7 +2694,7 @@ static PyObject *_wrap_wxPyDropTarget__setCallbackInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2781,7 +2722,7 @@ static PyObject *_wrap_delete_wxPyDropTarget(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyDropTarget(_arg0); + delete_wxPyDropTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2811,7 +2752,7 @@ static PyObject *_wrap_wxPyDropTarget_GetDataObject(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObject *)wxPyDropTarget_GetDataObject(_arg0); + _result = (wxDataObject *)wxPyDropTarget_GetDataObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2853,7 +2794,7 @@ static PyObject *_wrap_wxPyDropTarget_SetDataObject(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDropTarget_SetDataObject(_arg0,_arg1); + wxPyDropTarget_SetDataObject(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2885,7 +2826,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnEnter(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxPyDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxPyDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2916,7 +2857,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnDragOver(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxPyDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxPyDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2943,7 +2884,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnLeave(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDropTarget_base_OnLeave(_arg0); + wxPyDropTarget_base_OnLeave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2974,7 +2915,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnDrop(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDropTarget_base_OnDrop(_arg0,_arg1,_arg2); + _result = (bool )wxPyDropTarget_base_OnDrop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3002,7 +2943,7 @@ static PyObject *_wrap_wxPyDropTarget_GetData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDropTarget_GetData(_arg0); + _result = (bool )wxPyDropTarget_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3038,7 +2979,7 @@ static PyObject *_wrap_new_wxTextDropTarget(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTextDropTarget *)new_wxTextDropTarget(); + _result = (wxPyTextDropTarget *)new_wxTextDropTarget(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3081,7 +3022,7 @@ static PyObject *_wrap_wxTextDropTarget__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); + wxTextDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3113,7 +3054,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnEnter(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxTextDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxTextDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3144,7 +3085,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnDragOver(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxTextDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxTextDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3171,7 +3112,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnLeave(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextDropTarget_base_OnLeave(_arg0); + wxTextDropTarget_base_OnLeave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3202,7 +3143,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnDrop(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextDropTarget_base_OnDrop(_arg0,_arg1,_arg2); + _result = (bool )wxTextDropTarget_base_OnDrop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3233,7 +3174,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxTextDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxTextDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3269,7 +3210,7 @@ static PyObject *_wrap_new_wxFileDropTarget(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyFileDropTarget *)new_wxFileDropTarget(); + _result = (wxPyFileDropTarget *)new_wxFileDropTarget(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3312,7 +3253,7 @@ static PyObject *_wrap_wxFileDropTarget__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); + wxFileDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3344,7 +3285,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnEnter(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxFileDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxFileDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3375,7 +3316,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnDragOver(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxFileDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxFileDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3402,7 +3343,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnLeave(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDropTarget_base_OnLeave(_arg0); + wxFileDropTarget_base_OnLeave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3433,7 +3374,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnDrop(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileDropTarget_base_OnDrop(_arg0,_arg1,_arg2); + _result = (bool )wxFileDropTarget_base_OnDrop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3464,7 +3405,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxFileDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxFileDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index bc3740ee79..b0a63e59c9 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -88,12 +88,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -117,7 +111,7 @@ static PyObject *_wrap_new_wxColourData(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColourData *)new_wxColourData(); + _result = (wxColourData *)new_wxColourData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -150,7 +144,7 @@ static PyObject *_wrap_delete_wxColourData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxColourData(_arg0); + delete_wxColourData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -179,7 +173,7 @@ static PyObject *_wrap_wxColourData_GetChooseFull(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxColourData_GetChooseFull(_arg0); + _result = (bool )wxColourData_GetChooseFull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -208,7 +202,7 @@ static PyObject *_wrap_wxColourData_GetColour(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxColourData_GetColour(_arg0)); + _result = new wxColour (wxColourData_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -239,7 +233,7 @@ static PyObject *_wrap_wxColourData_GetCustomColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxColourData_GetCustomColour(_arg0,_arg1)); + _result = new wxColour (wxColourData_GetCustomColour(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -268,7 +262,7 @@ static PyObject *_wrap_wxColourData_SetChooseFull(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData_SetChooseFull(_arg0,_arg1); + wxColourData_SetChooseFull(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -304,7 +298,7 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData_SetColour(_arg0,*_arg1); + wxColourData_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -341,7 +335,7 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); + wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -420,7 +414,7 @@ static PyObject *_wrap_new_wxColourDialog(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColourDialog *)new_wxColourDialog(_arg0,_arg1); + _result = (wxColourDialog *)new_wxColourDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -455,7 +449,7 @@ static PyObject *_wrap_wxColourDialog_GetColourData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData & _result_ref = wxColourDialog_GetColourData(_arg0); + wxColourData & _result_ref = wxColourDialog_GetColourData(_arg0); _result = (wxColourData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -490,7 +484,7 @@ static PyObject *_wrap_wxColourDialog_ShowModal(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxColourDialog_ShowModal(_arg0); + _result = (int )wxColourDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -571,7 +565,7 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirDialog *)new_wxDirDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); + _result = (wxDirDialog *)new_wxDirDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -605,12 +599,16 @@ static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDirDialog_GetPath(_arg0)); + _result = new wxString (wxDirDialog_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -638,12 +636,16 @@ static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDirDialog_GetMessage(_arg0)); + _result = new wxString (wxDirDialog_GetMessage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -671,7 +673,7 @@ static PyObject *_wrap_wxDirDialog_GetStyle(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDirDialog_GetStyle(_arg0); + _result = (long )wxDirDialog_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -699,26 +701,13 @@ static PyObject *_wrap_wxDirDialog_SetMessage(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirDialog_SetMessage(_arg0,*_arg1); + wxDirDialog_SetMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -751,26 +740,13 @@ static PyObject *_wrap_wxDirDialog_SetPath(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirDialog_SetPath(_arg0,*_arg1); + wxDirDialog_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -803,7 +779,7 @@ static PyObject *_wrap_wxDirDialog_ShowModal(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDirDialog_ShowModal(_arg0); + _result = (int )wxDirDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -886,7 +862,7 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); + _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -920,12 +896,16 @@ static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetDirectory(_arg0)); + _result = new wxString (wxFileDialog_GetDirectory(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -953,12 +933,16 @@ static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetFilename(_arg0)); + _result = new wxString (wxFileDialog_GetFilename(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -986,7 +970,7 @@ static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_GetFilterIndex(_arg0); + _result = (int )wxFileDialog_GetFilterIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1014,12 +998,16 @@ static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetMessage(_arg0)); + _result = new wxString (wxFileDialog_GetMessage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1047,12 +1035,16 @@ static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetPath(_arg0)); + _result = new wxString (wxFileDialog_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1080,7 +1072,7 @@ static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxFileDialog_GetStyle(_arg0); + _result = (long )wxFileDialog_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1108,12 +1100,16 @@ static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetWildcard(_arg0)); + _result = new wxString (wxFileDialog_GetWildcard(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1141,26 +1137,13 @@ static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetDirectory(_arg0,*_arg1); + wxFileDialog_SetDirectory(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1193,26 +1176,13 @@ static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilename(_arg0,*_arg1); + wxFileDialog_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1245,7 +1215,7 @@ static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilterIndex(_arg0,_arg1); + wxFileDialog_SetFilterIndex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1274,26 +1244,13 @@ static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetMessage(_arg0,*_arg1); + wxFileDialog_SetMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1326,26 +1283,13 @@ static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetPath(_arg0,*_arg1); + wxFileDialog_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1378,7 +1322,7 @@ static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetStyle(_arg0,_arg1); + wxFileDialog_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1407,26 +1351,13 @@ static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetWildcard(_arg0,*_arg1); + wxFileDialog_SetWildcard(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1459,7 +1390,7 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_ShowModal(_arg0); + _result = (int )wxFileDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1491,7 +1422,7 @@ static PyObject *_wrap_wxFileDialog_GetFilenames(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileDialog_GetFilenames(_arg0); + _result = (PyObject *)wxFileDialog_GetFilenames(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1525,7 +1456,7 @@ static PyObject *_wrap_wxFileDialog_GetPaths(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileDialog_GetPaths(_arg0); + _result = (PyObject *)wxFileDialog_GetPaths(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1606,40 +1537,14 @@ static PyObject *_wrap_new_wxMultiChoiceDialog(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj4) { @@ -1664,7 +1569,7 @@ static PyObject *_wrap_new_wxMultiChoiceDialog(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMultiChoiceDialog *)new_wxMultiChoiceDialog(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,*_arg6); + _result = (wxMultiChoiceDialog *)new_wxMultiChoiceDialog(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1725,7 +1630,7 @@ static PyObject *_wrap_wxMultiChoiceDialog_SetSelections(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMultiChoiceDialog_SetSelections(_arg0,*_arg1); + wxMultiChoiceDialog_SetSelections(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,7 +1665,7 @@ static PyObject *_wrap_wxMultiChoiceDialog_GetSelections(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxMultiChoiceDialog_GetSelections(_arg0); + _result = (PyObject *)wxMultiChoiceDialog_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1845,40 +1750,14 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj4) { @@ -1903,7 +1782,7 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSingleChoiceDialog *)new_wxSingleChoiceDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxSingleChoiceDialog *)new_wxSingleChoiceDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1948,7 +1827,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetSelection(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSingleChoiceDialog_GetSelection(_arg0); + _result = (int )wxSingleChoiceDialog_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1976,12 +1855,16 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxSingleChoiceDialog_GetStringSelection(_arg0)); + _result = new wxString (wxSingleChoiceDialog_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2009,7 +1892,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_SetSelection(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSingleChoiceDialog_SetSelection(_arg0,_arg1); + wxSingleChoiceDialog_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2038,7 +1921,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_ShowModal(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSingleChoiceDialog_ShowModal(_arg0); + _result = (int )wxSingleChoiceDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2120,7 +2003,7 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); + _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2154,12 +2037,16 @@ static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextEntryDialog_GetValue(_arg0)); + _result = new wxString (wxTextEntryDialog_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2187,26 +2074,13 @@ static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextEntryDialog_SetValue(_arg0,*_arg1); + wxTextEntryDialog_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2239,7 +2113,7 @@ static PyObject *_wrap_wxTextEntryDialog_ShowModal(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextEntryDialog_ShowModal(_arg0); + _result = (int )wxTextEntryDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2267,7 +2141,7 @@ static PyObject *_wrap_new_wxFontData(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontData *)new_wxFontData(); + _result = (wxFontData *)new_wxFontData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2174,7 @@ static PyObject *_wrap_delete_wxFontData(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFontData(_arg0); + delete_wxFontData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2331,7 +2205,7 @@ static PyObject *_wrap_wxFontData_EnableEffects(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_EnableEffects(_arg0,_arg1); + wxFontData_EnableEffects(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2360,7 +2234,7 @@ static PyObject *_wrap_wxFontData_GetAllowSymbols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontData_GetAllowSymbols(_arg0); + _result = (bool )wxFontData_GetAllowSymbols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2389,7 +2263,7 @@ static PyObject *_wrap_wxFontData_GetColour(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxFontData_GetColour(_arg0)); + _result = new wxColour (wxFontData_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2419,7 +2293,7 @@ static PyObject *_wrap_wxFontData_GetChosenFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxFontData_GetChosenFont(_arg0)); + _result = new wxFont (wxFontData_GetChosenFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2448,7 +2322,7 @@ static PyObject *_wrap_wxFontData_GetEnableEffects(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontData_GetEnableEffects(_arg0); + _result = (bool )wxFontData_GetEnableEffects(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2477,7 +2351,7 @@ static PyObject *_wrap_wxFontData_GetInitialFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxFontData_GetInitialFont(_arg0)); + _result = new wxFont (wxFontData_GetInitialFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2506,7 +2380,7 @@ static PyObject *_wrap_wxFontData_GetShowHelp(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontData_GetShowHelp(_arg0); + _result = (bool )wxFontData_GetShowHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2536,7 +2410,7 @@ static PyObject *_wrap_wxFontData_SetAllowSymbols(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetAllowSymbols(_arg0,_arg1); + wxFontData_SetAllowSymbols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2573,7 +2447,7 @@ static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetChosenFont(_arg0,*_arg1); + wxFontData_SetChosenFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2609,7 +2483,7 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetColour(_arg0,*_arg1); + wxFontData_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2646,7 +2520,7 @@ static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetInitialFont(_arg0,*_arg1); + wxFontData_SetInitialFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2676,7 +2550,7 @@ static PyObject *_wrap_wxFontData_SetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetRange(_arg0,_arg1,_arg2); + wxFontData_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2707,7 +2581,7 @@ static PyObject *_wrap_wxFontData_SetShowHelp(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetShowHelp(_arg0,_arg1); + wxFontData_SetShowHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2786,7 +2660,7 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); + _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2821,7 +2695,7 @@ static PyObject *_wrap_wxFontDialog_GetFontData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData & _result_ref = wxFontDialog_GetFontData(_arg0); + wxFontData & _result_ref = wxFontDialog_GetFontData(_arg0); _result = (wxFontData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2856,7 +2730,7 @@ static PyObject *_wrap_wxFontDialog_ShowModal(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFontDialog_ShowModal(_arg0); + _result = (int )wxFontDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2937,7 +2811,7 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); + _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2971,7 +2845,7 @@ static PyObject *_wrap_wxMessageDialog_ShowModal(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMessageDialog_ShowModal(_arg0); + _result = (int )wxMessageDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3038,40 +2912,14 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOi:new_wxProgressDialog",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -3082,7 +2930,7 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxProgressDialog *)new_wxProgressDialog(*_arg0,*_arg1,_arg2,_arg3,_arg4); + _result = (wxProgressDialog *)new_wxProgressDialog(*_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3126,7 +2974,7 @@ static PyObject *_wrap_wxProgressDialog_Update(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxProgressDialog_Update(_arg0,_arg1,_arg2); + _result = (bool )wxProgressDialog_Update(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3153,7 +3001,7 @@ static PyObject *_wrap_wxProgressDialog_Resume(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProgressDialog_Resume(_arg0); + wxProgressDialog_Resume(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3200,7 +3048,7 @@ static PyObject *_wrap_new_wxFindDialogEvent(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindDialogEvent *)new_wxFindDialogEvent(_arg0,_arg1); + _result = (wxFindDialogEvent *)new_wxFindDialogEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3234,7 +3082,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFindDialogEvent_GetFlags(_arg0); + _result = (int )wxFindDialogEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3262,12 +3110,16 @@ static PyObject *_wrap_wxFindDialogEvent_GetFindString(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFindDialogEvent_GetFindString(_arg0)); + _result = new wxString (wxFindDialogEvent_GetFindString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3295,13 +3147,17 @@ static PyObject *_wrap_wxFindDialogEvent_GetReplaceString(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFindDialogEvent_GetReplaceString(_arg0); + const wxString & _result_ref = wxFindDialogEvent_GetReplaceString(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -3327,7 +3183,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetDialog(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceDialog *)wxFindDialogEvent_GetDialog(_arg0); + _result = (wxFindReplaceDialog *)wxFindDialogEvent_GetDialog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3361,7 +3217,7 @@ static PyObject *_wrap_wxFindDialogEvent_SetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindDialogEvent_SetFlags(_arg0,_arg1); + wxFindDialogEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3390,26 +3246,13 @@ static PyObject *_wrap_wxFindDialogEvent_SetFindString(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindDialogEvent_SetFindString(_arg0,*_arg1); + wxFindDialogEvent_SetFindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3442,26 +3285,13 @@ static PyObject *_wrap_wxFindDialogEvent_SetReplaceString(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindDialogEvent_SetReplaceString(_arg0,*_arg1); + wxFindDialogEvent_SetReplaceString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3495,7 +3325,7 @@ static PyObject *_wrap_new_wxFindReplaceData(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceData *)new_wxFindReplaceData(_arg0); + _result = (wxFindReplaceData *)new_wxFindReplaceData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3528,7 +3358,7 @@ static PyObject *_wrap_delete_wxFindReplaceData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFindReplaceData(_arg0); + delete_wxFindReplaceData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3557,13 +3387,17 @@ static PyObject *_wrap_wxFindReplaceData_GetFindString(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFindReplaceData_GetFindString(_arg0); + const wxString & _result_ref = wxFindReplaceData_GetFindString(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -3588,13 +3422,17 @@ static PyObject *_wrap_wxFindReplaceData_GetReplaceString(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFindReplaceData_GetReplaceString(_arg0); + const wxString & _result_ref = wxFindReplaceData_GetReplaceString(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -3619,7 +3457,7 @@ static PyObject *_wrap_wxFindReplaceData_GetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFindReplaceData_GetFlags(_arg0); + _result = (int )wxFindReplaceData_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3647,7 +3485,7 @@ static PyObject *_wrap_wxFindReplaceData_SetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceData_SetFlags(_arg0,_arg1); + wxFindReplaceData_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3676,26 +3514,13 @@ static PyObject *_wrap_wxFindReplaceData_SetFindString(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceData_SetFindString(_arg0,*_arg1); + wxFindReplaceData_SetFindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3728,26 +3553,13 @@ static PyObject *_wrap_wxFindReplaceData_SetReplaceString(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceData_SetReplaceString(_arg0,*_arg1); + wxFindReplaceData_SetReplaceString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3832,26 +3644,13 @@ static PyObject *_wrap_new_wxFindReplaceDialog(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceDialog *)new_wxFindReplaceDialog(_arg0,_arg1,*_arg2,_arg3); + _result = (wxFindReplaceDialog *)new_wxFindReplaceDialog(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3881,7 +3680,7 @@ static PyObject *_wrap_new_wxPreFindReplaceDialog(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceDialog *)new_wxPreFindReplaceDialog(); + _result = (wxFindReplaceDialog *)new_wxPreFindReplaceDialog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3935,26 +3734,13 @@ static PyObject *_wrap_wxFindReplaceDialog_Create(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFindReplaceDialog_Create(_arg0,_arg1,_arg2,*_arg3,_arg4); + _result = (bool )wxFindReplaceDialog_Create(_arg0,_arg1,_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3987,7 +3773,7 @@ static PyObject *_wrap_wxFindReplaceDialog_GetData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceData *)wxFindReplaceDialog_GetData(_arg0); + _result = (wxFindReplaceData *)wxFindReplaceDialog_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4029,7 +3815,7 @@ static PyObject *_wrap_wxFindReplaceDialog_SetData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceDialog_SetData(_arg0,_arg1); + wxFindReplaceDialog_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index 5895421a60..3807244487 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -99,12 +99,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -198,7 +192,7 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -224,7 +218,7 @@ static PyObject *_wrap_new_wxPreControl(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)new_wxPreControl(); + _result = (wxControl *)new_wxPreControl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -297,7 +291,7 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -333,7 +327,7 @@ static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_Command(_arg0,*_arg1); + wxControl_Command(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -362,12 +356,16 @@ static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControl_GetLabel(_arg0)); + _result = new wxString (wxControl_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -395,26 +393,13 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_SetLabel(_arg0,*_arg1); + wxControl_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,7 +464,7 @@ static PyObject *_wrap_wxControlWithItems_Delete(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Delete(_arg0,_arg1); + wxControlWithItems_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -508,7 +493,7 @@ static PyObject *_wrap_wxControlWithItems_GetCount(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_GetCount(_arg0); + _result = (int )wxControlWithItems_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -537,12 +522,16 @@ static PyObject *_wrap_wxControlWithItems_GetString(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); + _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -571,26 +560,13 @@ static PyObject *_wrap_wxControlWithItems_SetString(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_SetString(_arg0,_arg1,*_arg2); + wxControlWithItems_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -624,26 +600,13 @@ static PyObject *_wrap_wxControlWithItems_FindString(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); + _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -675,7 +638,7 @@ static PyObject *_wrap_wxControlWithItems_Select(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Select(_arg0,_arg1); + wxControlWithItems_Select(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -704,7 +667,7 @@ static PyObject *_wrap_wxControlWithItems_GetSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_GetSelection(_arg0); + _result = (int )wxControlWithItems_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -732,12 +695,16 @@ static PyObject *_wrap_wxControlWithItems_GetStringSelection(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); + _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -773,22 +740,9 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { @@ -796,7 +750,7 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Append(_arg0,*_arg1,_arg2); + wxControlWithItems_Append(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -839,7 +793,7 @@ static PyObject *_wrap_wxControlWithItems_GetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); + _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -877,7 +831,7 @@ static PyObject *_wrap_wxControlWithItems_SetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); + wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -914,15 +868,20 @@ static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject * int i, len=PySequence_Length(_obj1); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg1->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_AppendItems(_arg0,*_arg1); + wxControlWithItems_AppendItems(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1000,22 +959,9 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1038,7 +984,7 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1068,7 +1014,7 @@ static PyObject *_wrap_new_wxPreButton(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)new_wxPreButton(); + _result = (wxButton *)new_wxPreButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1123,22 +1069,9 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -1161,7 +1094,7 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1192,7 +1125,7 @@ static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetDefault(_arg0); + wxButton_SetDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1228,7 +1161,7 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetBackgroundColour(_arg0,*_arg1); + wxButton_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1264,7 +1197,7 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetForegroundColour(_arg0,*_arg1); + wxButton_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1284,7 +1217,7 @@ static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxButton::GetDefaultSize()); + _result = new wxSize (wxButton::GetDefaultSize()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1393,7 +1326,7 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1419,7 +1352,7 @@ static PyObject *_wrap_new_wxPreBitmapButton(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapButton *)new_wxPreBitmapButton(); + _result = (wxBitmapButton *)new_wxPreBitmapButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1501,7 +1434,7 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1530,7 +1463,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1560,7 +1493,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1590,7 +1523,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1620,7 +1553,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1657,7 +1590,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); + wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1694,7 +1627,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); + wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1731,7 +1664,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); + wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1768,7 +1701,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); + wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1798,7 +1731,7 @@ static PyObject *_wrap_wxBitmapButton_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); + wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1827,7 +1760,7 @@ static PyObject *_wrap_wxBitmapButton_GetMarginX(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmapButton_GetMarginX(_arg0); + _result = (int )wxBitmapButton_GetMarginX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1855,7 +1788,7 @@ static PyObject *_wrap_wxBitmapButton_GetMarginY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmapButton_GetMarginY(_arg0); + _result = (int )wxBitmapButton_GetMarginY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1928,22 +1861,9 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1966,7 +1886,7 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1996,7 +1916,7 @@ static PyObject *_wrap_new_wxPreCheckBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckBox *)new_wxPreCheckBox(); + _result = (wxCheckBox *)new_wxPreCheckBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2051,22 +1971,9 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -2089,7 +1996,7 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2121,7 +2028,7 @@ static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckBox_GetValue(_arg0); + _result = (bool )wxCheckBox_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2151,7 +2058,7 @@ static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckBox_SetValue(_arg0,_arg1); + wxCheckBox_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2269,7 +2176,7 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2298,7 +2205,7 @@ static PyObject *_wrap_new_wxPreChoice(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChoice *)new_wxPreChoice(); + _result = (wxChoice *)new_wxPreChoice(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2389,7 +2296,7 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2419,7 +2326,7 @@ static PyObject *_wrap_wxChoice_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_Clear(_arg0); + wxChoice_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2448,7 +2355,7 @@ static PyObject *_wrap_wxChoice_GetColumns(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxChoice_GetColumns(_arg0); + _result = (int )wxChoice_GetColumns(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2476,7 +2383,7 @@ static PyObject *_wrap_wxChoice_SetColumns(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetColumns(_arg0,_arg1); + wxChoice_SetColumns(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2505,7 +2412,7 @@ static PyObject *_wrap_wxChoice_SetSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetSelection(_arg0,_arg1); + wxChoice_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2534,26 +2441,13 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetStringSelection(_arg0,*_arg1); + wxChoice_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2587,26 +2481,13 @@ static PyObject *_wrap_wxChoice_SetString(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetString(_arg0,_arg1,*_arg2); + wxChoice_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2721,7 +2602,7 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2750,7 +2631,7 @@ static PyObject *_wrap_new_wxPreComboBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxComboBox *)new_wxPreComboBox(); + _result = (wxComboBox *)new_wxPreComboBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2842,7 +2723,7 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2872,7 +2753,7 @@ static PyObject *_wrap_wxComboBox_Copy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Copy(_arg0); + wxComboBox_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2900,7 +2781,7 @@ static PyObject *_wrap_wxComboBox_Cut(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Cut(_arg0); + wxComboBox_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2929,7 +2810,7 @@ static PyObject *_wrap_wxComboBox_GetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxComboBox_GetInsertionPoint(_arg0); + _result = (long )wxComboBox_GetInsertionPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2957,7 +2838,7 @@ static PyObject *_wrap_wxComboBox_GetLastPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxComboBox_GetLastPosition(_arg0); + _result = (long )wxComboBox_GetLastPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2985,12 +2866,16 @@ static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetValue(_arg0)); + _result = new wxString (wxComboBox_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3017,7 +2902,7 @@ static PyObject *_wrap_wxComboBox_Paste(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Paste(_arg0); + wxComboBox_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3048,26 +2933,13 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); + wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3101,7 +2973,7 @@ static PyObject *_wrap_wxComboBox_Remove(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Remove(_arg0,_arg1,_arg2); + wxComboBox_Remove(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3130,7 +3002,7 @@ static PyObject *_wrap_wxComboBox_SetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetInsertionPoint(_arg0,_arg1); + wxComboBox_SetInsertionPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3158,7 +3030,7 @@ static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetInsertionPointEnd(_arg0); + wxComboBox_SetInsertionPointEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3187,7 +3059,7 @@ static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetSelection(_arg0,_arg1); + wxComboBox_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3217,7 +3089,7 @@ static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetMark(_arg0,_arg1,_arg2); + wxComboBox_SetMark(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3246,26 +3118,13 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetValue(_arg0,*_arg1); + wxComboBox_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3300,7 +3159,7 @@ static PyObject *_wrap_wxComboBox_SetEditable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetEditable(_arg0,_arg1); + wxComboBox_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3328,7 +3187,7 @@ static PyObject *_wrap_wxComboBox_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Clear(_arg0); + wxComboBox_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3357,7 +3216,7 @@ static PyObject *_wrap_wxComboBox_Delete(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Delete(_arg0,_arg1); + wxComboBox_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3386,7 +3245,7 @@ static PyObject *_wrap_wxComboBox_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxComboBox_GetCount(_arg0); + _result = (int )wxComboBox_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3415,12 +3274,16 @@ static PyObject *_wrap_wxComboBox_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetString(_arg0,_arg1)); + _result = new wxString (wxComboBox_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3449,26 +3312,13 @@ static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxComboBox_FindString(_arg0,*_arg1); + _result = (int )wxComboBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3500,7 +3350,7 @@ static PyObject *_wrap_wxComboBox_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxComboBox_GetSelection(_arg0); + _result = (int )wxComboBox_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3528,12 +3378,16 @@ static PyObject *_wrap_wxComboBox_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetStringSelection(_arg0)); + _result = new wxString (wxComboBox_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3569,22 +3423,9 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { @@ -3592,7 +3433,7 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Append(_arg0,*_arg1,_arg2); + wxComboBox_Append(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3635,7 +3476,7 @@ static PyObject *_wrap_wxComboBox_GetClientData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxComboBox_GetClientData(_arg0,_arg1); + _result = (PyObject *)wxComboBox_GetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3673,7 +3514,7 @@ static PyObject *_wrap_wxComboBox_SetClientData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetClientData(_arg0,_arg1,_arg2); + wxComboBox_SetClientData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3766,7 +3607,7 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3792,7 +3633,7 @@ static PyObject *_wrap_new_wxPreGauge(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGauge *)new_wxPreGauge(); + _result = (wxGauge *)new_wxPreGauge(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3866,7 +3707,7 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3894,7 +3735,7 @@ static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetBezelFace(_arg0); + _result = (int )wxGauge_GetBezelFace(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3922,7 +3763,7 @@ static PyObject *_wrap_wxGauge_GetRange(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetRange(_arg0); + _result = (int )wxGauge_GetRange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3950,7 +3791,7 @@ static PyObject *_wrap_wxGauge_GetShadowWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetShadowWidth(_arg0); + _result = (int )wxGauge_GetShadowWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3978,7 +3819,7 @@ static PyObject *_wrap_wxGauge_GetValue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetValue(_arg0); + _result = (int )wxGauge_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4006,7 +3847,7 @@ static PyObject *_wrap_wxGauge_SetBezelFace(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetBezelFace(_arg0,_arg1); + wxGauge_SetBezelFace(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4035,7 +3876,7 @@ static PyObject *_wrap_wxGauge_SetRange(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetRange(_arg0,_arg1); + wxGauge_SetRange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4064,7 +3905,7 @@ static PyObject *_wrap_wxGauge_SetShadowWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetShadowWidth(_arg0,_arg1); + wxGauge_SetShadowWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4093,7 +3934,7 @@ static PyObject *_wrap_wxGauge_SetValue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetValue(_arg0,_arg1); + wxGauge_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4165,22 +4006,9 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -4196,7 +4024,7 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4226,7 +4054,7 @@ static PyObject *_wrap_new_wxPreStaticBox(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)new_wxPreStaticBox(); + _result = (wxStaticBox *)new_wxPreStaticBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4279,22 +4107,9 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4310,7 +4125,7 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4396,7 +4211,7 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4422,7 +4237,7 @@ static PyObject *_wrap_new_wxPreStaticLine(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticLine *)new_wxPreStaticLine(); + _result = (wxStaticLine *)new_wxPreStaticLine(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4486,7 +4301,7 @@ static PyObject *_wrap_wxStaticLine_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4557,22 +4372,9 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -4588,7 +4390,7 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4618,7 +4420,7 @@ static PyObject *_wrap_new_wxPreStaticText(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticText *)new_wxPreStaticText(); + _result = (wxStaticText *)new_wxPreStaticText(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4671,22 +4473,9 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4702,7 +4491,7 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4734,12 +4523,16 @@ static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStaticText_GetLabel(_arg0)); + _result = new wxString (wxStaticText_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4767,26 +4560,13 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticText_SetLabel(_arg0,*_arg1); + wxStaticText_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4908,7 +4688,7 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4937,7 +4717,7 @@ static PyObject *_wrap_new_wxPreListBox(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListBox *)new_wxPreListBox(); + _result = (wxListBox *)new_wxPreListBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5028,7 +4808,7 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5058,7 +4838,7 @@ static PyObject *_wrap_wxListBox_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Clear(_arg0); + wxListBox_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5087,7 +4867,7 @@ static PyObject *_wrap_wxListBox_Deselect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Deselect(_arg0,_arg1); + wxListBox_Deselect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5124,7 +4904,7 @@ static PyObject *_wrap_wxListBox_GetSelections(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxListBox_GetSelections(_arg0); + _result = (PyObject *)wxListBox_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5171,7 +4951,7 @@ static PyObject *_wrap_wxListBox_InsertItems(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5204,7 +4984,7 @@ static PyObject *_wrap_wxListBox_IsSelected(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_IsSelected(_arg0,_arg1); + _result = (bool )wxListBox_IsSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5233,7 +5013,7 @@ static PyObject *_wrap_wxListBox_Selected(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_Selected(_arg0,_arg1); + _result = (bool )wxListBox_Selected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5278,7 +5058,7 @@ static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Set(_arg0,_arg1,_arg2); + wxListBox_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5310,7 +5090,7 @@ static PyObject *_wrap_wxListBox_SetFirstItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetFirstItem(_arg0,_arg1); + wxListBox_SetFirstItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5339,26 +5119,13 @@ static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetFirstItemStr(_arg0,*_arg1); + wxListBox_SetFirstItemStr(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5394,7 +5161,7 @@ static PyObject *_wrap_wxListBox_SetSelection(PyObject *self, PyObject *args, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetSelection(_arg0,_arg1,_arg2); + wxListBox_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5424,26 +5191,13 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetString(_arg0,_arg1,*_arg2); + wxListBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5478,27 +5232,14 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); + wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5628,7 +5369,7 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5657,7 +5398,7 @@ static PyObject *_wrap_new_wxPreCheckListBox(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckListBox *)new_wxPreCheckListBox(); + _result = (wxCheckListBox *)new_wxPreCheckListBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5748,7 +5489,7 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5780,7 +5521,7 @@ static PyObject *_wrap_wxCheckListBox_IsChecked(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); + _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5809,7 +5550,7 @@ static PyObject *_wrap_wxCheckListBox_Check(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckListBox_Check(_arg0,_arg1,_arg2); + wxCheckListBox_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5855,7 +5596,7 @@ static PyObject *_wrap_wxCheckListBox_InsertItems(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5887,7 +5628,7 @@ static PyObject *_wrap_wxCheckListBox_GetItemHeight(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCheckListBox_GetItemHeight(_arg0); + _result = (int )wxCheckListBox_GetItemHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5934,7 +5675,7 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5967,7 +5708,7 @@ static PyObject *_wrap_delete_wxTextAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTextAttr(_arg0); + delete_wxTextAttr(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6003,7 +5744,7 @@ static PyObject *_wrap_wxTextAttr_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetTextColour(_arg0,*_arg1); + wxTextAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6039,7 +5780,7 @@ static PyObject *_wrap_wxTextAttr_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetBackgroundColour(_arg0,*_arg1); + wxTextAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6076,7 +5817,7 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetFont(_arg0,*_arg1); + wxTextAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6105,7 +5846,7 @@ static PyObject *_wrap_wxTextAttr_HasTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasTextColour(_arg0); + _result = (bool )wxTextAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6133,7 +5874,7 @@ static PyObject *_wrap_wxTextAttr_HasBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); + _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6161,7 +5902,7 @@ static PyObject *_wrap_wxTextAttr_HasFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasFont(_arg0); + _result = (bool )wxTextAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6190,7 +5931,7 @@ static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); + _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6220,7 +5961,7 @@ static PyObject *_wrap_wxTextAttr_GetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6250,7 +5991,7 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxTextAttr_GetFont(_arg0)); + _result = new wxFont (wxTextAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6279,7 +6020,7 @@ static PyObject *_wrap_wxTextAttr_IsDefault(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_IsDefault(_arg0); + _result = (bool )wxTextAttr_IsDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6325,7 +6066,7 @@ static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); + _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6418,7 +6159,7 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6444,7 +6185,7 @@ static PyObject *_wrap_new_wxPreTextCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)new_wxPreTextCtrl(); + _result = (wxTextCtrl *)new_wxPreTextCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6518,7 +6259,7 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6546,12 +6287,16 @@ static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetValue(_arg0)); + _result = new wxString (wxTextCtrl_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6579,26 +6324,13 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetValue(_arg0,*_arg1); + wxTextCtrl_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6633,12 +6365,16 @@ static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); + _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6667,7 +6403,7 @@ static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); + _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6696,12 +6432,16 @@ static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); + _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6729,7 +6469,7 @@ static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); + _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6757,7 +6497,7 @@ static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_IsModified(_arg0); + _result = (bool )wxTextCtrl_IsModified(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6785,7 +6525,7 @@ static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_IsEditable(_arg0); + _result = (bool )wxTextCtrl_IsEditable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6822,7 +6562,7 @@ static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6861,12 +6601,16 @@ static PyObject *_wrap_wxTextCtrl_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); + _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6893,7 +6637,7 @@ static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Clear(_arg0); + wxTextCtrl_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6924,26 +6668,13 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); + wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6977,7 +6708,7 @@ static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Remove(_arg0,_arg1,_arg2); + wxTextCtrl_Remove(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7007,26 +6738,13 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7060,26 +6778,13 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7110,7 +6815,7 @@ static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_DiscardEdits(_arg0); + wxTextCtrl_DiscardEdits(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7139,7 +6844,7 @@ static PyObject *_wrap_wxTextCtrl_SetMaxLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetMaxLength(_arg0,_arg1); + wxTextCtrl_SetMaxLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7168,26 +6873,13 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_WriteText(_arg0,*_arg1); + wxTextCtrl_WriteText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7220,26 +6912,13 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_AppendText(_arg0,*_arg1); + wxTextCtrl_AppendText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7283,7 +6962,7 @@ static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7320,7 +6999,7 @@ static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7349,7 +7028,7 @@ static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); + const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); _result = (wxTextAttr *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7386,7 +7065,7 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); + _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7424,7 +7103,7 @@ static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7463,7 +7142,7 @@ static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_ShowPosition(_arg0,_arg1); + wxTextCtrl_ShowPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7491,7 +7170,7 @@ static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Copy(_arg0); + wxTextCtrl_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7519,7 +7198,7 @@ static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Cut(_arg0); + wxTextCtrl_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7547,7 +7226,7 @@ static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Paste(_arg0); + wxTextCtrl_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7576,7 +7255,7 @@ static PyObject *_wrap_wxTextCtrl_CanCopy(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanCopy(_arg0); + _result = (bool )wxTextCtrl_CanCopy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7604,7 +7283,7 @@ static PyObject *_wrap_wxTextCtrl_CanCut(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanCut(_arg0); + _result = (bool )wxTextCtrl_CanCut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7632,7 +7311,7 @@ static PyObject *_wrap_wxTextCtrl_CanPaste(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanPaste(_arg0); + _result = (bool )wxTextCtrl_CanPaste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7659,7 +7338,7 @@ static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Undo(_arg0); + wxTextCtrl_Undo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7687,7 +7366,7 @@ static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Redo(_arg0); + wxTextCtrl_Redo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7716,7 +7395,7 @@ static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanUndo(_arg0); + _result = (bool )wxTextCtrl_CanUndo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7744,7 +7423,7 @@ static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanRedo(_arg0); + _result = (bool )wxTextCtrl_CanRedo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7772,7 +7451,7 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); + wxTextCtrl_SetInsertionPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7800,7 +7479,7 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetInsertionPointEnd(_arg0); + wxTextCtrl_SetInsertionPointEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7829,7 +7508,7 @@ static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); + _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7857,7 +7536,7 @@ static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_GetLastPosition(_arg0); + _result = (long )wxTextCtrl_GetLastPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7886,7 +7565,7 @@ static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7914,7 +7593,7 @@ static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SelectAll(_arg0); + wxTextCtrl_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7945,7 +7624,7 @@ static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetEditable(_arg0,_arg1); + wxTextCtrl_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7976,26 +7655,13 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_write(_arg0,*_arg1); + wxTextCtrl_write(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8032,12 +7698,16 @@ static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); + _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -8128,7 +7798,7 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8154,7 +7824,7 @@ static PyObject *_wrap_new_wxPreScrollBar(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)new_wxPreScrollBar(); + _result = (wxScrollBar *)new_wxPreScrollBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8227,7 +7897,7 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8255,7 +7925,7 @@ static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetRange(_arg0); + _result = (int )wxScrollBar_GetRange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8283,7 +7953,7 @@ static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetPageSize(_arg0); + _result = (int )wxScrollBar_GetPageSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8311,7 +7981,7 @@ static PyObject *_wrap_wxScrollBar_GetThumbPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetThumbPosition(_arg0); + _result = (int )wxScrollBar_GetThumbPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8339,7 +8009,7 @@ static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetThumbSize(_arg0); + _result = (int )wxScrollBar_GetThumbSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8367,7 +8037,7 @@ static PyObject *_wrap_wxScrollBar_IsVertical(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrollBar_IsVertical(_arg0); + _result = (bool )wxScrollBar_IsVertical(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8395,7 +8065,7 @@ static PyObject *_wrap_wxScrollBar_SetThumbPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrollBar_SetThumbPosition(_arg0,_arg1); + wxScrollBar_SetThumbPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8430,7 +8100,7 @@ static PyObject *_wrap_wxScrollBar_SetScrollbar(PyObject *self, PyObject *args, _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8513,7 +8183,7 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8539,7 +8209,7 @@ static PyObject *_wrap_new_wxPreSpinButton(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinButton *)new_wxPreSpinButton(); + _result = (wxSpinButton *)new_wxPreSpinButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8603,7 +8273,7 @@ static PyObject *_wrap_wxSpinButton_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8631,7 +8301,7 @@ static PyObject *_wrap_wxSpinButton_GetMax(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetMax(_arg0); + _result = (int )wxSpinButton_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8659,7 +8329,7 @@ static PyObject *_wrap_wxSpinButton_GetMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetMin(_arg0); + _result = (int )wxSpinButton_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8687,7 +8357,7 @@ static PyObject *_wrap_wxSpinButton_GetValue(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetValue(_arg0); + _result = (int )wxSpinButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8716,7 +8386,7 @@ static PyObject *_wrap_wxSpinButton_SetRange(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinButton_SetRange(_arg0,_arg1,_arg2); + wxSpinButton_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8745,7 +8415,7 @@ static PyObject *_wrap_wxSpinButton_SetValue(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinButton_SetValue(_arg0,_arg1); + wxSpinButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8837,7 +8507,7 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8863,7 +8533,7 @@ static PyObject *_wrap_new_wxPreStaticBitmap(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); + _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8936,7 +8606,7 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8965,7 +8635,7 @@ static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); + _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9002,7 +8672,7 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetBitmap(_arg0,*_arg1); + wxStaticBitmap_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9039,7 +8709,7 @@ static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetIcon(_arg0,*_arg1); + wxStaticBitmap_SetIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9117,22 +8787,9 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -9170,7 +8827,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9203,7 +8860,7 @@ static PyObject *_wrap_new_wxPreRadioBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioBox *)new_wxPreRadioBox(); + _result = (wxRadioBox *)new_wxPreRadioBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9262,22 +8919,9 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -9315,7 +8959,7 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); + _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9352,7 +8996,7 @@ static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_Enable(_arg0,_arg1); + wxRadioBox_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9384,7 +9028,7 @@ static PyObject *_wrap_wxRadioBox_EnableItem(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_EnableItem(_arg0,_arg1,_arg2); + wxRadioBox_EnableItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9414,26 +9058,13 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_FindString(_arg0,*_arg1); + _result = (int )wxRadioBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9466,12 +9097,16 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); + _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9500,12 +9135,16 @@ static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetItemLabel(_arg0,_arg1)); + _result = new wxString (wxRadioBox_GetItemLabel(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9534,26 +9173,13 @@ static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetItemLabel(_arg0,_arg1,*_arg2); + wxRadioBox_SetItemLabel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9586,7 +9212,7 @@ static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetSelection(_arg0); + _result = (int )wxRadioBox_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9614,12 +9240,16 @@ static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); + _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9647,7 +9277,7 @@ static PyObject *_wrap_wxRadioBox_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetCount(_arg0); + _result = (int )wxRadioBox_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9675,7 +9305,7 @@ static PyObject *_wrap_wxRadioBox_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetSelection(_arg0,_arg1); + wxRadioBox_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9704,26 +9334,13 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetStringSelection(_arg0,*_arg1); + wxRadioBox_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9758,7 +9375,7 @@ static PyObject *_wrap_wxRadioBox_Show(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_Show(_arg0,_arg1); + wxRadioBox_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9790,7 +9407,7 @@ static PyObject *_wrap_wxRadioBox_ShowItem(PyObject *self, PyObject *args, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_ShowItem(_arg0,_arg1,_arg2); + wxRadioBox_ShowItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9864,22 +9481,9 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -9902,7 +9506,7 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9932,7 +9536,7 @@ static PyObject *_wrap_new_wxPreRadioButton(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioButton *)new_wxPreRadioButton(); + _result = (wxRadioButton *)new_wxPreRadioButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9987,22 +9591,9 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -10025,7 +9616,7 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10057,7 +9648,7 @@ static PyObject *_wrap_wxRadioButton_GetValue(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioButton_GetValue(_arg0); + _result = (bool )wxRadioButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10087,7 +9678,7 @@ static PyObject *_wrap_wxRadioButton_SetValue(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioButton_SetValue(_arg0,_arg1); + wxRadioButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10182,7 +9773,7 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); + _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10208,7 +9799,7 @@ static PyObject *_wrap_new_wxPreSlider(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSlider *)new_wxPreSlider(); + _result = (wxSlider *)new_wxPreSlider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10284,7 +9875,7 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); + _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10311,7 +9902,7 @@ static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_ClearSel(_arg0); + wxSlider_ClearSel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10339,7 +9930,7 @@ static PyObject *_wrap_wxSlider_ClearTicks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_ClearTicks(_arg0); + wxSlider_ClearTicks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10368,7 +9959,7 @@ static PyObject *_wrap_wxSlider_GetLineSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetLineSize(_arg0); + _result = (int )wxSlider_GetLineSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10396,7 +9987,7 @@ static PyObject *_wrap_wxSlider_GetMax(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetMax(_arg0); + _result = (int )wxSlider_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10424,7 +10015,7 @@ static PyObject *_wrap_wxSlider_GetMin(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetMin(_arg0); + _result = (int )wxSlider_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10452,7 +10043,7 @@ static PyObject *_wrap_wxSlider_GetPageSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetPageSize(_arg0); + _result = (int )wxSlider_GetPageSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10480,7 +10071,7 @@ static PyObject *_wrap_wxSlider_GetSelEnd(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetSelEnd(_arg0); + _result = (int )wxSlider_GetSelEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10508,7 +10099,7 @@ static PyObject *_wrap_wxSlider_GetSelStart(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetSelStart(_arg0); + _result = (int )wxSlider_GetSelStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10536,7 +10127,7 @@ static PyObject *_wrap_wxSlider_GetThumbLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetThumbLength(_arg0); + _result = (int )wxSlider_GetThumbLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10564,7 +10155,7 @@ static PyObject *_wrap_wxSlider_GetTickFreq(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetTickFreq(_arg0); + _result = (int )wxSlider_GetTickFreq(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10592,7 +10183,7 @@ static PyObject *_wrap_wxSlider_GetValue(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetValue(_arg0); + _result = (int )wxSlider_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10621,7 +10212,7 @@ static PyObject *_wrap_wxSlider_SetRange(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetRange(_arg0,_arg1,_arg2); + wxSlider_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10651,7 +10242,7 @@ static PyObject *_wrap_wxSlider_SetTickFreq(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetTickFreq(_arg0,_arg1,_arg2); + wxSlider_SetTickFreq(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10680,7 +10271,7 @@ static PyObject *_wrap_wxSlider_SetLineSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetLineSize(_arg0,_arg1); + wxSlider_SetLineSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10709,7 +10300,7 @@ static PyObject *_wrap_wxSlider_SetPageSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetPageSize(_arg0,_arg1); + wxSlider_SetPageSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10739,7 +10330,7 @@ static PyObject *_wrap_wxSlider_SetSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetSelection(_arg0,_arg1,_arg2); + wxSlider_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10768,7 +10359,7 @@ static PyObject *_wrap_wxSlider_SetThumbLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetThumbLength(_arg0,_arg1); + wxSlider_SetThumbLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10797,7 +10388,7 @@ static PyObject *_wrap_wxSlider_SetTick(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetTick(_arg0,_arg1); + wxSlider_SetTick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10826,7 +10417,7 @@ static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetValue(_arg0,_arg1); + wxSlider_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10921,7 +10512,7 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10947,7 +10538,7 @@ static PyObject *_wrap_new_wxPreSpinCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); + _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11015,7 +10606,7 @@ static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); + _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11043,7 +10634,7 @@ static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetMax(_arg0); + _result = (int )wxSpinCtrl_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11071,7 +10662,7 @@ static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetMin(_arg0); + _result = (int )wxSpinCtrl_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11099,7 +10690,7 @@ static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetValue(_arg0); + _result = (int )wxSpinCtrl_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11128,7 +10719,7 @@ static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11157,7 +10748,7 @@ static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinCtrl_SetValue(_arg0,_arg1); + wxSpinCtrl_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11231,22 +10822,9 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -11269,7 +10847,7 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToggleButton *)new_wxToggleButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxToggleButton *)new_wxToggleButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11299,7 +10877,7 @@ static PyObject *_wrap_new_wxPreToggleButton(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToggleButton *)new_wxPreToggleButton(); + _result = (wxToggleButton *)new_wxPreToggleButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11354,22 +10932,9 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -11392,7 +10957,7 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11426,7 +10991,7 @@ static PyObject *_wrap_wxToggleButton_SetValue(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToggleButton_SetValue(_arg0,_arg1); + wxToggleButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11455,7 +11020,7 @@ static PyObject *_wrap_wxToggleButton_GetValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToggleButton_GetValue(_arg0); + _result = (bool )wxToggleButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11483,26 +11048,13 @@ static PyObject *_wrap_wxToggleButton_SetLabel(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToggleButton_SetLabel(_arg0,*_arg1); + wxToggleButton_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index d80d1d4020..553d4a7906 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -90,12 +90,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif // C++ Version of a Python aware class class wxPyListCtrl : public wxListCtrl { DECLARE_ABSTRACT_CLASS(wxPyListCtrl); @@ -264,7 +258,7 @@ static PyObject *_wrap_new_wxListItemAttr(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItemAttr *)new_wxListItemAttr(*_arg0,*_arg1,*_arg2); + _result = (wxListItemAttr *)new_wxListItemAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -305,7 +299,7 @@ static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItemAttr_SetTextColour(_arg0,*_arg1); + wxListItemAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -341,7 +335,7 @@ static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItemAttr_SetBackgroundColour(_arg0,*_arg1); + wxListItemAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -378,7 +372,7 @@ static PyObject *_wrap_wxListItemAttr_SetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItemAttr_SetFont(_arg0,*_arg1); + wxListItemAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -407,7 +401,7 @@ static PyObject *_wrap_wxListItemAttr_HasTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItemAttr_HasTextColour(_arg0); + _result = (bool )wxListItemAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -435,7 +429,7 @@ static PyObject *_wrap_wxListItemAttr_HasBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0); + _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -463,7 +457,7 @@ static PyObject *_wrap_wxListItemAttr_HasFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItemAttr_HasFont(_arg0); + _result = (bool )wxListItemAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -492,7 +486,7 @@ static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItemAttr_GetTextColour(_arg0)); + _result = new wxColour (wxListItemAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -522,7 +516,7 @@ static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItemAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxListItemAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -552,7 +546,7 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxListItemAttr_GetFont(_arg0)); + _result = new wxFont (wxListItemAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -581,7 +575,7 @@ static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)new_wxListItem(); + _result = (wxListItem *)new_wxListItem(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -614,7 +608,7 @@ static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxListItem(_arg0); + delete_wxListItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -642,7 +636,7 @@ static PyObject *_wrap_wxListItem_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_Clear(_arg0); + wxListItem_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -670,7 +664,7 @@ static PyObject *_wrap_wxListItem_ClearAttributes(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_ClearAttributes(_arg0); + wxListItem_ClearAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -699,7 +693,7 @@ static PyObject *_wrap_wxListItem_SetMask(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetMask(_arg0,_arg1); + wxListItem_SetMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -728,7 +722,7 @@ static PyObject *_wrap_wxListItem_SetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetId(_arg0,_arg1); + wxListItem_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -757,7 +751,7 @@ static PyObject *_wrap_wxListItem_SetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetColumn(_arg0,_arg1); + wxListItem_SetColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -786,7 +780,7 @@ static PyObject *_wrap_wxListItem_SetState(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetState(_arg0,_arg1); + wxListItem_SetState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -815,7 +809,7 @@ static PyObject *_wrap_wxListItem_SetStateMask(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetStateMask(_arg0,_arg1); + wxListItem_SetStateMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -844,26 +838,13 @@ static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetText(_arg0,*_arg1); + wxListItem_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -896,7 +877,7 @@ static PyObject *_wrap_wxListItem_SetImage(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetImage(_arg0,_arg1); + wxListItem_SetImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -925,7 +906,7 @@ static PyObject *_wrap_wxListItem_SetData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetData(_arg0,_arg1); + wxListItem_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -954,7 +935,7 @@ static PyObject *_wrap_wxListItem_SetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetWidth(_arg0,_arg1); + wxListItem_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -983,7 +964,7 @@ static PyObject *_wrap_wxListItem_SetAlign(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetAlign(_arg0,_arg1); + wxListItem_SetAlign(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1019,7 +1000,7 @@ static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetTextColour(_arg0,*_arg1); + wxListItem_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1055,7 +1036,7 @@ static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetBackgroundColour(_arg0,*_arg1); + wxListItem_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1092,7 +1073,7 @@ static PyObject *_wrap_wxListItem_SetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetFont(_arg0,*_arg1); + wxListItem_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1121,7 +1102,7 @@ static PyObject *_wrap_wxListItem_GetMask(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetMask(_arg0); + _result = (long )wxListItem_GetMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1149,7 +1130,7 @@ static PyObject *_wrap_wxListItem_GetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetId(_arg0); + _result = (long )wxListItem_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1177,7 +1158,7 @@ static PyObject *_wrap_wxListItem_GetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_GetColumn(_arg0); + _result = (int )wxListItem_GetColumn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1205,7 +1186,7 @@ static PyObject *_wrap_wxListItem_GetState(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetState(_arg0); + _result = (long )wxListItem_GetState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1233,13 +1214,17 @@ static PyObject *_wrap_wxListItem_GetText(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxListItem_GetText(_arg0); + const wxString & _result_ref = wxListItem_GetText(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1264,7 +1249,7 @@ static PyObject *_wrap_wxListItem_GetImage(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_GetImage(_arg0); + _result = (int )wxListItem_GetImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1292,7 +1277,7 @@ static PyObject *_wrap_wxListItem_GetData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetData(_arg0); + _result = (long )wxListItem_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1320,7 +1305,7 @@ static PyObject *_wrap_wxListItem_GetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_GetWidth(_arg0); + _result = (int )wxListItem_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1348,7 +1333,7 @@ static PyObject *_wrap_wxListItem_GetAlign(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0); + _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1377,7 +1362,7 @@ static PyObject *_wrap_wxListItem_GetAttributes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0); + _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1396,7 @@ static PyObject *_wrap_wxListItem_HasAttributes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItem_HasAttributes(_arg0); + _result = (bool )wxListItem_HasAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1440,7 +1425,7 @@ static PyObject *_wrap_wxListItem_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItem_GetTextColour(_arg0)); + _result = new wxColour (wxListItem_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1470,7 +1455,7 @@ static PyObject *_wrap_wxListItem_GetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItem_GetBackgroundColour(_arg0)); + _result = new wxColour (wxListItem_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1500,7 +1485,7 @@ static PyObject *_wrap_wxListItem_GetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxListItem_GetFont(_arg0)); + _result = new wxFont (wxListItem_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1530,7 +1515,7 @@ static PyObject *_wrap_wxListItem_m_mask_set(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_mask_set(_arg0,_arg1); + _result = (long )wxListItem_m_mask_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1558,7 +1543,7 @@ static PyObject *_wrap_wxListItem_m_mask_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_mask_get(_arg0); + _result = (long )wxListItem_m_mask_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1587,7 +1572,7 @@ static PyObject *_wrap_wxListItem_m_itemId_set(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_itemId_set(_arg0,_arg1); + _result = (long )wxListItem_m_itemId_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1615,7 +1600,7 @@ static PyObject *_wrap_wxListItem_m_itemId_get(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_itemId_get(_arg0); + _result = (long )wxListItem_m_itemId_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1644,7 +1629,7 @@ static PyObject *_wrap_wxListItem_m_col_set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_col_set(_arg0,_arg1); + _result = (int )wxListItem_m_col_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1672,7 +1657,7 @@ static PyObject *_wrap_wxListItem_m_col_get(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_col_get(_arg0); + _result = (int )wxListItem_m_col_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1701,7 +1686,7 @@ static PyObject *_wrap_wxListItem_m_state_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_state_set(_arg0,_arg1); + _result = (long )wxListItem_m_state_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1729,7 +1714,7 @@ static PyObject *_wrap_wxListItem_m_state_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_state_get(_arg0); + _result = (long )wxListItem_m_state_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1758,7 +1743,7 @@ static PyObject *_wrap_wxListItem_m_stateMask_set(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_stateMask_set(_arg0,_arg1); + _result = (long )wxListItem_m_stateMask_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1786,7 +1771,7 @@ static PyObject *_wrap_wxListItem_m_stateMask_get(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_stateMask_get(_arg0); + _result = (long )wxListItem_m_stateMask_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1815,31 +1800,22 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxListItem_m_text_set(_arg0,_arg1); + _result = (wxString *)wxListItem_m_text_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1868,12 +1844,16 @@ static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxListItem_m_text_get(_arg0); + _result = (wxString *)wxListItem_m_text_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1899,7 +1879,7 @@ static PyObject *_wrap_wxListItem_m_image_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_image_set(_arg0,_arg1); + _result = (int )wxListItem_m_image_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1927,7 +1907,7 @@ static PyObject *_wrap_wxListItem_m_image_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_image_get(_arg0); + _result = (int )wxListItem_m_image_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1956,7 +1936,7 @@ static PyObject *_wrap_wxListItem_m_data_set(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_data_set(_arg0,_arg1); + _result = (long )wxListItem_m_data_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1984,7 +1964,7 @@ static PyObject *_wrap_wxListItem_m_data_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_data_get(_arg0); + _result = (long )wxListItem_m_data_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2013,7 +1993,7 @@ static PyObject *_wrap_wxListItem_m_format_set(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_format_set(_arg0,_arg1); + _result = (int )wxListItem_m_format_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2041,7 +2021,7 @@ static PyObject *_wrap_wxListItem_m_format_get(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_format_get(_arg0); + _result = (int )wxListItem_m_format_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2070,7 +2050,7 @@ static PyObject *_wrap_wxListItem_m_width_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_width_set(_arg0,_arg1); + _result = (int )wxListItem_m_width_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2098,7 +2078,7 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_width_get(_arg0); + _result = (int )wxListItem_m_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2152,7 +2132,7 @@ static PyObject *_wrap_new_wxListEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListEvent *)new_wxListEvent(_arg0,_arg1); + _result = (wxListEvent *)new_wxListEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2187,7 +2167,7 @@ static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_code_set(_arg0,_arg1); + _result = (int )wxListEvent_m_code_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2215,7 +2195,7 @@ static PyObject *_wrap_wxListEvent_m_code_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_code_get(_arg0); + _result = (int )wxListEvent_m_code_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2244,7 +2224,7 @@ static PyObject *_wrap_wxListEvent_m_oldItemIndex_set(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1); + _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2272,7 +2252,7 @@ static PyObject *_wrap_wxListEvent_m_oldItemIndex_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); + _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2301,7 +2281,7 @@ static PyObject *_wrap_wxListEvent_m_itemIndex_set(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_itemIndex_set(_arg0,_arg1); + _result = (long )wxListEvent_m_itemIndex_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2329,7 +2309,7 @@ static PyObject *_wrap_wxListEvent_m_itemIndex_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_itemIndex_get(_arg0); + _result = (long )wxListEvent_m_itemIndex_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2358,7 +2338,7 @@ static PyObject *_wrap_wxListEvent_m_col_set(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_col_set(_arg0,_arg1); + _result = (int )wxListEvent_m_col_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2386,7 +2366,7 @@ static PyObject *_wrap_wxListEvent_m_col_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_col_get(_arg0); + _result = (int )wxListEvent_m_col_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2423,7 +2403,7 @@ static PyObject *_wrap_wxListEvent_m_pointDrag_set(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxListEvent_m_pointDrag_set(_arg0,_arg1); + _result = (wxPoint *)wxListEvent_m_pointDrag_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2458,7 +2438,7 @@ static PyObject *_wrap_wxListEvent_m_pointDrag_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0); + _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2501,7 +2481,7 @@ static PyObject *_wrap_wxListEvent_m_item_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1); + _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2529,7 +2509,7 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxListEvent_m_item_get(_arg0); + _result = (wxListItem *)wxListEvent_m_item_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2557,7 +2537,7 @@ static PyObject *_wrap_wxListEvent_GetCode(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_GetCode(_arg0); + _result = (int )wxListEvent_GetCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2585,7 +2565,7 @@ static PyObject *_wrap_wxListEvent_GetIndex(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetIndex(_arg0); + _result = (long )wxListEvent_GetIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2613,7 +2593,7 @@ static PyObject *_wrap_wxListEvent_GetColumn(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_GetColumn(_arg0); + _result = (int )wxListEvent_GetColumn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2642,7 +2622,7 @@ static PyObject *_wrap_wxListEvent_GetPoint(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxListEvent_GetPoint(_arg0)); + _result = new wxPoint (wxListEvent_GetPoint(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2671,13 +2651,17 @@ static PyObject *_wrap_wxListEvent_GetLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxListEvent_GetLabel(_arg0); + const wxString & _result_ref = wxListEvent_GetLabel(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -2702,13 +2686,17 @@ static PyObject *_wrap_wxListEvent_GetText(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxListEvent_GetText(_arg0); + const wxString & _result_ref = wxListEvent_GetText(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -2733,7 +2721,7 @@ static PyObject *_wrap_wxListEvent_GetImage(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_GetImage(_arg0); + _result = (int )wxListEvent_GetImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2761,7 +2749,7 @@ static PyObject *_wrap_wxListEvent_GetData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetData(_arg0); + _result = (long )wxListEvent_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2789,7 +2777,7 @@ static PyObject *_wrap_wxListEvent_GetMask(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetMask(_arg0); + _result = (long )wxListEvent_GetMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2817,7 +2805,7 @@ static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxListItem & _result_ref = wxListEvent_GetItem(_arg0); + const wxListItem & _result_ref = wxListEvent_GetItem(_arg0); _result = (wxListItem *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2846,7 +2834,7 @@ static PyObject *_wrap_wxListEvent_GetCacheFrom(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetCacheFrom(_arg0); + _result = (long )wxListEvent_GetCacheFrom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2874,7 +2862,7 @@ static PyObject *_wrap_wxListEvent_GetCacheTo(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetCacheTo(_arg0); + _result = (long )wxListEvent_GetCacheTo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2965,7 +2953,7 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxPyListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2991,7 +2979,7 @@ static PyObject *_wrap_new_wxPreListCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyListCtrl *)new_wxPreListCtrl(); + _result = (wxPyListCtrl *)new_wxPreListCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3064,7 +3052,7 @@ static PyObject *_wrap_wxListCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3101,7 +3089,7 @@ static PyObject *_wrap_wxListCtrl__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl__setCallbackInfo(_arg0,_arg1,_arg2); + wxListCtrl__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3138,7 +3126,7 @@ static PyObject *_wrap_wxListCtrl_SetForegroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetForegroundColour(_arg0,*_arg1); + _result = (bool )wxListCtrl_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3174,7 +3162,7 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetBackgroundColour(_arg0,*_arg1); + _result = (bool )wxListCtrl_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3209,7 +3197,7 @@ static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxPyListCtrl_GetColumn(_arg0,_arg1); + _result = (wxListItem *)wxPyListCtrl_GetColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3247,7 +3235,7 @@ static PyObject *_wrap_wxListCtrl_SetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2); + _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3276,7 +3264,7 @@ static PyObject *_wrap_wxListCtrl_GetColumnWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1); + _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3306,7 +3294,7 @@ static PyObject *_wrap_wxListCtrl_SetColumnWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2); + _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3334,7 +3322,7 @@ static PyObject *_wrap_wxListCtrl_GetCountPerPage(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetCountPerPage(_arg0); + _result = (int )wxListCtrl_GetCountPerPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3371,7 +3359,7 @@ static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxPyListCtrl_GetItem(_arg0,_arg1,_arg2); + _result = (wxListItem *)wxPyListCtrl_GetItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3408,7 +3396,7 @@ static PyObject *_wrap_wxListCtrl_SetItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1); + _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3440,26 +3428,13 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_SetStringItem(_arg0,_arg1,_arg2,*_arg3,_arg4); + _result = (long )wxListCtrl_SetStringItem(_arg0,_arg1,_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3493,7 +3468,7 @@ static PyObject *_wrap_wxListCtrl_GetItemState(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2); + _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3524,7 +3499,7 @@ static PyObject *_wrap_wxListCtrl_SetItemState(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3555,7 +3530,7 @@ static PyObject *_wrap_wxListCtrl_SetItemImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3584,12 +3559,16 @@ static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1)); + _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3618,26 +3597,13 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetItemText(_arg0,_arg1,*_arg2); + wxListCtrl_SetItemText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3671,7 +3637,7 @@ static PyObject *_wrap_wxListCtrl_GetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_GetItemData(_arg0,_arg1); + _result = (long )wxListCtrl_GetItemData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3701,7 +3667,7 @@ static PyObject *_wrap_wxListCtrl_SetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2); + _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3735,7 +3701,7 @@ static PyObject *_wrap_wxListCtrl_GetItemPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxPyListCtrl_GetItemPosition(_arg0,_arg1); + _result = (wxPoint *)wxPyListCtrl_GetItemPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3776,7 +3742,7 @@ static PyObject *_wrap_wxListCtrl_GetItemRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)wxPyListCtrl_GetItemRect(_arg0,_arg1,_arg2); + _result = (wxRect *)wxPyListCtrl_GetItemRect(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3819,7 +3785,7 @@ static PyObject *_wrap_wxListCtrl_SetItemPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2); + _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3847,7 +3813,7 @@ static PyObject *_wrap_wxListCtrl_GetItemCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetItemCount(_arg0); + _result = (int )wxListCtrl_GetItemCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3875,7 +3841,7 @@ static PyObject *_wrap_wxListCtrl_GetColumnCount(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetColumnCount(_arg0); + _result = (int )wxListCtrl_GetColumnCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3906,7 +3872,7 @@ static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1); + _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3934,7 +3900,7 @@ static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetSelectedItemCount(_arg0); + _result = (int )wxListCtrl_GetSelectedItemCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3963,7 +3929,7 @@ static PyObject *_wrap_wxListCtrl_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); + _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3999,7 +3965,7 @@ static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetTextColour(_arg0,*_arg1); + wxListCtrl_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4028,7 +3994,7 @@ static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_GetTopItem(_arg0); + _result = (long )wxListCtrl_GetTopItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4059,7 +4025,7 @@ static PyObject *_wrap_wxListCtrl_SetSingleStyle(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2); + wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4088,7 +4054,7 @@ static PyObject *_wrap_wxListCtrl_SetWindowStyleFlag(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetWindowStyleFlag(_arg0,_arg1); + wxListCtrl_SetWindowStyleFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4120,7 +4086,7 @@ static PyObject *_wrap_wxListCtrl_GetNextItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3); + _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4149,7 +4115,7 @@ static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); + _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4186,7 +4152,7 @@ static PyObject *_wrap_wxListCtrl_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetImageList(_arg0,_arg1,_arg2); + wxListCtrl_SetImageList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4224,7 +4190,7 @@ static PyObject *_wrap_wxListCtrl_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_AssignImageList(_arg0,_arg1,_arg2); + wxListCtrl_AssignImageList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4253,7 +4219,7 @@ static PyObject *_wrap_wxListCtrl_IsVirtual(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_IsVirtual(_arg0); + _result = (bool )wxListCtrl_IsVirtual(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4281,7 +4247,7 @@ static PyObject *_wrap_wxListCtrl_RefreshItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_RefreshItem(_arg0,_arg1); + wxListCtrl_RefreshItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4311,7 +4277,7 @@ static PyObject *_wrap_wxListCtrl_RefreshItems(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_RefreshItems(_arg0,_arg1,_arg2); + wxListCtrl_RefreshItems(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4341,7 +4307,7 @@ static PyObject *_wrap_wxListCtrl_Arrange(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_Arrange(_arg0,_arg1); + _result = (bool )wxListCtrl_Arrange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4370,7 +4336,7 @@ static PyObject *_wrap_wxListCtrl_DeleteItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1); + _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4398,7 +4364,7 @@ static PyObject *_wrap_wxListCtrl_DeleteAllItems(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteAllItems(_arg0); + _result = (bool )wxListCtrl_DeleteAllItems(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4427,7 +4393,7 @@ static PyObject *_wrap_wxListCtrl_DeleteColumn(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1); + _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4455,7 +4421,7 @@ static PyObject *_wrap_wxListCtrl_DeleteAllColumns(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteAllColumns(_arg0); + _result = (bool )wxListCtrl_DeleteAllColumns(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4482,7 +4448,7 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_ClearAll(_arg0); + wxListCtrl_ClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4512,7 +4478,7 @@ static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1); + _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4544,27 +4510,14 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3); + _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4598,7 +4551,7 @@ static PyObject *_wrap_wxListCtrl_FindItemData(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2); + _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4636,7 +4589,7 @@ static PyObject *_wrap_wxListCtrl_FindItemAtPos(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3); + _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4677,7 +4630,7 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2); + _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4719,7 +4672,7 @@ static PyObject *_wrap_wxListCtrl_InsertItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1); + _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4749,26 +4702,13 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4802,7 +4742,7 @@ static PyObject *_wrap_wxListCtrl_InsertImageItem(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2); + _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4833,26 +4773,13 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3); + _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4894,7 +4821,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4926,26 +4853,13 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4977,7 +4891,7 @@ static PyObject *_wrap_wxListCtrl_SetItemCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetItemCount(_arg0,_arg1); + wxListCtrl_SetItemCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5008,7 +4922,7 @@ static PyObject *_wrap_wxListCtrl_ScrollList(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2); + _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5045,7 +4959,7 @@ static PyObject *_wrap_wxListCtrl_SortItems(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyListCtrl_SortItems(_arg0,_arg1); + _result = (bool )wxPyListCtrl_SortItems(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5145,26 +5059,13 @@ static PyObject *_wrap_new_wxListView(PyObject *self, PyObject *args, PyObject * } if (_obj6) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg6 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) return NULL; - } - _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListView *)new_wxListView(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6); + _result = (wxListView *)new_wxListView(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5194,7 +5095,7 @@ static PyObject *_wrap_new_wxPreListView(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListView *)new_wxPreListView(); + _result = (wxListView *)new_wxPreListView(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5268,26 +5169,13 @@ static PyObject *_wrap_wxListView_Create(PyObject *self, PyObject *args, PyObjec } if (_obj7) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg7 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) return NULL; - } - _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListView_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); + _result = (bool )wxListView_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5322,7 +5210,7 @@ static PyObject *_wrap_wxListView_Select(PyObject *self, PyObject *args, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_Select(_arg0,_arg1,_arg2); + wxListView_Select(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5351,7 +5239,7 @@ static PyObject *_wrap_wxListView_Focus(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_Focus(_arg0,_arg1); + wxListView_Focus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5380,7 +5268,7 @@ static PyObject *_wrap_wxListView_GetFocusedItem(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListView_GetFocusedItem(_arg0); + _result = (long )wxListView_GetFocusedItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5409,7 +5297,7 @@ static PyObject *_wrap_wxListView_GetNextSelected(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListView_GetNextSelected(_arg0,_arg1); + _result = (long )wxListView_GetNextSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5437,7 +5325,7 @@ static PyObject *_wrap_wxListView_GetFirstSelected(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListView_GetFirstSelected(_arg0); + _result = (long )wxListView_GetFirstSelected(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5466,7 +5354,7 @@ static PyObject *_wrap_wxListView_IsSelected(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListView_IsSelected(_arg0,_arg1); + _result = (bool )wxListView_IsSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5495,7 +5383,7 @@ static PyObject *_wrap_wxListView_SetColumnImage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_SetColumnImage(_arg0,_arg1,_arg2); + wxListView_SetColumnImage(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5524,7 +5412,7 @@ static PyObject *_wrap_wxListView_ClearColumnImage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_ClearColumnImage(_arg0,_arg1); + wxListView_ClearColumnImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5572,7 +5460,7 @@ static PyObject *_wrap_new_wxTreeItemAttr(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeItemAttr *)new_wxTreeItemAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTreeItemAttr *)new_wxTreeItemAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5613,7 +5501,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemAttr_SetTextColour(_arg0,*_arg1); + wxTreeItemAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5649,7 +5537,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemAttr_SetBackgroundColour(_arg0,*_arg1); + wxTreeItemAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5686,7 +5574,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemAttr_SetFont(_arg0,*_arg1); + wxTreeItemAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5715,7 +5603,7 @@ static PyObject *_wrap_wxTreeItemAttr_HasTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemAttr_HasTextColour(_arg0); + _result = (bool )wxTreeItemAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5743,7 +5631,7 @@ static PyObject *_wrap_wxTreeItemAttr_HasBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemAttr_HasBackgroundColour(_arg0); + _result = (bool )wxTreeItemAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5771,7 +5659,7 @@ static PyObject *_wrap_wxTreeItemAttr_HasFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemAttr_HasFont(_arg0); + _result = (bool )wxTreeItemAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5800,7 +5688,7 @@ static PyObject *_wrap_wxTreeItemAttr_GetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTreeItemAttr_GetTextColour(_arg0)); + _result = new wxColour (wxTreeItemAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5830,7 +5718,7 @@ static PyObject *_wrap_wxTreeItemAttr_GetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTreeItemAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxTreeItemAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5860,7 +5748,7 @@ static PyObject *_wrap_wxTreeItemAttr_GetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxTreeItemAttr_GetFont(_arg0)); + _result = new wxFont (wxTreeItemAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5881,7 +5769,7 @@ static PyObject *_wrap_new_wxTreeItemId(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeItemId *)new_wxTreeItemId(); + _result = (wxTreeItemId *)new_wxTreeItemId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5914,7 +5802,7 @@ static PyObject *_wrap_delete_wxTreeItemId(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTreeItemId(_arg0); + delete_wxTreeItemId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5943,7 +5831,7 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemId_IsOk(_arg0); + _result = (bool )wxTreeItemId_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5983,7 +5871,7 @@ static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeItemId___cmp__(_arg0,_arg1); + _result = (int )wxTreeItemId___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6017,7 +5905,7 @@ static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeItemData *)new_wxTreeItemData(_arg0); + _result = (wxPyTreeItemData *)new_wxTreeItemData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6051,7 +5939,7 @@ static PyObject *_wrap_wxTreeItemData_GetData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxTreeItemData_GetData(_arg0); + _result = (PyObject *)wxTreeItemData_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6085,7 +5973,7 @@ static PyObject *_wrap_wxTreeItemData_SetData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemData_SetData(_arg0,_arg1); + wxTreeItemData_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6115,7 +6003,7 @@ static PyObject *_wrap_wxTreeItemData_GetId(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxTreeItemId & _result_ref = wxTreeItemData_GetId(_arg0); + const wxTreeItemId & _result_ref = wxTreeItemData_GetId(_arg0); _result = (wxTreeItemId *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6158,7 +6046,7 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemData_SetId(_arg0,*_arg1); + wxTreeItemData_SetId(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6213,7 +6101,7 @@ static PyObject *_wrap_new_wxTreeEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeEvent *)new_wxTreeEvent(_arg0,_arg1); + _result = (wxTreeEvent *)new_wxTreeEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6248,7 +6136,7 @@ static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeEvent_GetItem(_arg0)); + _result = new wxTreeItemId (wxTreeEvent_GetItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6278,7 +6166,7 @@ static PyObject *_wrap_wxTreeEvent_GetOldItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0)); + _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6308,7 +6196,7 @@ static PyObject *_wrap_wxTreeEvent_GetPoint(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxTreeEvent_GetPoint(_arg0)); + _result = new wxPoint (wxTreeEvent_GetPoint(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6338,7 +6226,7 @@ static PyObject *_wrap_wxTreeEvent_GetKeyEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); + const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); _result = (wxKeyEvent *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6373,7 +6261,7 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeEvent_GetCode(_arg0); + _result = (int )wxTreeEvent_GetCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6401,13 +6289,17 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); + const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -6495,7 +6387,7 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6521,7 +6413,7 @@ static PyObject *_wrap_new_wxPreTreeCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeCtrl *)new_wxPreTreeCtrl(); + _result = (wxPyTreeCtrl *)new_wxPreTreeCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6594,7 +6486,7 @@ static PyObject *_wrap_wxTreeCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxTreeCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6631,7 +6523,7 @@ static PyObject *_wrap_wxTreeCtrl__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl__setCallbackInfo(_arg0,_arg1,_arg2); + wxTreeCtrl__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6660,7 +6552,7 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTreeCtrl_GetCount(_arg0); + _result = (size_t )wxTreeCtrl_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6688,7 +6580,7 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned int )wxTreeCtrl_GetIndent(_arg0); + _result = (unsigned int )wxTreeCtrl_GetIndent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6716,7 +6608,7 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetIndent(_arg0,_arg1); + wxTreeCtrl_SetIndent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6745,7 +6637,7 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0); + _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6773,7 +6665,7 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0); + _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6809,7 +6701,7 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetImageList(_arg0,_arg1); + wxTreeCtrl_SetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6846,7 +6738,7 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetStateImageList(_arg0,_arg1); + wxTreeCtrl_SetStateImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6883,7 +6775,7 @@ static PyObject *_wrap_wxTreeCtrl_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_AssignImageList(_arg0,_arg1); + wxTreeCtrl_AssignImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6920,7 +6812,7 @@ static PyObject *_wrap_wxTreeCtrl_AssignStateImageList(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_AssignStateImageList(_arg0,_arg1); + wxTreeCtrl_AssignStateImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6949,7 +6841,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned int )wxTreeCtrl_GetSpacing(_arg0); + _result = (unsigned int )wxTreeCtrl_GetSpacing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6977,7 +6869,7 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetSpacing(_arg0,_arg1); + wxTreeCtrl_SetSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7015,12 +6907,16 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTreeCtrl_GetItemText(_arg0,*_arg1)); + _result = new wxString (wxTreeCtrl_GetItemText(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7058,7 +6954,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeCtrl_GetItemImage(_arg0,*_arg1,_arg2); + _result = (int )wxTreeCtrl_GetItemImage(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7095,7 +6991,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeCtrl_GetItemSelectedImage(_arg0,*_arg1); + _result = (int )wxTreeCtrl_GetItemSelectedImage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7132,26 +7028,13 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemText(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7194,7 +7077,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemImage(_arg0,*_arg1,_arg2,_arg3); + wxTreeCtrl_SetItemImage(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7232,7 +7115,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemSelectedImage(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemSelectedImage(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7272,7 +7155,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7319,7 +7202,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1); + _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7373,7 +7256,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7419,7 +7302,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1); + _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7470,7 +7353,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7508,7 +7391,7 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsVisible(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsVisible(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7545,7 +7428,7 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7582,7 +7465,7 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsExpanded(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsExpanded(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7619,7 +7502,7 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsSelected(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsSelected(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7648,7 +7531,7 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetRootItem(_arg0)); + _result = new wxTreeItemId (wxTreeCtrl_GetRootItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7678,7 +7561,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetSelection(_arg0)); + _result = new wxTreeItemId (wxTreeCtrl_GetSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7717,7 +7600,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetItemParent(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetItemParent(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7759,7 +7642,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0); + _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7801,7 +7684,7 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2); + _result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7846,7 +7729,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetFirstChild(_arg0,*_arg1,*_arg2)); + _result = new wxTreeItemId (wxTreeCtrl_GetFirstChild(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7897,7 +7780,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetNextChild(_arg0,*_arg1,*_arg2)); + _result = new wxTreeItemId (wxTreeCtrl_GetNextChild(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7941,7 +7824,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetNextSibling(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetNextSibling(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7980,7 +7863,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetPrevSibling(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetPrevSibling(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8010,7 +7893,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetFirstVisibleItem(_arg0)); + _result = new wxTreeItemId (wxTreeCtrl_GetFirstVisibleItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8049,7 +7932,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetNextVisible(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetNextVisible(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8088,7 +7971,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetPrevVisible(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetPrevVisible(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8127,7 +8010,7 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8162,22 +8045,9 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -8188,7 +8058,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_AddRoot(_arg0,*_arg1,_arg2,_arg3,_arg4)); + _result = new wxTreeItemId (wxTreeCtrl_AddRoot(_arg0,*_arg1,_arg2,_arg3,_arg4)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8236,22 +8106,9 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -8262,7 +8119,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_PrependItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); + _result = new wxTreeItemId (wxTreeCtrl_PrependItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8319,22 +8176,9 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8345,7 +8189,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_InsertItem(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6)); + _result = new wxTreeItemId (wxTreeCtrl_InsertItem(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8394,22 +8238,9 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8420,7 +8251,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6)); + _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8468,22 +8299,9 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -8494,7 +8312,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_AppendItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); + _result = new wxTreeItemId (wxTreeCtrl_AppendItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8535,7 +8353,7 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Delete(_arg0,*_arg1); + wxTreeCtrl_Delete(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8572,7 +8390,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_DeleteChildren(_arg0,*_arg1); + wxTreeCtrl_DeleteChildren(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8600,7 +8418,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_DeleteAllItems(_arg0); + wxTreeCtrl_DeleteAllItems(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8637,7 +8455,7 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Expand(_arg0,*_arg1); + wxTreeCtrl_Expand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8674,7 +8492,7 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Collapse(_arg0,*_arg1); + wxTreeCtrl_Collapse(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8711,7 +8529,7 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_CollapseAndReset(_arg0,*_arg1); + wxTreeCtrl_CollapseAndReset(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8748,7 +8566,7 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Toggle(_arg0,*_arg1); + wxTreeCtrl_Toggle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8776,7 +8594,7 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Unselect(_arg0); + wxTreeCtrl_Unselect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8804,7 +8622,7 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_UnselectAll(_arg0); + wxTreeCtrl_UnselectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8841,7 +8659,7 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SelectItem(_arg0,*_arg1); + wxTreeCtrl_SelectItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8878,7 +8696,7 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_EnsureVisible(_arg0,*_arg1); + wxTreeCtrl_EnsureVisible(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8915,7 +8733,7 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_ScrollTo(_arg0,*_arg1); + wxTreeCtrl_ScrollTo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8952,7 +8770,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_EditLabel(_arg0,*_arg1); + wxTreeCtrl_EditLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8989,7 +8807,7 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SortChildren(_arg0,*_arg1); + wxTreeCtrl_SortChildren(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9027,7 +8845,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9065,7 +8883,7 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9107,7 +8925,7 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2)); + _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9157,7 +8975,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9202,7 +9020,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9248,7 +9066,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9300,7 +9118,7 @@ static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); + _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9335,45 +9153,19 @@ static PyObject *_wrap_new_wxDirItemData(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:new_wxDirItemData",_kwnames,&_obj0,&_obj1,&tempbool2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirItemData *)new_wxDirItemData(*_arg0,*_arg1,_arg2); + _result = (wxDirItemData *)new_wxDirItemData(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9415,26 +9207,13 @@ static PyObject *_wrap_wxDirItemData_SetNewDirName(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirItemData_SetNewDirName(_arg0,*_arg1); + wxDirItemData_SetNewDirName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9468,31 +9247,22 @@ static PyObject *_wrap_wxDirItemData_m_path_set(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_path_set(_arg0,_arg1); + _result = (wxString *)wxDirItemData_m_path_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -9521,12 +9291,16 @@ static PyObject *_wrap_wxDirItemData_m_path_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_path_get(_arg0); + _result = (wxString *)wxDirItemData_m_path_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -9552,31 +9326,22 @@ static PyObject *_wrap_wxDirItemData_m_name_set(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_name_set(_arg0,_arg1); + _result = (wxString *)wxDirItemData_m_name_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -9605,12 +9370,16 @@ static PyObject *_wrap_wxDirItemData_m_name_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_name_get(_arg0); + _result = (wxString *)wxDirItemData_m_name_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -9638,7 +9407,7 @@ static PyObject *_wrap_wxDirItemData_m_isHidden_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isHidden_set(_arg0,_arg1); + _result = (bool )wxDirItemData_m_isHidden_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9666,7 +9435,7 @@ static PyObject *_wrap_wxDirItemData_m_isHidden_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isHidden_get(_arg0); + _result = (bool )wxDirItemData_m_isHidden_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9697,7 +9466,7 @@ static PyObject *_wrap_wxDirItemData_m_isExpanded_set(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isExpanded_set(_arg0,_arg1); + _result = (bool )wxDirItemData_m_isExpanded_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9725,7 +9494,7 @@ static PyObject *_wrap_wxDirItemData_m_isExpanded_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isExpanded_get(_arg0); + _result = (bool )wxDirItemData_m_isExpanded_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9756,7 +9525,7 @@ static PyObject *_wrap_wxDirItemData_m_isDir_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isDir_set(_arg0,_arg1); + _result = (bool )wxDirItemData_m_isDir_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9784,7 +9553,7 @@ static PyObject *_wrap_wxDirItemData_m_isDir_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isDir_get(_arg0); + _result = (bool )wxDirItemData_m_isDir_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9869,7 +9638,7 @@ static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8); + _result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9895,7 +9664,7 @@ static PyObject *_wrap_new_wxPreGenericDirCtrl(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDirCtrl *)new_wxPreGenericDirCtrl(); + _result = (wxGenericDirCtrl *)new_wxPreGenericDirCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9962,7 +9731,7 @@ static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9991,26 +9760,13 @@ static PyObject *_wrap_wxGenericDirCtrl_ExpandPath(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGenericDirCtrl_ExpandPath(_arg0,*_arg1); + _result = (bool )wxGenericDirCtrl_ExpandPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10042,12 +9798,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetDefaultPath(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetDefaultPath(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetDefaultPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10075,26 +9835,13 @@ static PyObject *_wrap_wxGenericDirCtrl_SetDefaultPath(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetDefaultPath(_arg0,*_arg1); + wxGenericDirCtrl_SetDefaultPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10127,12 +9874,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetPath(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetPath(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10160,12 +9911,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilePath(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetFilePath(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetFilePath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10193,26 +9948,13 @@ static PyObject *_wrap_wxGenericDirCtrl_SetPath(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetPath(_arg0,*_arg1); + wxGenericDirCtrl_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10247,7 +9989,7 @@ static PyObject *_wrap_wxGenericDirCtrl_ShowHidden(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_ShowHidden(_arg0,_arg1); + wxGenericDirCtrl_ShowHidden(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10276,7 +10018,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetShowHidden(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGenericDirCtrl_GetShowHidden(_arg0); + _result = (bool )wxGenericDirCtrl_GetShowHidden(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10304,12 +10046,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilter(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetFilter(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetFilter(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10337,26 +10083,13 @@ static PyObject *_wrap_wxGenericDirCtrl_SetFilter(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetFilter(_arg0,*_arg1); + wxGenericDirCtrl_SetFilter(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10389,7 +10122,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilterIndex(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGenericDirCtrl_GetFilterIndex(_arg0); + _result = (int )wxGenericDirCtrl_GetFilterIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10417,7 +10150,7 @@ static PyObject *_wrap_wxGenericDirCtrl_SetFilterIndex(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetFilterIndex(_arg0,_arg1); + wxGenericDirCtrl_SetFilterIndex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10447,7 +10180,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetRootId(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxGenericDirCtrl_GetRootId(_arg0)); + _result = new wxTreeItemId (wxGenericDirCtrl_GetRootId(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10477,7 +10210,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeCtrl *)wxGenericDirCtrl_GetTreeCtrl(_arg0); + _result = (wxTreeCtrl *)wxGenericDirCtrl_GetTreeCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10512,7 +10245,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilterListCtrl(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirFilterListCtrl *)wxGenericDirCtrl_GetFilterListCtrl(_arg0); + _result = (wxDirFilterListCtrl *)wxGenericDirCtrl_GetFilterListCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10615,7 +10348,7 @@ static PyObject *_wrap_new_wxDirFilterListCtrl(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirFilterListCtrl *)new_wxDirFilterListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxDirFilterListCtrl *)new_wxDirFilterListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10641,7 +10374,7 @@ static PyObject *_wrap_new_wxPreDirFilterListCtrl(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirFilterListCtrl *)new_wxPreDirFilterListCtrl(); + _result = (wxDirFilterListCtrl *)new_wxPreDirFilterListCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10704,7 +10437,7 @@ static PyObject *_wrap_wxDirFilterListCtrl_Create(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirFilterListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); + _result = (bool )wxDirFilterListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10733,26 +10466,13 @@ static PyObject *_wrap_wxDirFilterListCtrl_FillFilterList(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirFilterListCtrl_FillFilterList(_arg0,*_arg1,_arg2); + wxDirFilterListCtrl_FillFilterList(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index b5fca3d48c..926dc12ef0 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -103,7 +97,7 @@ static PyObject *_wrap_wxNewEventType(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNewEventType(); + _result = (int )wxNewEventType(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -138,7 +132,7 @@ static PyObject *_wrap_delete_wxEvent(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxEvent(_arg0); + delete_wxEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -167,7 +161,7 @@ static PyObject *_wrap_wxEvent_GetEventObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxObject *)wxEvent_GetEventObject(_arg0); + _result = (wxObject *)wxEvent_GetEventObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -195,7 +189,7 @@ static PyObject *_wrap_wxEvent_GetEventType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEventType )wxEvent_GetEventType(_arg0); + _result = (wxEventType )wxEvent_GetEventType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -223,7 +217,7 @@ static PyObject *_wrap_wxEvent_GetId(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxEvent_GetId(_arg0); + _result = (int )wxEvent_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -251,7 +245,7 @@ static PyObject *_wrap_wxEvent_GetSkipped(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvent_GetSkipped(_arg0); + _result = (bool )wxEvent_GetSkipped(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -279,7 +273,7 @@ static PyObject *_wrap_wxEvent_GetTimestamp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxEvent_GetTimestamp(_arg0); + _result = (long )wxEvent_GetTimestamp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -315,7 +309,7 @@ static PyObject *_wrap_wxEvent_SetEventObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetEventObject(_arg0,_arg1); + wxEvent_SetEventObject(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -344,7 +338,7 @@ static PyObject *_wrap_wxEvent_SetEventType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetEventType(_arg0,_arg1); + wxEvent_SetEventType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -373,7 +367,7 @@ static PyObject *_wrap_wxEvent_SetId(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetId(_arg0,_arg1); + wxEvent_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -402,7 +396,7 @@ static PyObject *_wrap_wxEvent_SetTimestamp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetTimestamp(_arg0,_arg1); + wxEvent_SetTimestamp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -433,7 +427,7 @@ static PyObject *_wrap_wxEvent_Skip(PyObject *self, PyObject *args, PyObject *kw _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_Skip(_arg0,_arg1); + wxEvent_Skip(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -463,7 +457,7 @@ static PyObject *_wrap_wxEvent_Clone(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvent *)wxEvent_Clone(_arg0); + _result = (wxEvent *)wxEvent_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -514,7 +508,7 @@ static PyObject *_wrap_new_wxSizeEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizeEvent *)new_wxSizeEvent(*_arg0,_arg1); + _result = (wxSizeEvent *)new_wxSizeEvent(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -549,7 +543,7 @@ static PyObject *_wrap_wxSizeEvent_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizeEvent_GetSize(_arg0)); + _result = new wxSize (wxSizeEvent_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -588,7 +582,7 @@ static PyObject *_wrap_new_wxCloseEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCloseEvent *)new_wxCloseEvent(_arg0,_arg1); + _result = (wxCloseEvent *)new_wxCloseEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -624,7 +618,7 @@ static PyObject *_wrap_wxCloseEvent_SetLoggingOff(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCloseEvent_SetLoggingOff(_arg0,_arg1); + wxCloseEvent_SetLoggingOff(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -653,7 +647,7 @@ static PyObject *_wrap_wxCloseEvent_GetLoggingOff(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCloseEvent_GetLoggingOff(_arg0); + _result = (bool )wxCloseEvent_GetLoggingOff(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -683,7 +677,7 @@ static PyObject *_wrap_wxCloseEvent_Veto(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCloseEvent_Veto(_arg0,_arg1); + wxCloseEvent_Veto(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -712,7 +706,7 @@ static PyObject *_wrap_wxCloseEvent_CanVeto(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCloseEvent_CanVeto(_arg0); + _result = (bool )wxCloseEvent_CanVeto(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -740,7 +734,7 @@ static PyObject *_wrap_wxCloseEvent_GetVeto(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCloseEvent_GetVeto(_arg0); + _result = (bool )wxCloseEvent_GetVeto(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -770,7 +764,7 @@ static PyObject *_wrap_wxCloseEvent_SetCanVeto(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCloseEvent_SetCanVeto(_arg0,_arg1); + wxCloseEvent_SetCanVeto(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -809,7 +803,7 @@ static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCommandEvent *)new_wxCommandEvent(_arg0,_arg1); + _result = (wxCommandEvent *)new_wxCommandEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -843,7 +837,7 @@ static PyObject *_wrap_wxCommandEvent_IsChecked(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCommandEvent_IsChecked(_arg0); + _result = (bool )wxCommandEvent_IsChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -871,7 +865,7 @@ static PyObject *_wrap_wxCommandEvent_GetExtraLong(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxCommandEvent_GetExtraLong(_arg0); + _result = (long )wxCommandEvent_GetExtraLong(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -899,7 +893,7 @@ static PyObject *_wrap_wxCommandEvent_GetInt(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCommandEvent_GetInt(_arg0); + _result = (int )wxCommandEvent_GetInt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -927,7 +921,7 @@ static PyObject *_wrap_wxCommandEvent_GetSelection(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCommandEvent_GetSelection(_arg0); + _result = (int )wxCommandEvent_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -955,12 +949,16 @@ static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxCommandEvent_GetString(_arg0)); + _result = new wxString (wxCommandEvent_GetString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -988,7 +986,7 @@ static PyObject *_wrap_wxCommandEvent_IsSelection(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCommandEvent_IsSelection(_arg0); + _result = (bool )wxCommandEvent_IsSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1016,26 +1014,13 @@ static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCommandEvent_SetString(_arg0,*_arg1); + wxCommandEvent_SetString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1068,7 +1053,7 @@ static PyObject *_wrap_wxCommandEvent_SetExtraLong(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCommandEvent_SetExtraLong(_arg0,_arg1); + wxCommandEvent_SetExtraLong(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1097,7 +1082,7 @@ static PyObject *_wrap_wxCommandEvent_SetInt(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCommandEvent_SetInt(_arg0,_arg1); + wxCommandEvent_SetInt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1135,7 +1120,7 @@ static PyObject *_wrap_wxCommandEvent_GetClientData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxCommandEvent_GetClientData(_arg0); + _result = (PyObject *)wxCommandEvent_GetClientData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1185,7 +1170,7 @@ static PyObject *_wrap_new_wxScrollEvent(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollEvent *)new_wxScrollEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxScrollEvent *)new_wxScrollEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1219,7 +1204,7 @@ static PyObject *_wrap_wxScrollEvent_GetOrientation(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollEvent_GetOrientation(_arg0); + _result = (int )wxScrollEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1247,7 +1232,7 @@ static PyObject *_wrap_wxScrollEvent_GetPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollEvent_GetPosition(_arg0); + _result = (int )wxScrollEvent_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1286,7 +1271,7 @@ static PyObject *_wrap_new_wxScrollWinEvent(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollWinEvent *)new_wxScrollWinEvent(_arg0,_arg1,_arg2); + _result = (wxScrollWinEvent *)new_wxScrollWinEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1320,7 +1305,7 @@ static PyObject *_wrap_wxScrollWinEvent_GetOrientation(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollWinEvent_GetOrientation(_arg0); + _result = (int )wxScrollWinEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1348,7 +1333,7 @@ static PyObject *_wrap_wxScrollWinEvent_GetPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollWinEvent_GetPosition(_arg0); + _result = (int )wxScrollWinEvent_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1402,7 +1387,7 @@ static PyObject *_wrap_new_wxSpinEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinEvent *)new_wxSpinEvent(_arg0,_arg1); + _result = (wxSpinEvent *)new_wxSpinEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1445,7 +1430,7 @@ static PyObject *_wrap_new_wxMouseEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMouseEvent *)new_wxMouseEvent(_arg0); + _result = (wxMouseEvent *)new_wxMouseEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1464,7 @@ static PyObject *_wrap_wxMouseEvent_IsButton(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_IsButton(_arg0); + _result = (bool )wxMouseEvent_IsButton(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1508,7 +1493,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonDown(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1537,7 +1522,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonDClick(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonDClick(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonDClick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1566,7 +1551,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonUp(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonUp(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1595,7 +1580,7 @@ static PyObject *_wrap_wxMouseEvent_Button(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Button(_arg0,_arg1); + _result = (bool )wxMouseEvent_Button(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1624,7 +1609,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonIsDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonIsDown(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonIsDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1652,7 +1637,7 @@ static PyObject *_wrap_wxMouseEvent_ControlDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ControlDown(_arg0); + _result = (bool )wxMouseEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1680,7 +1665,7 @@ static PyObject *_wrap_wxMouseEvent_MetaDown(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MetaDown(_arg0); + _result = (bool )wxMouseEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1708,7 +1693,7 @@ static PyObject *_wrap_wxMouseEvent_AltDown(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_AltDown(_arg0); + _result = (bool )wxMouseEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1736,7 +1721,7 @@ static PyObject *_wrap_wxMouseEvent_ShiftDown(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ShiftDown(_arg0); + _result = (bool )wxMouseEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1764,7 +1749,7 @@ static PyObject *_wrap_wxMouseEvent_LeftDown(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftDown(_arg0); + _result = (bool )wxMouseEvent_LeftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1792,7 +1777,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleDown(_arg0); + _result = (bool )wxMouseEvent_MiddleDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1820,7 +1805,7 @@ static PyObject *_wrap_wxMouseEvent_RightDown(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightDown(_arg0); + _result = (bool )wxMouseEvent_RightDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1848,7 +1833,7 @@ static PyObject *_wrap_wxMouseEvent_LeftUp(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftUp(_arg0); + _result = (bool )wxMouseEvent_LeftUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1876,7 +1861,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleUp(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleUp(_arg0); + _result = (bool )wxMouseEvent_MiddleUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1904,7 +1889,7 @@ static PyObject *_wrap_wxMouseEvent_RightUp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightUp(_arg0); + _result = (bool )wxMouseEvent_RightUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1932,7 +1917,7 @@ static PyObject *_wrap_wxMouseEvent_LeftDClick(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftDClick(_arg0); + _result = (bool )wxMouseEvent_LeftDClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1960,7 +1945,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleDClick(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleDClick(_arg0); + _result = (bool )wxMouseEvent_MiddleDClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1988,7 +1973,7 @@ static PyObject *_wrap_wxMouseEvent_RightDClick(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightDClick(_arg0); + _result = (bool )wxMouseEvent_RightDClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2016,7 +2001,7 @@ static PyObject *_wrap_wxMouseEvent_LeftIsDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftIsDown(_arg0); + _result = (bool )wxMouseEvent_LeftIsDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2044,7 +2029,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleIsDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleIsDown(_arg0); + _result = (bool )wxMouseEvent_MiddleIsDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2072,7 +2057,7 @@ static PyObject *_wrap_wxMouseEvent_RightIsDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightIsDown(_arg0); + _result = (bool )wxMouseEvent_RightIsDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2100,7 +2085,7 @@ static PyObject *_wrap_wxMouseEvent_Dragging(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Dragging(_arg0); + _result = (bool )wxMouseEvent_Dragging(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2128,7 +2113,7 @@ static PyObject *_wrap_wxMouseEvent_Moving(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Moving(_arg0); + _result = (bool )wxMouseEvent_Moving(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2156,7 +2141,7 @@ static PyObject *_wrap_wxMouseEvent_Entering(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Entering(_arg0); + _result = (bool )wxMouseEvent_Entering(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2184,7 +2169,7 @@ static PyObject *_wrap_wxMouseEvent_Leaving(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Leaving(_arg0); + _result = (bool )wxMouseEvent_Leaving(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2213,7 +2198,7 @@ static PyObject *_wrap_wxMouseEvent_GetPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxMouseEvent_GetPosition(_arg0)); + _result = new wxPoint (wxMouseEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2251,7 +2236,7 @@ static PyObject *_wrap_wxMouseEvent_GetPositionTuple(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMouseEvent_GetPositionTuple(_arg0,_arg1,_arg2); + wxMouseEvent_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2285,7 @@ static PyObject *_wrap_wxMouseEvent_GetLogicalPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxMouseEvent_GetLogicalPosition(_arg0,*_arg1)); + _result = new wxPoint (wxMouseEvent_GetLogicalPosition(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2329,7 +2314,7 @@ static PyObject *_wrap_wxMouseEvent_GetX(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_GetX(_arg0); + _result = (long )wxMouseEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2357,7 +2342,7 @@ static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_GetY(_arg0); + _result = (long )wxMouseEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2385,7 +2370,7 @@ static PyObject *_wrap_wxMouseEvent_GetWheelRotation(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_GetWheelRotation(_arg0); + _result = (int )wxMouseEvent_GetWheelRotation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2413,7 +2398,7 @@ static PyObject *_wrap_wxMouseEvent_GetWheelDelta(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_GetWheelDelta(_arg0); + _result = (int )wxMouseEvent_GetWheelDelta(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2441,7 +2426,7 @@ static PyObject *_wrap_wxMouseEvent_GetLinesPerAction(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_GetLinesPerAction(_arg0); + _result = (int )wxMouseEvent_GetLinesPerAction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2470,7 +2455,7 @@ static PyObject *_wrap_wxMouseEvent_m_x_set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); + _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2498,7 +2483,7 @@ static PyObject *_wrap_wxMouseEvent_m_x_get(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_x_get(_arg0); + _result = (long )wxMouseEvent_m_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2527,7 +2512,7 @@ static PyObject *_wrap_wxMouseEvent_m_y_set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); + _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2555,7 +2540,7 @@ static PyObject *_wrap_wxMouseEvent_m_y_get(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_y_get(_arg0); + _result = (long )wxMouseEvent_m_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2571,7 @@ static PyObject *_wrap_wxMouseEvent_m_leftDown_set(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2614,7 +2599,7 @@ static PyObject *_wrap_wxMouseEvent_m_leftDown_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); + _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2645,7 +2630,7 @@ static PyObject *_wrap_wxMouseEvent_m_middleDown_set(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2673,7 +2658,7 @@ static PyObject *_wrap_wxMouseEvent_m_middleDown_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); + _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2704,7 +2689,7 @@ static PyObject *_wrap_wxMouseEvent_m_rightDown_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2732,7 +2717,7 @@ static PyObject *_wrap_wxMouseEvent_m_rightDown_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); + _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2763,7 +2748,7 @@ static PyObject *_wrap_wxMouseEvent_m_controlDown_set(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2791,7 +2776,7 @@ static PyObject *_wrap_wxMouseEvent_m_controlDown_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); + _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2822,7 +2807,7 @@ static PyObject *_wrap_wxMouseEvent_m_shiftDown_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2850,7 +2835,7 @@ static PyObject *_wrap_wxMouseEvent_m_shiftDown_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); + _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2881,7 +2866,7 @@ static PyObject *_wrap_wxMouseEvent_m_altDown_set(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +2894,7 @@ static PyObject *_wrap_wxMouseEvent_m_altDown_get(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_altDown_get(_arg0); + _result = (bool )wxMouseEvent_m_altDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2940,7 +2925,7 @@ static PyObject *_wrap_wxMouseEvent_m_metaDown_set(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2968,7 +2953,7 @@ static PyObject *_wrap_wxMouseEvent_m_metaDown_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); + _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2997,7 +2982,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelRotation_set(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelRotation_set(_arg0,_arg1); + _result = (int )wxMouseEvent_m_wheelRotation_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3025,7 +3010,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelRotation_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelRotation_get(_arg0); + _result = (int )wxMouseEvent_m_wheelRotation_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3054,7 +3039,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelDelta_set(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelDelta_set(_arg0,_arg1); + _result = (int )wxMouseEvent_m_wheelDelta_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3082,7 +3067,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelDelta_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelDelta_get(_arg0); + _result = (int )wxMouseEvent_m_wheelDelta_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3111,7 +3096,7 @@ static PyObject *_wrap_wxMouseEvent_m_linesPerAction_set(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_linesPerAction_set(_arg0,_arg1); + _result = (int )wxMouseEvent_m_linesPerAction_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3139,7 +3124,7 @@ static PyObject *_wrap_wxMouseEvent_m_linesPerAction_get(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_linesPerAction_get(_arg0); + _result = (int )wxMouseEvent_m_linesPerAction_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3176,7 +3161,7 @@ static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); + _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3210,7 +3195,7 @@ static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_ControlDown(_arg0); + _result = (bool )wxKeyEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3238,7 +3223,7 @@ static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_MetaDown(_arg0); + _result = (bool )wxKeyEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3266,7 +3251,7 @@ static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_AltDown(_arg0); + _result = (bool )wxKeyEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3294,7 +3279,7 @@ static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_ShiftDown(_arg0); + _result = (bool )wxKeyEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3322,7 +3307,7 @@ static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_KeyCode(_arg0); + _result = (long )wxKeyEvent_KeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3350,7 +3335,7 @@ static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_GetKeyCode(_arg0); + _result = (long )wxKeyEvent_GetKeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3378,7 +3363,7 @@ static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_HasModifiers(_arg0); + _result = (bool )wxKeyEvent_HasModifiers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3406,7 +3391,7 @@ static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_GetX(_arg0); + _result = (long )wxKeyEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3434,7 +3419,7 @@ static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_GetY(_arg0); + _result = (long )wxKeyEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3463,7 +3448,7 @@ static PyObject *_wrap_wxKeyEvent_GetPosition(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); + _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3501,7 +3486,7 @@ static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); + wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3541,7 +3526,7 @@ static PyObject *_wrap_wxKeyEvent_m_x_set(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); + _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3569,7 +3554,7 @@ static PyObject *_wrap_wxKeyEvent_m_x_get(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_x_get(_arg0); + _result = (long )wxKeyEvent_m_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3598,7 +3583,7 @@ static PyObject *_wrap_wxKeyEvent_m_y_set(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); + _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3626,7 +3611,7 @@ static PyObject *_wrap_wxKeyEvent_m_y_get(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_y_get(_arg0); + _result = (long )wxKeyEvent_m_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3655,7 +3640,7 @@ static PyObject *_wrap_wxKeyEvent_m_keyCode_set(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); + _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3683,7 +3668,7 @@ static PyObject *_wrap_wxKeyEvent_m_keyCode_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_keyCode_get(_arg0); + _result = (long )wxKeyEvent_m_keyCode_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3714,7 +3699,7 @@ static PyObject *_wrap_wxKeyEvent_m_controlDown_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3742,7 +3727,7 @@ static PyObject *_wrap_wxKeyEvent_m_controlDown_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); + _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3773,7 +3758,7 @@ static PyObject *_wrap_wxKeyEvent_m_shiftDown_set(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3801,7 +3786,7 @@ static PyObject *_wrap_wxKeyEvent_m_shiftDown_get(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); + _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3832,7 +3817,7 @@ static PyObject *_wrap_wxKeyEvent_m_altDown_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3860,7 +3845,7 @@ static PyObject *_wrap_wxKeyEvent_m_altDown_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_altDown_get(_arg0); + _result = (bool )wxKeyEvent_m_altDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3891,7 +3876,7 @@ static PyObject *_wrap_wxKeyEvent_m_metaDown_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3919,7 +3904,7 @@ static PyObject *_wrap_wxKeyEvent_m_metaDown_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); + _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3950,7 +3935,7 @@ static PyObject *_wrap_wxKeyEvent_m_scanCode_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3978,7 +3963,7 @@ static PyObject *_wrap_wxKeyEvent_m_scanCode_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); + _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4014,7 +3999,7 @@ static PyObject *_wrap_new_wxNavigationKeyEvent(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNavigationKeyEvent *)new_wxNavigationKeyEvent(); + _result = (wxNavigationKeyEvent *)new_wxNavigationKeyEvent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4048,7 +4033,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_GetDirection(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNavigationKeyEvent_GetDirection(_arg0); + _result = (bool )wxNavigationKeyEvent_GetDirection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4078,7 +4063,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_SetDirection(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNavigationKeyEvent_SetDirection(_arg0,_arg1); + wxNavigationKeyEvent_SetDirection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4107,7 +4092,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_IsWindowChange(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNavigationKeyEvent_IsWindowChange(_arg0); + _result = (bool )wxNavigationKeyEvent_IsWindowChange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4137,7 +4122,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_SetWindowChange(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNavigationKeyEvent_SetWindowChange(_arg0,_arg1); + wxNavigationKeyEvent_SetWindowChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4166,7 +4151,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_GetCurrentFocus(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxNavigationKeyEvent_GetCurrentFocus(_arg0); + _result = (wxWindow *)wxNavigationKeyEvent_GetCurrentFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4202,7 +4187,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_SetCurrentFocus(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNavigationKeyEvent_SetCurrentFocus(_arg0,_arg1); + wxNavigationKeyEvent_SetCurrentFocus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4248,7 +4233,7 @@ static PyObject *_wrap_new_wxMoveEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMoveEvent *)new_wxMoveEvent(*_arg0,_arg1); + _result = (wxMoveEvent *)new_wxMoveEvent(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4283,7 +4268,7 @@ static PyObject *_wrap_wxMoveEvent_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxMoveEvent_GetPosition(_arg0)); + _result = new wxPoint (wxMoveEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4321,7 +4306,7 @@ static PyObject *_wrap_new_wxPaintEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaintEvent *)new_wxPaintEvent(_arg0); + _result = (wxPaintEvent *)new_wxPaintEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4373,7 +4358,7 @@ static PyObject *_wrap_new_wxEraseEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEraseEvent *)new_wxEraseEvent(_arg0,_arg1); + _result = (wxEraseEvent *)new_wxEraseEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4407,7 +4392,7 @@ static PyObject *_wrap_wxEraseEvent_GetDC(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxEraseEvent_GetDC(_arg0); + _result = (wxDC *)wxEraseEvent_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4445,7 +4430,7 @@ static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFocusEvent *)new_wxFocusEvent(_arg0,_arg1); + _result = (wxFocusEvent *)new_wxFocusEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4504,7 +4489,7 @@ static PyObject *_wrap_new_wxChildFocusEvent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0); + _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4538,7 +4523,7 @@ static PyObject *_wrap_wxChildFocusEvent_GetWindow(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0); + _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4577,7 +4562,7 @@ static PyObject *_wrap_new_wxActivateEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxActivateEvent *)new_wxActivateEvent(_arg0,_arg1,_arg2); + _result = (wxActivateEvent *)new_wxActivateEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4611,7 +4596,7 @@ static PyObject *_wrap_wxActivateEvent_GetActive(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxActivateEvent_GetActive(_arg0); + _result = (bool )wxActivateEvent_GetActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4648,7 +4633,7 @@ static PyObject *_wrap_new_wxInitDialogEvent(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInitDialogEvent *)new_wxInitDialogEvent(_arg0); + _result = (wxInitDialogEvent *)new_wxInitDialogEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4692,7 +4677,7 @@ static PyObject *_wrap_new_wxMenuEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuEvent *)new_wxMenuEvent(_arg0,_arg1); + _result = (wxMenuEvent *)new_wxMenuEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4726,7 +4711,7 @@ static PyObject *_wrap_wxMenuEvent_GetMenuId(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuEvent_GetMenuId(_arg0); + _result = (int )wxMenuEvent_GetMenuId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4754,7 +4739,7 @@ static PyObject *_wrap_wxMenuEvent_IsPopup(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuEvent_IsPopup(_arg0); + _result = (bool )wxMenuEvent_IsPopup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4792,7 +4777,7 @@ static PyObject *_wrap_new_wxShowEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxShowEvent *)new_wxShowEvent(_arg0,_arg1); + _result = (wxShowEvent *)new_wxShowEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4828,7 +4813,7 @@ static PyObject *_wrap_wxShowEvent_SetShow(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShowEvent_SetShow(_arg0,_arg1); + wxShowEvent_SetShow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4857,7 +4842,7 @@ static PyObject *_wrap_wxShowEvent_GetShow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShowEvent_GetShow(_arg0); + _result = (bool )wxShowEvent_GetShow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4897,7 +4882,7 @@ static PyObject *_wrap_new_wxIconizeEvent(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIconizeEvent *)new_wxIconizeEvent(_arg0,_arg1); + _result = (wxIconizeEvent *)new_wxIconizeEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4931,7 +4916,7 @@ static PyObject *_wrap_wxIconizeEvent_Iconized(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIconizeEvent_Iconized(_arg0); + _result = (bool )wxIconizeEvent_Iconized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4968,7 +4953,7 @@ static PyObject *_wrap_new_wxMaximizeEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMaximizeEvent *)new_wxMaximizeEvent(_arg0); + _result = (wxMaximizeEvent *)new_wxMaximizeEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5014,7 +4999,7 @@ static PyObject *_wrap_new_wxJoystickEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxJoystickEvent *)new_wxJoystickEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxJoystickEvent *)new_wxJoystickEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5049,7 +5034,7 @@ static PyObject *_wrap_wxJoystickEvent_GetPosition(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxJoystickEvent_GetPosition(_arg0)); + _result = new wxPoint (wxJoystickEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5078,7 +5063,7 @@ static PyObject *_wrap_wxJoystickEvent_GetZPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetZPosition(_arg0); + _result = (int )wxJoystickEvent_GetZPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5106,7 +5091,7 @@ static PyObject *_wrap_wxJoystickEvent_GetButtonState(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetButtonState(_arg0); + _result = (int )wxJoystickEvent_GetButtonState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5134,7 +5119,7 @@ static PyObject *_wrap_wxJoystickEvent_GetButtonChange(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetButtonChange(_arg0); + _result = (int )wxJoystickEvent_GetButtonChange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5162,7 +5147,7 @@ static PyObject *_wrap_wxJoystickEvent_GetJoystick(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetJoystick(_arg0); + _result = (int )wxJoystickEvent_GetJoystick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5190,7 +5175,7 @@ static PyObject *_wrap_wxJoystickEvent_SetJoystick(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetJoystick(_arg0,_arg1); + wxJoystickEvent_SetJoystick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5219,7 +5204,7 @@ static PyObject *_wrap_wxJoystickEvent_SetButtonState(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetButtonState(_arg0,_arg1); + wxJoystickEvent_SetButtonState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5248,7 +5233,7 @@ static PyObject *_wrap_wxJoystickEvent_SetButtonChange(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetButtonChange(_arg0,_arg1); + wxJoystickEvent_SetButtonChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5284,7 +5269,7 @@ static PyObject *_wrap_wxJoystickEvent_SetPosition(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetPosition(_arg0,*_arg1); + wxJoystickEvent_SetPosition(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5313,7 +5298,7 @@ static PyObject *_wrap_wxJoystickEvent_SetZPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetZPosition(_arg0,_arg1); + wxJoystickEvent_SetZPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5342,7 +5327,7 @@ static PyObject *_wrap_wxJoystickEvent_IsButton(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_IsButton(_arg0); + _result = (bool )wxJoystickEvent_IsButton(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5370,7 +5355,7 @@ static PyObject *_wrap_wxJoystickEvent_IsMove(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_IsMove(_arg0); + _result = (bool )wxJoystickEvent_IsMove(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5398,7 +5383,7 @@ static PyObject *_wrap_wxJoystickEvent_IsZMove(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_IsZMove(_arg0); + _result = (bool )wxJoystickEvent_IsZMove(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5427,7 +5412,7 @@ static PyObject *_wrap_wxJoystickEvent_ButtonDown(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_ButtonDown(_arg0,_arg1); + _result = (bool )wxJoystickEvent_ButtonDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5456,7 +5441,7 @@ static PyObject *_wrap_wxJoystickEvent_ButtonUp(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_ButtonUp(_arg0,_arg1); + _result = (bool )wxJoystickEvent_ButtonUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5485,7 +5470,7 @@ static PyObject *_wrap_wxJoystickEvent_ButtonIsDown(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_ButtonIsDown(_arg0,_arg1); + _result = (bool )wxJoystickEvent_ButtonIsDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5530,7 +5515,7 @@ static PyObject *_wrap_wxDropFilesEvent_GetPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxDropFilesEvent_GetPosition(_arg0)); + _result = new wxPoint (wxDropFilesEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5559,7 +5544,7 @@ static PyObject *_wrap_wxDropFilesEvent_GetNumberOfFiles(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDropFilesEvent_GetNumberOfFiles(_arg0); + _result = (int )wxDropFilesEvent_GetNumberOfFiles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5578,7 +5563,11 @@ static PyObject * wxDropFilesEvent_GetFiles(wxDropFilesEvent *self) { } for (int i=0; ic_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5864,7 +5857,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetSetText(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxUpdateUIEvent_GetSetText(_arg0); + _result = (bool )wxUpdateUIEvent_GetSetText(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5892,7 +5885,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetSetChecked(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxUpdateUIEvent_GetSetChecked(_arg0); + _result = (bool )wxUpdateUIEvent_GetSetChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5920,7 +5913,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetSetEnabled(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxUpdateUIEvent_GetSetEnabled(_arg0); + _result = (bool )wxUpdateUIEvent_GetSetEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5950,7 +5943,7 @@ static PyObject *_wrap_wxUpdateUIEvent_Check(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUpdateUIEvent_Check(_arg0,_arg1); + wxUpdateUIEvent_Check(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5981,7 +5974,7 @@ static PyObject *_wrap_wxUpdateUIEvent_Enable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUpdateUIEvent_Enable(_arg0,_arg1); + wxUpdateUIEvent_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6010,26 +6003,13 @@ static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUpdateUIEvent_SetText(_arg0,*_arg1); + wxUpdateUIEvent_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6070,7 +6050,7 @@ static PyObject *_wrap_new_wxSysColourChangedEvent(PyObject *self, PyObject *arg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSysColourChangedEvent *)new_wxSysColourChangedEvent(); + _result = (wxSysColourChangedEvent *)new_wxSysColourChangedEvent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6122,7 +6102,7 @@ static PyObject *_wrap_new_wxNotifyEvent(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotifyEvent *)new_wxNotifyEvent(_arg0,_arg1); + _result = (wxNotifyEvent *)new_wxNotifyEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6156,7 +6136,7 @@ static PyObject *_wrap_wxNotifyEvent_IsAllowed(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotifyEvent_IsAllowed(_arg0); + _result = (bool )wxNotifyEvent_IsAllowed(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6183,7 +6163,7 @@ static PyObject *_wrap_wxNotifyEvent_Allow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotifyEvent_Allow(_arg0); + wxNotifyEvent_Allow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6211,7 +6191,7 @@ static PyObject *_wrap_wxNotifyEvent_Veto(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotifyEvent_Veto(_arg0); + wxNotifyEvent_Veto(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6248,7 +6228,7 @@ static PyObject *_wrap_new_wxDisplayChangedEvent(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDisplayChangedEvent *)new_wxDisplayChangedEvent(); + _result = (wxDisplayChangedEvent *)new_wxDisplayChangedEvent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6291,7 +6271,7 @@ static PyObject *_wrap_new_wxPaletteChangedEvent(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaletteChangedEvent *)new_wxPaletteChangedEvent(_arg0); + _result = (wxPaletteChangedEvent *)new_wxPaletteChangedEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6333,7 +6313,7 @@ static PyObject *_wrap_wxPaletteChangedEvent_SetChangedWindow(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPaletteChangedEvent_SetChangedWindow(_arg0,_arg1); + wxPaletteChangedEvent_SetChangedWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6362,7 +6342,7 @@ static PyObject *_wrap_wxPaletteChangedEvent_GetChangedWindow(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPaletteChangedEvent_GetChangedWindow(_arg0); + _result = (wxWindow *)wxPaletteChangedEvent_GetChangedWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6399,7 +6379,7 @@ static PyObject *_wrap_new_wxQueryNewPaletteEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxQueryNewPaletteEvent *)new_wxQueryNewPaletteEvent(_arg0); + _result = (wxQueryNewPaletteEvent *)new_wxQueryNewPaletteEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6435,7 +6415,7 @@ static PyObject *_wrap_wxQueryNewPaletteEvent_SetPaletteRealized(PyObject *self, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryNewPaletteEvent_SetPaletteRealized(_arg0,_arg1); + wxQueryNewPaletteEvent_SetPaletteRealized(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6464,7 +6444,7 @@ static PyObject *_wrap_wxQueryNewPaletteEvent_GetPaletteRealized(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxQueryNewPaletteEvent_GetPaletteRealized(_arg0); + _result = (bool )wxQueryNewPaletteEvent_GetPaletteRealized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6517,7 +6497,7 @@ static PyObject *_wrap_new_wxWindowCreateEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowCreateEvent *)new_wxWindowCreateEvent(_arg0); + _result = (wxWindowCreateEvent *)new_wxWindowCreateEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6551,7 +6531,7 @@ static PyObject *_wrap_wxWindowCreateEvent_GetWindow(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindowCreateEvent_GetWindow(_arg0); + _result = (wxWindow *)wxWindowCreateEvent_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6604,7 +6584,7 @@ static PyObject *_wrap_new_wxWindowDestroyEvent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowDestroyEvent *)new_wxWindowDestroyEvent(_arg0); + _result = (wxWindowDestroyEvent *)new_wxWindowDestroyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6638,7 +6618,7 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindowDestroyEvent_GetWindow(_arg0); + _result = (wxWindow *)wxWindowDestroyEvent_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6676,7 +6656,7 @@ static PyObject *_wrap_new_wxTimerEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTimerEvent *)new_wxTimerEvent(_arg0,_arg1); + _result = (wxTimerEvent *)new_wxTimerEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6710,7 +6690,7 @@ static PyObject *_wrap_wxTimerEvent_GetInterval(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimerEvent_GetInterval(_arg0); + _result = (int )wxTimerEvent_GetInterval(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6766,7 +6746,7 @@ static PyObject *_wrap_new_wxTextUrlEvent(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextUrlEvent *)new_wxTextUrlEvent(_arg0,*_arg1,_arg2,_arg3); + _result = (wxTextUrlEvent *)new_wxTextUrlEvent(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6800,7 +6780,7 @@ static PyObject *_wrap_wxTextUrlEvent_GetMouseEvent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxMouseEvent & _result_ref = wxTextUrlEvent_GetMouseEvent(_arg0); + const wxMouseEvent & _result_ref = wxTextUrlEvent_GetMouseEvent(_arg0); _result = (wxMouseEvent *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6829,7 +6809,7 @@ static PyObject *_wrap_wxTextUrlEvent_GetURLStart(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextUrlEvent_GetURLStart(_arg0); + _result = (long )wxTextUrlEvent_GetURLStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6857,7 +6837,7 @@ static PyObject *_wrap_wxTextUrlEvent_GetURLEnd(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextUrlEvent_GetURLEnd(_arg0); + _result = (long )wxTextUrlEvent_GetURLEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6894,7 +6874,7 @@ static PyObject *_wrap_new_wxPyEvent(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyEvent *)new_wxPyEvent(_arg0); + _result = (wxPyEvent *)new_wxPyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6927,7 +6907,7 @@ static PyObject *_wrap_delete_wxPyEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyEvent(_arg0); + delete_wxPyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6960,7 +6940,7 @@ static PyObject *_wrap_wxPyEvent_SetSelf(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEvent_SetSelf(_arg0,_arg1); + wxPyEvent_SetSelf(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6989,7 +6969,7 @@ static PyObject *_wrap_wxPyEvent_GetSelf(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyEvent_GetSelf(_arg0); + _result = (PyObject *)wxPyEvent_GetSelf(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7037,7 +7017,7 @@ static PyObject *_wrap_new_wxPyCommandEvent(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyCommandEvent *)new_wxPyCommandEvent(_arg0,_arg1); + _result = (wxPyCommandEvent *)new_wxPyCommandEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7070,7 +7050,7 @@ static PyObject *_wrap_delete_wxPyCommandEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyCommandEvent(_arg0); + delete_wxPyCommandEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7103,7 +7083,7 @@ static PyObject *_wrap_wxPyCommandEvent_SetSelf(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCommandEvent_SetSelf(_arg0,_arg1); + wxPyCommandEvent_SetSelf(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7132,7 +7112,7 @@ static PyObject *_wrap_wxPyCommandEvent_GetSelf(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyCommandEvent_GetSelf(_arg0); + _result = (PyObject *)wxPyCommandEvent_GetSelf(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/filesys.cpp b/wxPython/src/gtk/filesys.cpp index 8c9f53633e..ff260b3df7 100644 --- a/wxPython/src/gtk/filesys.cpp +++ b/wxPython/src/gtk/filesys.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - // wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling // the callback functions class wxPyFileSystemHandler : public wxFileSystemHandler { @@ -175,22 +169,9 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -201,7 +182,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); + __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -227,22 +208,9 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -253,7 +221,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); + __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -278,29 +246,16 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { _arg1 = _obj1; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); + __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -357,58 +312,19 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -419,7 +335,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); + _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -469,7 +385,7 @@ static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInputStream *)wxFSFile_GetStream(_arg0); + _result = (wxInputStream *)wxFSFile_GetStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -504,13 +420,17 @@ static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); + const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -535,13 +455,17 @@ static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFSFile_GetLocation(_arg0); + const wxString & _result_ref = wxFSFile_GetLocation(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -566,13 +490,17 @@ static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); + const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -598,7 +526,7 @@ static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); + _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -643,7 +571,7 @@ static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); + _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -686,7 +614,7 @@ static PyObject *_wrap_wxFileSystemHandler__setCallbackInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystemHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxFileSystemHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -716,26 +644,13 @@ static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -777,26 +692,13 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -830,31 +732,22 @@ static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -886,12 +779,16 @@ static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); + _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -920,31 +817,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -977,31 +865,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1034,31 +913,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1091,31 +961,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1148,31 +1009,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1204,7 +1056,7 @@ static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileSystem *)new_wxFileSystem(); + _result = (wxFileSystem *)new_wxFileSystem(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1240,27 +1092,14 @@ static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); + wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1293,12 +1132,16 @@ static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystem_GetPath(_arg0)); + _result = new wxString (wxFileSystem_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1327,26 +1170,13 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); + _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1380,31 +1210,22 @@ static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1436,12 +1257,16 @@ static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystem_FindNext(_arg0)); + _result = new wxString (wxFileSystem_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1467,7 +1292,7 @@ static PyObject *_wrap_wxFileSystem_AddHandler(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystem::AddHandler(_arg0); + wxFileSystem::AddHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1485,7 +1310,7 @@ static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystem::CleanUpHandlers(); + wxFileSystem::CleanUpHandlers(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1522,7 +1347,7 @@ static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); + _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1557,26 +1382,13 @@ static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1618,26 +1430,13 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1677,7 +1476,7 @@ static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxZipFSHandler *)new_wxZipFSHandler(); + _result = (wxZipFSHandler *)new_wxZipFSHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1712,26 +1511,13 @@ static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1773,26 +1559,13 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1826,31 +1599,22 @@ static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1882,12 +1646,16 @@ static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxZipFSHandler_FindNext(_arg0)); + _result = new wxString (wxZipFSHandler_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1923,7 +1691,7 @@ static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); + _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1947,26 +1715,13 @@ static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMemoryFSHandler::RemoveFile(*_arg0); + wxMemoryFSHandler::RemoveFile(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2000,26 +1755,13 @@ static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2061,26 +1803,13 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2114,31 +1843,22 @@ static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -2170,12 +1890,16 @@ static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); + _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; diff --git a/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index ebbd1e31e6..10fd118525 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -149,22 +143,9 @@ static PyObject *_wrap_new_wxTopLevelWindow(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -180,7 +161,7 @@ static PyObject *_wrap_new_wxTopLevelWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTopLevelWindow *)new_wxTopLevelWindow(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxTopLevelWindow *)new_wxTopLevelWindow(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -210,7 +191,7 @@ static PyObject *_wrap_new_wxPreTopLevelWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTopLevelWindow *)new_wxPreTopLevelWindow(); + _result = (wxTopLevelWindow *)new_wxPreTopLevelWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -263,22 +244,9 @@ static PyObject *_wrap_wxTopLevelWindow_Create(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -294,7 +262,7 @@ static PyObject *_wrap_wxTopLevelWindow_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxTopLevelWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -328,7 +296,7 @@ static PyObject *_wrap_wxTopLevelWindow_Maximize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_Maximize(_arg0,_arg1); + wxTopLevelWindow_Maximize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -356,7 +324,7 @@ static PyObject *_wrap_wxTopLevelWindow_Restore(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_Restore(_arg0); + wxTopLevelWindow_Restore(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -387,7 +355,7 @@ static PyObject *_wrap_wxTopLevelWindow_Iconize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_Iconize(_arg0,_arg1); + wxTopLevelWindow_Iconize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -416,7 +384,7 @@ static PyObject *_wrap_wxTopLevelWindow_IsMaximized(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_IsMaximized(_arg0); + _result = (bool )wxTopLevelWindow_IsMaximized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -444,7 +412,7 @@ static PyObject *_wrap_wxTopLevelWindow_IsIconized(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_IsIconized(_arg0); + _result = (bool )wxTopLevelWindow_IsIconized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -473,7 +441,7 @@ static PyObject *_wrap_wxTopLevelWindow_GetIcon(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxTopLevelWindow_GetIcon(_arg0)); + _result = new wxIcon (wxTopLevelWindow_GetIcon(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -510,7 +478,7 @@ static PyObject *_wrap_wxTopLevelWindow_SetIcon(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_SetIcon(_arg0,*_arg1); + wxTopLevelWindow_SetIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -543,7 +511,7 @@ static PyObject *_wrap_wxTopLevelWindow_ShowFullScreen(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_ShowFullScreen(_arg0,_arg1,_arg2); + _result = (bool )wxTopLevelWindow_ShowFullScreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -571,7 +539,7 @@ static PyObject *_wrap_wxTopLevelWindow_IsFullScreen(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_IsFullScreen(_arg0); + _result = (bool )wxTopLevelWindow_IsFullScreen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -599,26 +567,13 @@ static PyObject *_wrap_wxTopLevelWindow_SetTitle(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_SetTitle(_arg0,*_arg1); + wxTopLevelWindow_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -651,12 +606,16 @@ static PyObject *_wrap_wxTopLevelWindow_GetTitle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTopLevelWindow_GetTitle(_arg0)); + _result = new wxString (wxTopLevelWindow_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -727,22 +686,9 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -758,7 +704,7 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -788,7 +734,7 @@ static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)new_wxPreFrame(); + _result = (wxFrame *)new_wxPreFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -841,22 +787,9 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -872,7 +805,7 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -905,7 +838,7 @@ static PyObject *_wrap_wxFrame_GetClientAreaOrigin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); + _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -942,7 +875,7 @@ static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetMenuBar(_arg0,_arg1); + wxFrame_SetMenuBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -971,7 +904,7 @@ static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); + _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1000,7 +933,7 @@ static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_Command(_arg0,_arg1); + _result = (bool )wxFrame_Command(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1029,7 +962,7 @@ static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); + _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1061,7 +994,7 @@ static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1089,7 +1022,7 @@ static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); + _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1125,7 +1058,7 @@ static PyObject *_wrap_wxFrame_SetStatusBar(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetStatusBar(_arg0,_arg1); + wxFrame_SetStatusBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1155,26 +1088,13 @@ static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetStatusText(_arg0,*_arg1,_arg2); + wxFrame_SetStatusText(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1224,7 +1144,7 @@ static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); + wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1259,7 +1179,7 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); + _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,7 +1207,7 @@ static PyObject *_wrap_wxFrame_GetToolBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); + _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1323,7 +1243,7 @@ static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetToolBar(_arg0,_arg1); + wxFrame_SetToolBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1395,22 +1315,9 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1426,7 +1333,7 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1456,7 +1363,7 @@ static PyObject *_wrap_new_wxPreDialog(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDialog *)new_wxPreDialog(); + _result = (wxDialog *)new_wxPreDialog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1509,22 +1416,9 @@ static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -1540,7 +1434,7 @@ static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1572,7 +1466,7 @@ static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_Centre(_arg0,_arg1); + wxDialog_Centre(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1601,7 +1495,7 @@ static PyObject *_wrap_wxDialog_EndModal(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_EndModal(_arg0,_arg1); + wxDialog_EndModal(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1632,7 +1526,7 @@ static PyObject *_wrap_wxDialog_SetModal(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_SetModal(_arg0,_arg1); + wxDialog_SetModal(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1661,7 +1555,7 @@ static PyObject *_wrap_wxDialog_IsModal(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDialog_IsModal(_arg0); + _result = (bool )wxDialog_IsModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1689,7 +1583,7 @@ static PyObject *_wrap_wxDialog_ShowModal(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDialog_ShowModal(_arg0); + _result = (int )wxDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1717,7 +1611,7 @@ static PyObject *_wrap_wxDialog_GetReturnCode(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDialog_GetReturnCode(_arg0); + _result = (int )wxDialog_GetReturnCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,7 +1639,7 @@ static PyObject *_wrap_wxDialog_SetReturnCode(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_SetReturnCode(_arg0,_arg1); + wxDialog_SetReturnCode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1775,26 +1669,13 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); + _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1827,7 +1708,7 @@ static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); + _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1906,22 +1787,9 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1937,7 +1805,7 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMiniFrame *)new_wxMiniFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxMiniFrame *)new_wxMiniFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1967,7 +1835,7 @@ static PyObject *_wrap_new_wxPreMiniFrame(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMiniFrame *)new_wxPreMiniFrame(); + _result = (wxMiniFrame *)new_wxPreMiniFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2020,22 +1888,9 @@ static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -2051,7 +1906,7 @@ static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMiniFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxMiniFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2137,7 +1992,7 @@ static PyObject *_wrap_new_wxSplashScreenWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplashScreenWindow *)new_wxSplashScreenWindow(*_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); + _result = (wxSplashScreenWindow *)new_wxSplashScreenWindow(*_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2179,7 +2034,7 @@ static PyObject *_wrap_wxSplashScreenWindow_SetBitmap(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplashScreenWindow_SetBitmap(_arg0,*_arg1); + wxSplashScreenWindow_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2209,7 +2064,7 @@ static PyObject *_wrap_wxSplashScreenWindow_GetBitmap(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap & _result_ref = wxSplashScreenWindow_GetBitmap(_arg0); + wxBitmap & _result_ref = wxSplashScreenWindow_GetBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2316,7 +2171,7 @@ static PyObject *_wrap_new_wxSplashScreen(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplashScreen *)new_wxSplashScreen(*_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7); + _result = (wxSplashScreen *)new_wxSplashScreen(*_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2350,7 +2205,7 @@ static PyObject *_wrap_wxSplashScreen_GetSplashStyle(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSplashScreen_GetSplashStyle(_arg0); + _result = (long )wxSplashScreen_GetSplashStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2379,7 +2234,7 @@ static PyObject *_wrap_wxSplashScreen_GetSplashWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplashScreenWindow *)wxSplashScreen_GetSplashWindow(_arg0); + _result = (wxSplashScreenWindow *)wxSplashScreen_GetSplashWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2413,7 +2268,7 @@ static PyObject *_wrap_wxSplashScreen_GetTimeout(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplashScreen_GetTimeout(_arg0); + _result = (int )wxSplashScreen_GetTimeout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index 62e44510ac..f2a36eee02 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -88,12 +88,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif // Implementations of some alternate "constructors" wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { @@ -288,7 +282,7 @@ static PyObject *_wrap_wxEmptyBitmap(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); + _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -318,7 +312,7 @@ static PyObject *_wrap_wxBitmapFromXPMData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromXPMData(_arg0); + _result = (wxBitmap *)wxBitmapFromXPMData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -352,7 +346,7 @@ static PyObject *_wrap_wxBitmapFromIcon(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromIcon(*_arg0); + _result = (wxBitmap *)wxBitmapFromIcon(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -381,7 +375,7 @@ static PyObject *_wrap_wxBitmapFromBits(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3); + _result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -423,7 +417,7 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); + _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -448,7 +442,7 @@ static PyObject *_wrap_wxEmptyIcon(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxEmptyIcon(); + _result = (wxIcon *)wxEmptyIcon(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -478,7 +472,7 @@ static PyObject *_wrap_wxIconFromXPMData(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxIconFromXPMData(_arg0); + _result = (wxIcon *)wxIconFromXPMData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -512,7 +506,7 @@ static PyObject *_wrap_wxIconFromBitmap(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxIconFromBitmap(*_arg0); + _result = (wxIcon *)wxIconFromBitmap(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -538,7 +532,7 @@ static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCursor *)wxPyStockCursor(_arg0); + _result = (wxCursor *)wxPyStockCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -564,26 +558,13 @@ static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNamedColour",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxNamedColour(*_arg0); + _result = (wxColour *)wxNamedColour(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -621,7 +602,7 @@ static PyObject *_wrap_wxMemoryDCFromDC(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); + _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1345,7 +1326,7 @@ static PyObject *_wrap_new_wxGDIObject(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGDIObject *)new_wxGDIObject(); + _result = (wxGDIObject *)new_wxGDIObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1378,7 +1359,7 @@ static PyObject *_wrap_delete_wxGDIObject(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGDIObject(_arg0); + delete_wxGDIObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1407,7 +1388,7 @@ static PyObject *_wrap_wxGDIObject_GetVisible(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGDIObject_GetVisible(_arg0); + _result = (bool )wxGDIObject_GetVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1437,7 +1418,7 @@ static PyObject *_wrap_wxGDIObject_SetVisible(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGDIObject_SetVisible(_arg0,_arg1); + wxGDIObject_SetVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1466,7 +1447,7 @@ static PyObject *_wrap_wxGDIObject_IsNull(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGDIObject_IsNull(_arg0); + _result = (bool )wxGDIObject_IsNull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1504,26 +1485,13 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBitmap",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); + _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1560,7 +1528,7 @@ static PyObject *_wrap_delete_wxBitmap(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBitmap(_arg0); + delete_wxBitmap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1590,7 +1558,7 @@ static PyObject *_wrap_wxBitmap_GetPalette(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPalette *)wxBitmap_GetPalette(_arg0); + _result = (wxPalette *)wxBitmap_GetPalette(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1625,7 +1593,7 @@ static PyObject *_wrap_wxBitmap_GetMask(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMask *)wxBitmap_GetMask(_arg0); + _result = (wxMask *)wxBitmap_GetMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1661,26 +1629,13 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); + _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1716,22 +1671,9 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -1742,7 +1684,7 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1782,7 +1724,7 @@ static PyObject *_wrap_wxBitmap_SetMask(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetMask(_arg0,_arg1); + wxBitmap_SetMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1811,7 +1753,7 @@ static PyObject *_wrap_wxBitmap_Ok(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_Ok(_arg0); + _result = (bool )wxBitmap_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1839,7 +1781,7 @@ static PyObject *_wrap_wxBitmap_GetWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetWidth(_arg0); + _result = (int )wxBitmap_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1867,7 +1809,7 @@ static PyObject *_wrap_wxBitmap_GetHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetHeight(_arg0); + _result = (int )wxBitmap_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1895,7 +1837,7 @@ static PyObject *_wrap_wxBitmap_GetDepth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetDepth(_arg0); + _result = (int )wxBitmap_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1923,7 +1865,7 @@ static PyObject *_wrap_wxBitmap_SetWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetWidth(_arg0,_arg1); + wxBitmap_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1952,7 +1894,7 @@ static PyObject *_wrap_wxBitmap_SetHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetHeight(_arg0,_arg1); + wxBitmap_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1981,7 +1923,7 @@ static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetDepth(_arg0,_arg1); + wxBitmap_SetDepth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2019,7 +1961,7 @@ static PyObject *_wrap_wxBitmap_GetSubBitmap(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); + _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2057,7 +1999,7 @@ static PyObject *_wrap_wxBitmap_CopyFromIcon(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); + _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2094,7 +2036,7 @@ static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMask *)new_wxMask(*_arg0); + _result = (wxMask *)new_wxMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2127,7 +2069,7 @@ static PyObject *_wrap_wxMask_Destroy(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMask_Destroy(_arg0); + wxMask_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2168,26 +2110,13 @@ static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxIcon",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); + _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2224,7 +2153,7 @@ static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxIcon(_arg0); + delete_wxIcon(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2255,26 +2184,13 @@ static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); + _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2306,7 +2222,7 @@ static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIcon_Ok(_arg0); + _result = (bool )wxIcon_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2334,7 +2250,7 @@ static PyObject *_wrap_wxIcon_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxIcon_GetWidth(_arg0); + _result = (int )wxIcon_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2362,7 +2278,7 @@ static PyObject *_wrap_wxIcon_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxIcon_GetHeight(_arg0); + _result = (int )wxIcon_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2390,7 +2306,7 @@ static PyObject *_wrap_wxIcon_GetDepth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxIcon_GetDepth(_arg0); + _result = (int )wxIcon_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2418,7 +2334,7 @@ static PyObject *_wrap_wxIcon_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetWidth(_arg0,_arg1); + wxIcon_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2447,7 +2363,7 @@ static PyObject *_wrap_wxIcon_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetHeight(_arg0,_arg1); + wxIcon_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2476,7 +2392,7 @@ static PyObject *_wrap_wxIcon_SetDepth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetDepth(_arg0,_arg1); + wxIcon_SetDepth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2513,7 +2429,7 @@ static PyObject *_wrap_wxIcon_CopyFromBitmap(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_CopyFromBitmap(_arg0,*_arg1); + wxIcon_CopyFromBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2557,7 +2473,7 @@ static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxCursor(_arg0); + delete_wxCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2502,7 @@ static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCursor_Ok(_arg0); + _result = (bool )wxCursor_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2615,26 +2531,13 @@ static PyObject *_wrap_wxNativeFontInfo_FromXFontName(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromXFontName(_arg0,*_arg1); + _result = (bool )wxNativeFontInfo_FromXFontName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2666,7 +2569,7 @@ static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_IsDefault(_arg0); + _result = (bool )wxNativeFontInfo_IsDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2694,12 +2597,16 @@ static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_GetXFontName(_arg0)); + _result = new wxString (wxNativeFontInfo_GetXFontName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2727,26 +2634,13 @@ static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetXFontName(_arg0,*_arg1); + wxNativeFontInfo_SetXFontName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2771,7 +2665,7 @@ static PyObject *_wrap_new_wxNativeFontInfo(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); + _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2804,7 +2698,7 @@ static PyObject *_wrap_wxNativeFontInfo_Init(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_Init(_arg0); + wxNativeFontInfo_Init(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2834,26 +2728,13 @@ static PyObject *_wrap_wxNativeFontInfo_FromString(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromString(_arg0,*_arg1); + _result = (bool )wxNativeFontInfo_FromString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2885,12 +2766,16 @@ static PyObject *_wrap_wxNativeFontInfo_ToString(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_ToString(_arg0)); + _result = new wxString (wxNativeFontInfo_ToString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2920,12 +2805,16 @@ static PyObject *_wrap_wxNativeFontInfo___str__(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo___str__(_arg0)); + _result = new wxString (wxNativeFontInfo___str__(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2954,26 +2843,13 @@ static PyObject *_wrap_wxNativeFontInfo_FromUserString(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromUserString(_arg0,*_arg1); + _result = (bool )wxNativeFontInfo_FromUserString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3005,12 +2881,16 @@ static PyObject *_wrap_wxNativeFontInfo_ToUserString(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_ToUserString(_arg0)); + _result = new wxString (wxNativeFontInfo_ToUserString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3030,7 +2910,7 @@ static PyObject *_wrap_new_wxFontMapper(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontMapper *)new_wxFontMapper(); + _result = (wxFontMapper *)new_wxFontMapper(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3063,7 +2943,7 @@ static PyObject *_wrap_delete_wxFontMapper(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFontMapper(_arg0); + delete_wxFontMapper(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3105,27 +2985,14 @@ static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); + _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3162,26 +3029,13 @@ static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); + _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3216,27 +3070,14 @@ static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); + _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3259,12 +3100,16 @@ static PyObject *_wrap_wxFontMapper_GetEncodingName(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFontMapper::GetEncodingName(_arg0)); + _result = new wxString (wxFontMapper::GetEncodingName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3283,12 +3128,16 @@ static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFontMapper::GetEncodingDescription(_arg0)); + _result = new wxString (wxFontMapper::GetEncodingDescription(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3324,7 +3173,7 @@ static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogParent(_arg0,_arg1); + wxFontMapper_SetDialogParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3353,26 +3202,13 @@ static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogTitle(_arg0,*_arg1); + wxFontMapper_SetDialogTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3413,7 +3249,7 @@ static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfig(_arg0,_arg1); + wxFontMapper_SetConfig(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3442,26 +3278,13 @@ static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfigPath(_arg0,*_arg1); + wxFontMapper_SetConfigPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3484,7 +3307,7 @@ static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); + _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3527,7 +3350,7 @@ static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3562,7 +3385,7 @@ static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)new_wxFontFromNativeInfo(*_arg0); + _result = (wxFont *)new_wxFontFromNativeInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3595,7 +3418,7 @@ static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFont(_arg0); + delete_wxFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3624,7 +3447,7 @@ static PyObject *_wrap_wxFont_Ok(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFont_Ok(_arg0); + _result = (bool )wxFont_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3652,7 +3475,7 @@ static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetPointSize(_arg0); + _result = (int )wxFont_GetPointSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3680,7 +3503,7 @@ static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetFamily(_arg0); + _result = (int )wxFont_GetFamily(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3708,7 +3531,7 @@ static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetStyle(_arg0); + _result = (int )wxFont_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3736,7 +3559,7 @@ static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetWeight(_arg0); + _result = (int )wxFont_GetWeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3764,7 +3587,7 @@ static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFont_GetUnderlined(_arg0); + _result = (bool )wxFont_GetUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3792,12 +3615,16 @@ static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetFaceName(_arg0)); + _result = new wxString (wxFont_GetFaceName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3825,7 +3652,7 @@ static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFont_GetEncoding(_arg0); + _result = (wxFontEncoding )wxFont_GetEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3853,7 +3680,7 @@ static PyObject *_wrap_wxFont_IsFixedWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFont_IsFixedWidth(_arg0); + _result = (bool )wxFont_IsFixedWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3882,7 +3709,7 @@ static PyObject *_wrap_wxFont_GetNativeFontInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNativeFontInfo *)wxFont_GetNativeFontInfo(_arg0); + _result = (wxNativeFontInfo *)wxFont_GetNativeFontInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3916,12 +3743,16 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoDesc(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetNativeFontInfoDesc(_arg0)); + _result = new wxString (wxFont_GetNativeFontInfoDesc(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3949,12 +3780,16 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoUserDesc(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetNativeFontInfoUserDesc(_arg0)); + _result = new wxString (wxFont_GetNativeFontInfoUserDesc(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3982,7 +3817,7 @@ static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetPointSize(_arg0,_arg1); + wxFont_SetPointSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4011,7 +3846,7 @@ static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetFamily(_arg0,_arg1); + wxFont_SetFamily(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4040,7 +3875,7 @@ static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetStyle(_arg0,_arg1); + wxFont_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4069,7 +3904,7 @@ static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetWeight(_arg0,_arg1); + wxFont_SetWeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4098,26 +3933,13 @@ static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetFaceName(_arg0,*_arg1); + wxFont_SetFaceName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4152,7 +3974,7 @@ static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetUnderlined(_arg0,_arg1); + wxFont_SetUnderlined(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4181,7 +4003,7 @@ static PyObject *_wrap_wxFont_SetEncoding(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetEncoding(_arg0,_arg1); + wxFont_SetEncoding(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4218,7 +4040,7 @@ static PyObject *_wrap_wxFont_SetNativeFontInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetNativeFontInfo(_arg0,*_arg1); + wxFont_SetNativeFontInfo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4247,26 +4069,13 @@ static PyObject *_wrap_wxFont_SetNativeFontInfoUserDesc(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetNativeFontInfoUserDesc(_arg0,*_arg1); + wxFont_SetNativeFontInfoUserDesc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4299,12 +4108,16 @@ static PyObject *_wrap_wxFont_GetFamilyString(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetFamilyString(_arg0)); + _result = new wxString (wxFont_GetFamilyString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4332,12 +4145,16 @@ static PyObject *_wrap_wxFont_GetStyleString(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetStyleString(_arg0)); + _result = new wxString (wxFont_GetStyleString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4365,12 +4182,16 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetWeightString(_arg0)); + _result = new wxString (wxFont_GetWeightString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4388,7 +4209,7 @@ static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFont::GetDefaultEncoding(); + _result = (wxFontEncoding )wxFont::GetDefaultEncoding(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4406,7 +4227,7 @@ static PyObject *_wrap_wxFont_SetDefaultEncoding(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont::SetDefaultEncoding(_arg0); + wxFont::SetDefaultEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4451,7 +4272,7 @@ static PyObject *_wrap_wxFontList_AddFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontList_AddFont(_arg0,_arg1); + wxFontList_AddFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4490,7 +4311,7 @@ static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *arg _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + _result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4532,7 +4353,7 @@ static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontList_RemoveFont(_arg0,_arg1); + wxFontList_RemoveFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4561,7 +4382,7 @@ static PyObject *_wrap_wxFontList_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFontList_GetCount(_arg0); + _result = (int )wxFontList_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4592,7 +4413,7 @@ static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); + _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4624,7 +4445,7 @@ static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxColour(_arg0); + delete_wxColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4652,7 +4473,7 @@ static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxColour_Red(_arg0); + _result = (unsigned char )wxColour_Red(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4679,7 +4500,7 @@ static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxColour_Green(_arg0); + _result = (unsigned char )wxColour_Green(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4706,7 +4527,7 @@ static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxColour_Blue(_arg0); + _result = (unsigned char )wxColour_Blue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4733,7 +4554,7 @@ static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxColour_Ok(_arg0); + _result = (bool )wxColour_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4762,7 +4583,7 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColour_Set(_arg0,_arg1,_arg2,_arg3); + wxColour_Set(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4796,7 +4617,7 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxColour_Get(_arg0); + _result = (PyObject *)wxColour_Get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4836,26 +4657,13 @@ static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); + _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4901,12 +4709,16 @@ static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); + _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4958,26 +4770,13 @@ static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5028,7 +4827,7 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); + _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5061,7 +4860,7 @@ static PyObject *_wrap_delete_wxPen(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPen(_arg0); + delete_wxPen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5090,7 +4889,7 @@ static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetCap(_arg0); + _result = (int )wxPen_GetCap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5119,7 +4918,7 @@ static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxPen_GetColour(_arg0)); + _result = new wxColour (wxPen_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5148,7 +4947,7 @@ static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetJoin(_arg0); + _result = (int )wxPen_GetJoin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5176,7 +4975,7 @@ static PyObject *_wrap_wxPen_GetStyle(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetStyle(_arg0); + _result = (int )wxPen_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5204,7 +5003,7 @@ static PyObject *_wrap_wxPen_GetWidth(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetWidth(_arg0); + _result = (int )wxPen_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5232,7 +5031,7 @@ static PyObject *_wrap_wxPen_Ok(PyObject *self, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPen_Ok(_arg0); + _result = (bool )wxPen_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5260,7 +5059,7 @@ static PyObject *_wrap_wxPen_SetCap(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetCap(_arg0,_arg1); + wxPen_SetCap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5296,7 +5095,7 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetColour(_arg0,*_arg1); + wxPen_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5325,7 +5124,7 @@ static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetJoin(_arg0,_arg1); + wxPen_SetJoin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5354,7 +5153,7 @@ static PyObject *_wrap_wxPen_SetStyle(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetStyle(_arg0,_arg1); + wxPen_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5383,7 +5182,7 @@ static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetWidth(_arg0,_arg1); + wxPen_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5429,7 +5228,7 @@ static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetDashes(_arg0,_arg1,_arg2); + wxPen_SetDashes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5487,7 +5286,7 @@ static PyObject *_wrap_new_wxPyPen(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPen *)new_wxPyPen(*_arg0,_arg1,_arg2); + _result = (wxPyPen *)new_wxPyPen(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5520,7 +5319,7 @@ static PyObject *_wrap_delete_wxPyPen(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyPen(_arg0); + delete_wxPyPen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5566,7 +5365,7 @@ static PyObject *_wrap_wxPyPen_SetDashes(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPen_SetDashes(_arg0,_arg1,_arg2); + wxPyPen_SetDashes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5614,7 +5413,7 @@ static PyObject *_wrap_wxPenList_AddPen(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPenList_AddPen(_arg0,_arg1); + wxPenList_AddPen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5654,7 +5453,7 @@ static PyObject *_wrap_wxPenList_FindOrCreatePen(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxPenList_FindOrCreatePen(_arg0,*_arg1,_arg2,_arg3); + _result = (wxPen *)wxPenList_FindOrCreatePen(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5696,7 +5495,7 @@ static PyObject *_wrap_wxPenList_RemovePen(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPenList_RemovePen(_arg0,_arg1); + wxPenList_RemovePen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5725,7 +5524,7 @@ static PyObject *_wrap_wxPenList_GetCount(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPenList_GetCount(_arg0); + _result = (int )wxPenList_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5770,7 +5569,7 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); + _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5803,7 +5602,7 @@ static PyObject *_wrap_delete_wxBrush(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBrush(_arg0); + delete_wxBrush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5833,7 +5632,7 @@ static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxBrush_GetColour(_arg0)); + _result = new wxColour (wxBrush_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5863,7 +5662,7 @@ static PyObject *_wrap_wxBrush_GetStipple(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBrush_GetStipple(_arg0); + _result = (wxBitmap *)wxBrush_GetStipple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5897,7 +5696,7 @@ static PyObject *_wrap_wxBrush_GetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBrush_GetStyle(_arg0); + _result = (int )wxBrush_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5925,7 +5724,7 @@ static PyObject *_wrap_wxBrush_Ok(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBrush_Ok(_arg0); + _result = (bool )wxBrush_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5960,7 +5759,7 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrush_SetColour(_arg0,*_arg1); + wxBrush_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5997,7 +5796,7 @@ static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrush_SetStipple(_arg0,*_arg1); + wxBrush_SetStipple(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6026,7 +5825,7 @@ static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrush_SetStyle(_arg0,_arg1); + wxBrush_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6071,7 +5870,7 @@ static PyObject *_wrap_wxBrushList_AddBrush(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrushList_AddBrush(_arg0,_arg1); + wxBrushList_AddBrush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6110,7 +5909,7 @@ static PyObject *_wrap_wxBrushList_FindOrCreateBrush(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); + _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6152,7 +5951,7 @@ static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrushList_RemoveBrush(_arg0,_arg1); + wxBrushList_RemoveBrush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6181,7 +5980,7 @@ static PyObject *_wrap_wxBrushList_GetCount(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBrushList_GetCount(_arg0); + _result = (int )wxBrushList_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6216,7 +6015,7 @@ static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDC(_arg0); + delete_wxDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6244,7 +6043,7 @@ static PyObject *_wrap_wxDC_BeginDrawing(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_BeginDrawing(_arg0); + wxDC_BeginDrawing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6290,7 +6089,7 @@ static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6317,7 +6116,7 @@ static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_Clear(_arg0); + wxDC_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6347,7 +6146,7 @@ static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_CrossHair(_arg0,_arg1,_arg2); + wxDC_CrossHair(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6375,7 +6174,7 @@ static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DestroyClippingRegion(_arg0); + wxDC_DestroyClippingRegion(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6405,7 +6204,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6434,7 +6233,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6463,7 +6262,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6492,7 +6291,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6525,7 +6324,7 @@ static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6556,7 +6355,7 @@ static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); + wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6588,7 +6387,7 @@ static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6622,7 +6421,7 @@ static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6661,7 +6460,7 @@ static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); + wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6695,22 +6494,9 @@ static PyObject *_wrap_wxDC_DrawLabel(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { _arg2 = &temp; @@ -6719,7 +6505,7 @@ static PyObject *_wrap_wxDC_DrawLabel(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawLabel(_arg0,*_arg1,*_arg2,_arg3,_arg4); + wxDC_DrawLabel(_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6765,22 +6551,9 @@ static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -6796,7 +6569,7 @@ static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxDC_DrawImageLabel(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + _result = new wxRect (wxDC_DrawImageLabel(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6832,7 +6605,7 @@ static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6876,7 +6649,7 @@ static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6924,7 +6697,7 @@ static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6957,7 +6730,7 @@ static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawPoint(_arg0,_arg1,_arg2); + wxDC_DrawPoint(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6989,7 +6762,7 @@ static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7021,26 +6794,13 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7077,7 +6837,7 @@ static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7119,7 +6879,7 @@ static PyObject *_wrap_wxDC_DrawSpline(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawSpline(_arg0,_arg1,_arg2); + wxDC_DrawSpline(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7153,26 +6913,13 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); + wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7204,7 +6951,7 @@ static PyObject *_wrap_wxDC_EndDoc(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_EndDoc(_arg0); + wxDC_EndDoc(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7232,7 +6979,7 @@ static PyObject *_wrap_wxDC_EndDrawing(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_EndDrawing(_arg0); + wxDC_EndDrawing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7260,7 +7007,7 @@ static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_EndPage(_arg0); + wxDC_EndPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7299,7 +7046,7 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); + wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7329,7 +7076,7 @@ static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBrush (wxDC_GetBackground(_arg0)); + _result = new wxBrush (wxDC_GetBackground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7359,7 +7106,7 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBrush (wxDC_GetBrush(_arg0)); + _result = new wxBrush (wxDC_GetBrush(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7388,7 +7135,7 @@ static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetCharHeight(_arg0); + _result = (long )wxDC_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7416,7 +7163,7 @@ static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetCharWidth(_arg0); + _result = (long )wxDC_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7463,7 +7210,7 @@ static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7513,7 +7260,7 @@ static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxDC_GetFont(_arg0)); + _result = new wxFont (wxDC_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7542,7 +7289,7 @@ static PyObject *_wrap_wxDC_GetLogicalFunction(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDC_GetLogicalFunction(_arg0); + _result = (int )wxDC_GetLogicalFunction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7579,7 +7326,7 @@ static PyObject *_wrap_wxDC_GetLogicalScale(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetLogicalScale(_arg0,_arg1,_arg2); + wxDC_GetLogicalScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7618,7 +7365,7 @@ static PyObject *_wrap_wxDC_GetMapMode(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDC_GetMapMode(_arg0); + _result = (int )wxDC_GetMapMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7646,7 +7393,7 @@ static PyObject *_wrap_wxDC_GetOptimization(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_GetOptimization(_arg0); + _result = (bool )wxDC_GetOptimization(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7675,7 +7422,7 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPen (wxDC_GetPen(_arg0)); + _result = new wxPen (wxDC_GetPen(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7711,7 +7458,7 @@ static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); + _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7754,7 +7501,7 @@ static PyObject *_wrap_wxDC_GetSizeTuple(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetSizeTuple(_arg0,_arg1,_arg2); + wxDC_GetSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7794,7 +7541,7 @@ static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxDC_GetSize(_arg0)); + _result = new wxSize (wxDC_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7824,7 +7571,7 @@ static PyObject *_wrap_wxDC_GetSizeMM(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxDC_GetSizeMM(_arg0)); + _result = new wxSize (wxDC_GetSizeMM(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7854,7 +7601,7 @@ static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxDC_GetTextBackground(_arg0)); + _result = new wxColour (wxDC_GetTextBackground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7893,26 +7640,13 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); + wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7977,22 +7711,9 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8003,7 +7724,7 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8057,7 +7778,7 @@ static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxDC_GetTextForeground(_arg0)); + _result = new wxColour (wxDC_GetTextForeground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8095,7 +7816,7 @@ static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetUserScale(_arg0,_arg1,_arg2); + wxDC_GetUserScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8135,7 +7856,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8164,7 +7885,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8193,7 +7914,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8222,7 +7943,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8250,7 +7971,7 @@ static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MaxX(_arg0); + _result = (long )wxDC_MaxX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8278,7 +7999,7 @@ static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MaxY(_arg0); + _result = (long )wxDC_MaxY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8306,7 +8027,7 @@ static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MinX(_arg0); + _result = (long )wxDC_MinX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8334,7 +8055,7 @@ static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MinY(_arg0); + _result = (long )wxDC_MinY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8362,7 +8083,7 @@ static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_Ok(_arg0); + _result = (bool )wxDC_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8391,7 +8112,7 @@ static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); + wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8428,7 +8149,7 @@ static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetBackground(_arg0,*_arg1); + wxDC_SetBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8457,7 +8178,7 @@ static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetBackgroundMode(_arg0,_arg1); + wxDC_SetBackgroundMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8489,7 +8210,7 @@ static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8526,7 +8247,7 @@ static PyObject *_wrap_wxDC_SetClippingRegionAsRegion(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); + wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8563,7 +8284,7 @@ static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetPalette(_arg0,*_arg1); + wxDC_SetPalette(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8600,7 +8321,7 @@ static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetBrush(_arg0,*_arg1); + wxDC_SetBrush(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8637,7 +8358,7 @@ static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetFont(_arg0,*_arg1); + wxDC_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8666,7 +8387,7 @@ static PyObject *_wrap_wxDC_SetLogicalFunction(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetLogicalFunction(_arg0,_arg1); + wxDC_SetLogicalFunction(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8696,7 +8417,7 @@ static PyObject *_wrap_wxDC_SetLogicalScale(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetLogicalScale(_arg0,_arg1,_arg2); + wxDC_SetLogicalScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8725,7 +8446,7 @@ static PyObject *_wrap_wxDC_SetMapMode(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetMapMode(_arg0,_arg1); + wxDC_SetMapMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8756,7 +8477,7 @@ static PyObject *_wrap_wxDC_SetOptimization(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetOptimization(_arg0,_arg1); + wxDC_SetOptimization(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8793,7 +8514,7 @@ static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetPen(_arg0,*_arg1); + wxDC_SetPen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8829,7 +8550,7 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetTextBackground(_arg0,*_arg1); + wxDC_SetTextBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8865,7 +8586,7 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetTextForeground(_arg0,*_arg1); + wxDC_SetTextForeground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8895,7 +8616,7 @@ static PyObject *_wrap_wxDC_SetUserScale(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetUserScale(_arg0,_arg1,_arg2); + wxDC_SetUserScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8925,26 +8646,13 @@ static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_StartDoc(_arg0,*_arg1); + _result = (bool )wxDC_StartDoc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8975,7 +8683,7 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_StartPage(_arg0); + wxDC_StartPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9015,7 +8723,7 @@ static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9044,7 +8752,7 @@ static PyObject *_wrap_wxDC_CanDrawBitmap(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_CanDrawBitmap(_arg0); + _result = (bool )wxDC_CanDrawBitmap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9072,7 +8780,7 @@ static PyObject *_wrap_wxDC_CanGetTextExtent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_CanGetTextExtent(_arg0); + _result = (bool )wxDC_CanGetTextExtent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9100,7 +8808,7 @@ static PyObject *_wrap_wxDC_GetDepth(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDC_GetDepth(_arg0); + _result = (int )wxDC_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9129,7 +8837,7 @@ static PyObject *_wrap_wxDC_GetPPI(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxDC_GetPPI(_arg0)); + _result = new wxSize (wxDC_GetPPI(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9167,7 +8875,7 @@ static PyObject *_wrap_wxDC_GetLogicalOrigin(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetLogicalOrigin(_arg0,_arg1,_arg2); + wxDC_GetLogicalOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9207,7 +8915,7 @@ static PyObject *_wrap_wxDC_SetLogicalOrigin(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetLogicalOrigin(_arg0,_arg1,_arg2); + wxDC_SetLogicalOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9245,7 +8953,7 @@ static PyObject *_wrap_wxDC_GetDeviceOrigin(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetDeviceOrigin(_arg0,_arg1,_arg2); + wxDC_GetDeviceOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9289,7 +8997,7 @@ static PyObject *_wrap_wxDC_SetAxisOrientation(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetAxisOrientation(_arg0,_arg1,_arg2); + wxDC_SetAxisOrientation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9319,7 +9027,7 @@ static PyObject *_wrap_wxDC_CalcBoundingBox(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); + wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9347,7 +9055,7 @@ static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_ResetBoundingBox(_arg0); + wxDC_ResetBoundingBox(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9394,7 +9102,7 @@ static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9521,7 +9229,7 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); + _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9629,7 +9337,7 @@ static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); + _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9667,7 +9375,7 @@ static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMemoryDC *)new_wxMemoryDC(); + _result = (wxMemoryDC *)new_wxMemoryDC(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9709,7 +9417,7 @@ static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMemoryDC_SelectObject(_arg0,*_arg1); + wxMemoryDC_SelectObject(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9746,7 +9454,7 @@ static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScreenDC *)new_wxScreenDC(); + _result = (wxScreenDC *)new_wxScreenDC(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9789,7 +9497,7 @@ static PyObject *_wrap_wxScreenDC_StartDrawingOnTopWin(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScreenDC_StartDrawingOnTopWin(_arg0,_arg1); + _result = (bool )wxScreenDC_StartDrawingOnTopWin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9826,7 +9534,7 @@ static PyObject *_wrap_wxScreenDC_StartDrawingOnTop(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); + _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9854,7 +9562,7 @@ static PyObject *_wrap_wxScreenDC_EndDrawingOnTop(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); + _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9899,7 +9607,7 @@ static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxClientDC *)new_wxClientDC(_arg0); + _result = (wxClientDC *)new_wxClientDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9950,7 +9658,7 @@ static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaintDC *)new_wxPaintDC(_arg0); + _result = (wxPaintDC *)new_wxPaintDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10001,7 +9709,7 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowDC *)new_wxWindowDC(_arg0); + _result = (wxWindowDC *)new_wxWindowDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10077,7 +9785,7 @@ static PyObject *_wrap_new_wxPalette(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); + _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10119,7 +9827,7 @@ static PyObject *_wrap_delete_wxPalette(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPalette(_arg0); + delete_wxPalette(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10151,7 +9859,7 @@ static PyObject *_wrap_wxPalette_GetPixel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); + _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10195,7 +9903,7 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10238,7 +9946,7 @@ static PyObject *_wrap_wxPalette_Ok(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPalette_Ok(_arg0); + _result = (bool )wxPalette_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10270,7 +9978,7 @@ static PyObject *_wrap_new_wxImageList(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); + _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10303,7 +10011,7 @@ static PyObject *_wrap_delete_wxImageList(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxImageList(_arg0); + delete_wxImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10350,7 +10058,7 @@ static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); + _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10395,7 +10103,7 @@ static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); + _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10432,7 +10140,7 @@ static PyObject *_wrap_wxImageList_AddIcon(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_AddIcon(_arg0,*_arg1); + _result = (int )wxImageList_AddIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10470,7 +10178,7 @@ static PyObject *_wrap_wxImageList_Replace(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2); + _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10514,7 +10222,7 @@ static PyObject *_wrap_wxImageList_Draw(PyObject *self, PyObject *args, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10542,7 +10250,7 @@ static PyObject *_wrap_wxImageList_GetImageCount(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_GetImageCount(_arg0); + _result = (int )wxImageList_GetImageCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10571,7 +10279,7 @@ static PyObject *_wrap_wxImageList_Remove(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_Remove(_arg0,_arg1); + _result = (bool )wxImageList_Remove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10599,7 +10307,7 @@ static PyObject *_wrap_wxImageList_RemoveAll(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_RemoveAll(_arg0); + _result = (bool )wxImageList_RemoveAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10637,7 +10345,7 @@ static PyObject *_wrap_wxImageList_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); + wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10688,7 +10396,7 @@ static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10721,7 +10429,7 @@ static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRegion(_arg0); + delete_wxRegion(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10749,7 +10457,7 @@ static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegion_Clear(_arg0); + wxRegion_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10780,7 +10488,7 @@ static PyObject *_wrap_wxRegion_Offset(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Offset(_arg0,_arg1,_arg2); + _result = (bool )wxRegion_Offset(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10810,7 +10518,7 @@ static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); + _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10846,7 +10554,7 @@ static PyObject *_wrap_wxRegion_ContainsPoint(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); + _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10882,7 +10590,7 @@ static PyObject *_wrap_wxRegion_ContainsRect(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); + _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10914,7 +10622,7 @@ static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10943,7 +10651,7 @@ static PyObject *_wrap_wxRegion_GetBox(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRegion_GetBox(_arg0)); + _result = new wxRect (wxRegion_GetBox(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10976,7 +10684,7 @@ static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11012,7 +10720,7 @@ static PyObject *_wrap_wxRegion_IntersectRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); + _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11049,7 +10757,7 @@ static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); + _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11077,7 +10785,7 @@ static PyObject *_wrap_wxRegion_IsEmpty(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_IsEmpty(_arg0); + _result = (bool )wxRegion_IsEmpty(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11109,7 +10817,7 @@ static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11145,7 +10853,7 @@ static PyObject *_wrap_wxRegion_UnionRect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); + _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11182,7 +10890,7 @@ static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); + _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11214,7 +10922,7 @@ static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11250,7 +10958,7 @@ static PyObject *_wrap_wxRegion_SubtractRect(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); + _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11287,7 +10995,7 @@ static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); + _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11319,7 +11027,7 @@ static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11355,7 +11063,7 @@ static PyObject *_wrap_wxRegion_XorRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_XorRect(_arg0,*_arg1); + _result = (bool )wxRegion_XorRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11392,7 +11100,7 @@ static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); + _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11429,7 +11137,7 @@ static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); + _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11462,7 +11170,7 @@ static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRegionIterator(_arg0); + delete_wxRegionIterator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11491,7 +11199,7 @@ static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetX(_arg0); + _result = (long )wxRegionIterator_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11519,7 +11227,7 @@ static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetY(_arg0); + _result = (long )wxRegionIterator_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11547,7 +11255,7 @@ static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetW(_arg0); + _result = (long )wxRegionIterator_GetW(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11575,7 +11283,7 @@ static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetWidth(_arg0); + _result = (long )wxRegionIterator_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11603,7 +11311,7 @@ static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetH(_arg0); + _result = (long )wxRegionIterator_GetH(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11631,7 +11339,7 @@ static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetHeight(_arg0); + _result = (long )wxRegionIterator_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11660,7 +11368,7 @@ static PyObject *_wrap_wxRegionIterator_GetRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRegionIterator_GetRect(_arg0)); + _result = new wxRect (wxRegionIterator_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11689,7 +11397,7 @@ static PyObject *_wrap_wxRegionIterator_HaveRects(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegionIterator_HaveRects(_arg0); + _result = (bool )wxRegionIterator_HaveRects(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11716,7 +11424,7 @@ static PyObject *_wrap_wxRegionIterator_Reset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegionIterator_Reset(_arg0); + wxRegionIterator_Reset(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11746,7 +11454,7 @@ static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegionIterator_Next(_arg0); + wxRegionIterator_Next(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index 70512a9921..3b59ce1521 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - #define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \ wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ wxGridCellAttr* rval = NULL; \ @@ -179,7 +173,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ wxString CBNAME(int a, int b) { \ wxPyBeginBlockThreads(); \ @@ -198,7 +192,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ void CBNAME(int a, int b, const wxString& c) { \ wxPyBeginBlockThreads(); \ @@ -207,7 +201,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { wxPyEndBlockThreads(); \ } - +// TODO: unicode fix #define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ wxString CBNAME(int a, int b) { \ bool found; \ @@ -232,7 +226,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ bool CBNAME(int a, int b, const wxString& c) { \ bool rval = 0; \ @@ -365,7 +359,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ wxString CBNAME(int a) { \ bool found; \ @@ -390,7 +384,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ void CBNAME(int a, const wxString& c) { \ bool found; \ @@ -730,8 +724,13 @@ public: PyObject* ro; ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); if (ro) { - PyObject* str = PyObject_Str(ro); - rval = PyString_AsString(str); +#if wxUSE_UNICODE + PyObject* str = PyObject_Unicode(ro); + rval = PyUnicode_AS_UNICODE(str); +#else + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); +#endif Py_DECREF(ro); Py_DECREF(str); } @@ -742,8 +741,13 @@ public: void SetValue(int row, int col, const wxString& val) { wxPyBeginBlockThreads(); - if (wxPyCBH_findCallback(m_myInst, "SetValue")) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { +#if wxUSE_UNICODE + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiu)",row,col,val.c_str())); +#else + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); +#endif + } wxPyEndBlockThreads(); } @@ -895,26 +899,13 @@ static PyObject *_wrap_wxGridCellRenderer_SetParameters(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_SetParameters(_arg0,*_arg1); + wxGridCellRenderer_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -946,7 +937,7 @@ static PyObject *_wrap_wxGridCellRenderer_IncRef(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_IncRef(_arg0); + wxGridCellRenderer_IncRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -974,7 +965,7 @@ static PyObject *_wrap_wxGridCellRenderer_DecRef(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_DecRef(_arg0); + wxGridCellRenderer_DecRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1042,7 +1033,7 @@ static PyObject *_wrap_wxGridCellRenderer_Draw(PyObject *self, PyObject *args, P _arg7 = (bool ) tempbool7; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_Draw(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7); + wxGridCellRenderer_Draw(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1101,7 +1092,7 @@ static PyObject *_wrap_wxGridCellRenderer_GetBestSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGridCellRenderer_GetBestSize(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + _result = new wxSize (wxGridCellRenderer_GetBestSize(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1131,7 +1122,7 @@ static PyObject *_wrap_wxGridCellRenderer_Clone(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGridCellRenderer_Clone(_arg0); + _result = (wxGridCellRenderer *)wxGridCellRenderer_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1165,7 +1156,7 @@ static PyObject *_wrap_new_wxPyGridCellRenderer(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridCellRenderer *)new_wxPyGridCellRenderer(); + _result = (wxPyGridCellRenderer *)new_wxPyGridCellRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1208,7 +1199,7 @@ static PyObject *_wrap_wxPyGridCellRenderer__setCallbackInfo(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellRenderer__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridCellRenderer__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1237,26 +1228,13 @@ static PyObject *_wrap_wxPyGridCellRenderer_base_SetParameters(PyObject *self, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellRenderer_base_SetParameters(_arg0,*_arg1); + wxPyGridCellRenderer_base_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1289,7 +1267,7 @@ static PyObject *_wrap_new_wxGridCellStringRenderer(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellStringRenderer *)new_wxGridCellStringRenderer(); + _result = (wxGridCellStringRenderer *)new_wxGridCellStringRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1309,7 @@ static PyObject *_wrap_new_wxGridCellNumberRenderer(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellNumberRenderer *)new_wxGridCellNumberRenderer(); + _result = (wxGridCellNumberRenderer *)new_wxGridCellNumberRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1375,7 +1353,7 @@ static PyObject *_wrap_new_wxGridCellFloatRenderer(PyObject *self, PyObject *arg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellFloatRenderer *)new_wxGridCellFloatRenderer(_arg0,_arg1); + _result = (wxGridCellFloatRenderer *)new_wxGridCellFloatRenderer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1409,7 +1387,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_GetWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellFloatRenderer_GetWidth(_arg0); + _result = (int )wxGridCellFloatRenderer_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1437,7 +1415,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_SetWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellFloatRenderer_SetWidth(_arg0,_arg1); + wxGridCellFloatRenderer_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1466,7 +1444,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_GetPrecision(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellFloatRenderer_GetPrecision(_arg0); + _result = (int )wxGridCellFloatRenderer_GetPrecision(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1494,7 +1472,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_SetPrecision(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellFloatRenderer_SetPrecision(_arg0,_arg1); + wxGridCellFloatRenderer_SetPrecision(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1523,7 +1501,7 @@ static PyObject *_wrap_new_wxGridCellBoolRenderer(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellBoolRenderer *)new_wxGridCellBoolRenderer(); + _result = (wxGridCellBoolRenderer *)new_wxGridCellBoolRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1569,45 +1547,19 @@ static PyObject *_wrap_new_wxGridCellDateTimeRenderer(PyObject *self, PyObject * return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellDateTimeRenderer *)new_wxGridCellDateTimeRenderer(*_arg0,*_arg1); + _result = (wxGridCellDateTimeRenderer *)new_wxGridCellDateTimeRenderer(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1666,7 +1618,7 @@ static PyObject *_wrap_new_wxGridCellEnumRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEnumRenderer *)new_wxGridCellEnumRenderer(*_arg0); + _result = (wxGridCellEnumRenderer *)new_wxGridCellEnumRenderer(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1711,7 +1663,7 @@ static PyObject *_wrap_new_wxGridCellAutoWrapStringRenderer(PyObject *self, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAutoWrapStringRenderer *)new_wxGridCellAutoWrapStringRenderer(); + _result = (wxGridCellAutoWrapStringRenderer *)new_wxGridCellAutoWrapStringRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,7 +1697,7 @@ static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellEditor_IsCreated(_arg0); + _result = (bool )wxGridCellEditor_IsCreated(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1773,7 +1725,7 @@ static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); + _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1809,7 +1761,7 @@ static PyObject *_wrap_wxGridCellEditor_SetControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_SetControl(_arg0,_arg1); + wxGridCellEditor_SetControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1838,26 +1790,13 @@ static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_SetParameters(_arg0,*_arg1); + wxGridCellEditor_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1889,7 +1828,7 @@ static PyObject *_wrap_wxGridCellEditor_IncRef(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_IncRef(_arg0); + wxGridCellEditor_IncRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1917,7 +1856,7 @@ static PyObject *_wrap_wxGridCellEditor_DecRef(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_DecRef(_arg0); + wxGridCellEditor_DecRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1964,7 +1903,7 @@ static PyObject *_wrap_wxGridCellEditor_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Create(_arg0,_arg1,_arg2,_arg3); + wxGridCellEditor_Create(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2003,7 +1942,7 @@ static PyObject *_wrap_wxGridCellEditor_BeginEdit(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_BeginEdit(_arg0,_arg1,_arg2,_arg3); + wxGridCellEditor_BeginEdit(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2043,7 +1982,7 @@ static PyObject *_wrap_wxGridCellEditor_EndEdit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellEditor_EndEdit(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGridCellEditor_EndEdit(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2070,7 +2009,7 @@ static PyObject *_wrap_wxGridCellEditor_Reset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Reset(_arg0); + wxGridCellEditor_Reset(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2100,7 +2039,7 @@ static PyObject *_wrap_wxGridCellEditor_Clone(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGridCellEditor_Clone(_arg0); + _result = (wxGridCellEditor *)wxGridCellEditor_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2141,7 +2080,7 @@ static PyObject *_wrap_wxGridCellEditor_SetSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_SetSize(_arg0,*_arg1); + wxGridCellEditor_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2181,7 +2120,7 @@ static PyObject *_wrap_wxGridCellEditor_Show(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Show(_arg0,_arg1,_arg2); + wxGridCellEditor_Show(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2226,7 +2165,7 @@ static PyObject *_wrap_wxGridCellEditor_PaintBackground(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_PaintBackground(_arg0,*_arg1,_arg2); + wxGridCellEditor_PaintBackground(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2264,7 +2203,7 @@ static PyObject *_wrap_wxGridCellEditor_IsAcceptedKey(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellEditor_IsAcceptedKey(_arg0,*_arg1); + _result = (bool )wxGridCellEditor_IsAcceptedKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2239,7 @@ static PyObject *_wrap_wxGridCellEditor_StartingKey(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_StartingKey(_arg0,*_arg1); + wxGridCellEditor_StartingKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2328,7 +2267,7 @@ static PyObject *_wrap_wxGridCellEditor_StartingClick(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_StartingClick(_arg0); + wxGridCellEditor_StartingClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2365,7 +2304,7 @@ static PyObject *_wrap_wxGridCellEditor_HandleReturn(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_HandleReturn(_arg0,*_arg1); + wxGridCellEditor_HandleReturn(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2393,7 +2332,7 @@ static PyObject *_wrap_wxGridCellEditor_Destroy(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Destroy(_arg0); + wxGridCellEditor_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2422,7 +2361,7 @@ static PyObject *_wrap_new_wxPyGridCellEditor(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridCellEditor *)new_wxPyGridCellEditor(); + _result = (wxPyGridCellEditor *)new_wxPyGridCellEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2465,7 +2404,7 @@ static PyObject *_wrap_wxPyGridCellEditor__setCallbackInfo(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridCellEditor__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2501,7 +2440,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_SetSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_SetSize(_arg0,*_arg1); + wxPyGridCellEditor_base_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2541,7 +2480,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_Show(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_Show(_arg0,_arg1,_arg2); + wxPyGridCellEditor_base_Show(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2525,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_PaintBackground(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_PaintBackground(_arg0,*_arg1,_arg2); + wxPyGridCellEditor_base_PaintBackground(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2623,7 +2562,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); + wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2660,7 +2599,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_StartingKey(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_StartingKey(_arg0,*_arg1); + wxPyGridCellEditor_base_StartingKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2688,7 +2627,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_StartingClick(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_StartingClick(_arg0); + wxPyGridCellEditor_base_StartingClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2725,7 +2664,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_HandleReturn(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_HandleReturn(_arg0,*_arg1); + wxPyGridCellEditor_base_HandleReturn(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2753,7 +2692,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_Destroy(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_Destroy(_arg0); + wxPyGridCellEditor_base_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2782,26 +2721,13 @@ static PyObject *_wrap_wxPyGridCellEditor_base_SetParameters(PyObject *self, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_SetParameters(_arg0,*_arg1); + wxPyGridCellEditor_base_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2834,7 +2760,7 @@ static PyObject *_wrap_new_wxGridCellTextEditor(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellTextEditor *)new_wxGridCellTextEditor(); + _result = (wxGridCellTextEditor *)new_wxGridCellTextEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2878,7 +2804,7 @@ static PyObject *_wrap_new_wxGridCellNumberEditor(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellNumberEditor *)new_wxGridCellNumberEditor(_arg0,_arg1); + _result = (wxGridCellNumberEditor *)new_wxGridCellNumberEditor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2920,7 +2846,7 @@ static PyObject *_wrap_new_wxGridCellFloatEditor(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellFloatEditor *)new_wxGridCellFloatEditor(); + _result = (wxGridCellFloatEditor *)new_wxGridCellFloatEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2954,7 +2880,7 @@ static PyObject *_wrap_new_wxGridCellBoolEditor(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellBoolEditor *)new_wxGridCellBoolEditor(); + _result = (wxGridCellBoolEditor *)new_wxGridCellBoolEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3009,7 +2935,7 @@ static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2); + _result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3063,7 +2989,7 @@ static PyObject *_wrap_new_wxGridCellEnumEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEnumEditor *)new_wxGridCellEnumEditor(*_arg0); + _result = (wxGridCellEnumEditor *)new_wxGridCellEnumEditor(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3108,7 +3034,7 @@ static PyObject *_wrap_new_wxGridCellAutoWrapStringEditor(PyObject *self, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAutoWrapStringEditor *)new_wxGridCellAutoWrapStringEditor(); + _result = (wxGridCellAutoWrapStringEditor *)new_wxGridCellAutoWrapStringEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3143,7 +3069,7 @@ static PyObject *_wrap_new_wxGridCellAttr(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)new_wxGridCellAttr(_arg0); + _result = (wxGridCellAttr *)new_wxGridCellAttr(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3178,7 +3104,7 @@ static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxGridCellAttr_Clone(_arg0); + _result = (wxGridCellAttr *)wxGridCellAttr_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3220,7 +3146,7 @@ static PyObject *_wrap_wxGridCellAttr_MergeWith(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_MergeWith(_arg0,_arg1); + wxGridCellAttr_MergeWith(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3248,7 +3174,7 @@ static PyObject *_wrap_wxGridCellAttr_IncRef(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_IncRef(_arg0); + wxGridCellAttr_IncRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3276,7 +3202,7 @@ static PyObject *_wrap_wxGridCellAttr_DecRef(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_DecRef(_arg0); + wxGridCellAttr_DecRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3312,7 +3238,7 @@ static PyObject *_wrap_wxGridCellAttr_SetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetTextColour(_arg0,*_arg1); + wxGridCellAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3348,7 +3274,7 @@ static PyObject *_wrap_wxGridCellAttr_SetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetBackgroundColour(_arg0,*_arg1); + wxGridCellAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3385,7 +3311,7 @@ static PyObject *_wrap_wxGridCellAttr_SetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetFont(_arg0,*_arg1); + wxGridCellAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3415,7 +3341,7 @@ static PyObject *_wrap_wxGridCellAttr_SetAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetAlignment(_arg0,_arg1,_arg2); + wxGridCellAttr_SetAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3446,7 +3372,7 @@ static PyObject *_wrap_wxGridCellAttr_SetReadOnly(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetReadOnly(_arg0,_arg1); + wxGridCellAttr_SetReadOnly(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3483,7 +3409,7 @@ static PyObject *_wrap_wxGridCellAttr_SetRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetRenderer(_arg0,_arg1); + wxGridCellAttr_SetRenderer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3520,7 +3446,7 @@ static PyObject *_wrap_wxGridCellAttr_SetEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetEditor(_arg0,_arg1); + wxGridCellAttr_SetEditor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3549,7 +3475,7 @@ static PyObject *_wrap_wxGridCellAttr_SetKind(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetKind(_arg0,_arg1); + wxGridCellAttr_SetKind(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3578,7 +3504,7 @@ static PyObject *_wrap_wxGridCellAttr_HasTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasTextColour(_arg0); + _result = (bool )wxGridCellAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3606,7 +3532,7 @@ static PyObject *_wrap_wxGridCellAttr_HasBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasBackgroundColour(_arg0); + _result = (bool )wxGridCellAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3634,7 +3560,7 @@ static PyObject *_wrap_wxGridCellAttr_HasFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasFont(_arg0); + _result = (bool )wxGridCellAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3662,7 +3588,7 @@ static PyObject *_wrap_wxGridCellAttr_HasAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasAlignment(_arg0); + _result = (bool )wxGridCellAttr_HasAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3690,7 +3616,7 @@ static PyObject *_wrap_wxGridCellAttr_HasRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasRenderer(_arg0); + _result = (bool )wxGridCellAttr_HasRenderer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3718,7 +3644,7 @@ static PyObject *_wrap_wxGridCellAttr_HasEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasEditor(_arg0); + _result = (bool )wxGridCellAttr_HasEditor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3746,7 +3672,7 @@ static PyObject *_wrap_wxGridCellAttr_HasReadWriteMode(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasReadWriteMode(_arg0); + _result = (bool )wxGridCellAttr_HasReadWriteMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3775,7 +3701,7 @@ static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGridCellAttr_GetTextColour(_arg0)); + _result = new wxColour (wxGridCellAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3805,7 +3731,7 @@ static PyObject *_wrap_wxGridCellAttr_GetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGridCellAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxGridCellAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3835,7 +3761,7 @@ static PyObject *_wrap_wxGridCellAttr_GetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGridCellAttr_GetFont(_arg0)); + _result = new wxFont (wxGridCellAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3873,7 +3799,7 @@ static PyObject *_wrap_wxGridCellAttr_GetAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_GetAlignment(_arg0,_arg1,_arg2); + wxGridCellAttr_GetAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3924,7 +3850,7 @@ static PyObject *_wrap_wxGridCellAttr_GetRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGridCellAttr_GetRenderer(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellRenderer *)wxGridCellAttr_GetRenderer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3970,7 +3896,7 @@ static PyObject *_wrap_wxGridCellAttr_GetEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGridCellAttr_GetEditor(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellEditor *)wxGridCellAttr_GetEditor(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4004,7 +3930,7 @@ static PyObject *_wrap_wxGridCellAttr_IsReadOnly(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_IsReadOnly(_arg0); + _result = (bool )wxGridCellAttr_IsReadOnly(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4040,7 +3966,7 @@ static PyObject *_wrap_wxGridCellAttr_SetDefAttr(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetDefAttr(_arg0,_arg1); + wxGridCellAttr_SetDefAttr(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4061,7 +3987,7 @@ static PyObject *_wrap_new_wxGridCellAttrProvider(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttrProvider *)new_wxGridCellAttrProvider(); + _result = (wxGridCellAttrProvider *)new_wxGridCellAttrProvider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4099,7 +4025,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4143,7 +4069,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_SetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxGridCellAttrProvider_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4181,7 +4107,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_SetRowAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_SetRowAttr(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4219,7 +4145,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_SetColAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_SetColAttr(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4249,7 +4175,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrRows(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_UpdateAttrRows(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_UpdateAttrRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4279,7 +4205,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrCols(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_UpdateAttrCols(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_UpdateAttrCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4308,7 +4234,7 @@ static PyObject *_wrap_new_wxPyGridCellAttrProvider(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridCellAttrProvider *)new_wxPyGridCellAttrProvider(); + _result = (wxPyGridCellAttrProvider *)new_wxPyGridCellAttrProvider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4351,7 +4277,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider__setCallbackInfo(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4384,7 +4310,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4428,7 +4354,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetAttr(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxPyGridCellAttrProvider_base_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4466,7 +4392,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetRowAttr(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider_base_SetRowAttr(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider_base_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4504,7 +4430,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetColAttr(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider_base_SetColAttr(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider_base_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4549,7 +4475,7 @@ static PyObject *_wrap_wxGridTableBase_SetAttrProvider(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetAttrProvider(_arg0,_arg1); + wxGridTableBase_SetAttrProvider(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4579,7 +4505,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttrProvider(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttrProvider *)wxGridTableBase_GetAttrProvider(_arg0); + _result = (wxGridCellAttrProvider *)wxGridTableBase_GetAttrProvider(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4621,7 +4547,7 @@ static PyObject *_wrap_wxGridTableBase_SetView(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetView(_arg0,_arg1); + wxGridTableBase_SetView(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4650,7 +4576,7 @@ static PyObject *_wrap_wxGridTableBase_GetView(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGrid *)wxGridTableBase_GetView(_arg0); + _result = (wxGrid *)wxGridTableBase_GetView(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4678,7 +4604,7 @@ static PyObject *_wrap_wxGridTableBase_GetNumberRows(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableBase_GetNumberRows(_arg0); + _result = (int )wxGridTableBase_GetNumberRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4706,7 +4632,7 @@ static PyObject *_wrap_wxGridTableBase_GetNumberCols(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableBase_GetNumberCols(_arg0); + _result = (int )wxGridTableBase_GetNumberCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4736,7 +4662,7 @@ static PyObject *_wrap_wxGridTableBase_IsEmptyCell(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_IsEmptyCell(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_IsEmptyCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4766,12 +4692,16 @@ static PyObject *_wrap_wxGridTableBase_GetValue(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetValue(_arg0,_arg1,_arg2)); + _result = new wxString (wxGridTableBase_GetValue(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4801,26 +4731,13 @@ static PyObject *_wrap_wxGridTableBase_SetValue(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValue(_arg0,_arg1,_arg2,*_arg3); + wxGridTableBase_SetValue(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4855,12 +4772,16 @@ static PyObject *_wrap_wxGridTableBase_GetTypeName(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetTypeName(_arg0,_arg1,_arg2)); + _result = new wxString (wxGridTableBase_GetTypeName(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4891,26 +4812,13 @@ static PyObject *_wrap_wxGridTableBase_CanGetValueAs(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxGridTableBase_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4945,26 +4853,13 @@ static PyObject *_wrap_wxGridTableBase_CanSetValueAs(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxGridTableBase_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4998,7 +4893,7 @@ static PyObject *_wrap_wxGridTableBase_GetValueAsLong(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGridTableBase_GetValueAsLong(_arg0,_arg1,_arg2); + _result = (long )wxGridTableBase_GetValueAsLong(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5028,7 +4923,7 @@ static PyObject *_wrap_wxGridTableBase_GetValueAsDouble(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxGridTableBase_GetValueAsDouble(_arg0,_arg1,_arg2); + _result = (double )wxGridTableBase_GetValueAsDouble(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5058,7 +4953,7 @@ static PyObject *_wrap_wxGridTableBase_GetValueAsBool(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_GetValueAsBool(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_GetValueAsBool(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5088,7 +4983,7 @@ static PyObject *_wrap_wxGridTableBase_SetValueAsLong(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValueAsLong(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetValueAsLong(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5119,7 +5014,7 @@ static PyObject *_wrap_wxGridTableBase_SetValueAsDouble(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValueAsDouble(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetValueAsDouble(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5152,7 +5047,7 @@ static PyObject *_wrap_wxGridTableBase_SetValueAsBool(PyObject *self, PyObject * _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValueAsBool(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetValueAsBool(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5180,7 +5075,7 @@ static PyObject *_wrap_wxGridTableBase_Clear(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_Clear(_arg0); + wxGridTableBase_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5211,7 +5106,7 @@ static PyObject *_wrap_wxGridTableBase_InsertRows(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_InsertRows(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_InsertRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5240,7 +5135,7 @@ static PyObject *_wrap_wxGridTableBase_AppendRows(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_AppendRows(_arg0,_arg1); + _result = (bool )wxGridTableBase_AppendRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5270,7 +5165,7 @@ static PyObject *_wrap_wxGridTableBase_DeleteRows(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_DeleteRows(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_DeleteRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5300,7 +5195,7 @@ static PyObject *_wrap_wxGridTableBase_InsertCols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_InsertCols(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_InsertCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5329,7 +5224,7 @@ static PyObject *_wrap_wxGridTableBase_AppendCols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_AppendCols(_arg0,_arg1); + _result = (bool )wxGridTableBase_AppendCols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5359,7 +5254,7 @@ static PyObject *_wrap_wxGridTableBase_DeleteCols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_DeleteCols(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_DeleteCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5388,12 +5283,16 @@ static PyObject *_wrap_wxGridTableBase_GetRowLabelValue(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetRowLabelValue(_arg0,_arg1)); + _result = new wxString (wxGridTableBase_GetRowLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5422,12 +5321,16 @@ static PyObject *_wrap_wxGridTableBase_GetColLabelValue(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetColLabelValue(_arg0,_arg1)); + _result = new wxString (wxGridTableBase_GetColLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5456,26 +5359,13 @@ static PyObject *_wrap_wxGridTableBase_SetRowLabelValue(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetRowLabelValue(_arg0,_arg1,*_arg2); + wxGridTableBase_SetRowLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5509,26 +5399,13 @@ static PyObject *_wrap_wxGridTableBase_SetColLabelValue(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetColLabelValue(_arg0,_arg1,*_arg2); + wxGridTableBase_SetColLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5561,7 +5438,7 @@ static PyObject *_wrap_wxGridTableBase_CanHaveAttributes(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_CanHaveAttributes(_arg0); + _result = (bool )wxGridTableBase_CanHaveAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5593,7 +5470,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5637,7 +5514,7 @@ static PyObject *_wrap_wxGridTableBase_SetAttr(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5675,7 +5552,7 @@ static PyObject *_wrap_wxGridTableBase_SetRowAttr(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetRowAttr(_arg0,_arg1,_arg2); + wxGridTableBase_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5713,7 +5590,7 @@ static PyObject *_wrap_wxGridTableBase_SetColAttr(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetColAttr(_arg0,_arg1,_arg2); + wxGridTableBase_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5750,7 +5627,7 @@ static PyObject *_wrap_new_wxPyGridTableBase(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridTableBase *)new_wxPyGridTableBase(); + _result = (wxPyGridTableBase *)new_wxPyGridTableBase(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5793,7 +5670,7 @@ static PyObject *_wrap_wxPyGridTableBase__setCallbackInfo(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridTableBase__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5821,7 +5698,7 @@ static PyObject *_wrap_wxPyGridTableBase_Destroy(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_Destroy(_arg0); + wxPyGridTableBase_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5852,12 +5729,16 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetTypeName(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyGridTableBase_base_GetTypeName(_arg0,_arg1,_arg2)); + _result = new wxString (wxPyGridTableBase_base_GetTypeName(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5888,26 +5769,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanGetValueAs(PyObject *self, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxPyGridTableBase_base_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5942,26 +5810,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanSetValueAs(PyObject *self, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxPyGridTableBase_base_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5992,7 +5847,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_Clear(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_Clear(_arg0); + wxPyGridTableBase_base_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6023,7 +5878,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_InsertRows(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_InsertRows(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_InsertRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6052,7 +5907,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_AppendRows(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_AppendRows(_arg0,_arg1); + _result = (bool )wxPyGridTableBase_base_AppendRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6082,7 +5937,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_DeleteRows(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_DeleteRows(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_DeleteRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6112,7 +5967,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_InsertCols(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_InsertCols(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_InsertCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6141,7 +5996,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_AppendCols(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_AppendCols(_arg0,_arg1); + _result = (bool )wxPyGridTableBase_base_AppendCols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6171,7 +6026,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_DeleteCols(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_DeleteCols(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_DeleteCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6200,12 +6055,16 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetRowLabelValue(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyGridTableBase_base_GetRowLabelValue(_arg0,_arg1)); + _result = new wxString (wxPyGridTableBase_base_GetRowLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6234,12 +6093,16 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetColLabelValue(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyGridTableBase_base_GetColLabelValue(_arg0,_arg1)); + _result = new wxString (wxPyGridTableBase_base_GetColLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6268,26 +6131,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetRowLabelValue(PyObject *self, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetRowLabelValue(_arg0,_arg1,*_arg2); + wxPyGridTableBase_base_SetRowLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6321,26 +6171,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetColLabelValue(PyObject *self, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetColLabelValue(_arg0,_arg1,*_arg2); + wxPyGridTableBase_base_SetColLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6373,7 +6210,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanHaveAttributes(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_CanHaveAttributes(_arg0); + _result = (bool )wxPyGridTableBase_base_CanHaveAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6405,7 +6242,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6449,7 +6286,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxPyGridTableBase_base_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6487,7 +6324,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetRowAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetRowAttr(_arg0,_arg1,_arg2); + wxPyGridTableBase_base_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6525,7 +6362,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetColAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetColAttr(_arg0,_arg1,_arg2); + wxPyGridTableBase_base_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6564,7 +6401,7 @@ static PyObject *_wrap_new_wxGridStringTable(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridStringTable *)new_wxGridStringTable(_arg0,_arg1); + _result = (wxGridStringTable *)new_wxGridStringTable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6602,7 +6439,7 @@ static PyObject *_wrap_new_wxGridTableMessage(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridTableMessage *)new_wxGridTableMessage(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridTableMessage *)new_wxGridTableMessage(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6635,7 +6472,7 @@ static PyObject *_wrap_delete_wxGridTableMessage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGridTableMessage(_arg0); + delete_wxGridTableMessage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6672,7 +6509,7 @@ static PyObject *_wrap_wxGridTableMessage_SetTableObject(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetTableObject(_arg0,_arg1); + wxGridTableMessage_SetTableObject(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6701,7 +6538,7 @@ static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); + _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6729,7 +6566,7 @@ static PyObject *_wrap_wxGridTableMessage_SetId(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetId(_arg0,_arg1); + wxGridTableMessage_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6758,7 +6595,7 @@ static PyObject *_wrap_wxGridTableMessage_GetId(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableMessage_GetId(_arg0); + _result = (int )wxGridTableMessage_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6786,7 +6623,7 @@ static PyObject *_wrap_wxGridTableMessage_SetCommandInt(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetCommandInt(_arg0,_arg1); + wxGridTableMessage_SetCommandInt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6815,7 +6652,7 @@ static PyObject *_wrap_wxGridTableMessage_GetCommandInt(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableMessage_GetCommandInt(_arg0); + _result = (int )wxGridTableMessage_GetCommandInt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6843,7 +6680,7 @@ static PyObject *_wrap_wxGridTableMessage_SetCommandInt2(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetCommandInt2(_arg0,_arg1); + wxGridTableMessage_SetCommandInt2(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6872,7 +6709,7 @@ static PyObject *_wrap_wxGridTableMessage_GetCommandInt2(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableMessage_GetCommandInt2(_arg0); + _result = (int )wxGridTableMessage_GetCommandInt2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6894,7 +6731,7 @@ static PyObject *_wrap_new_wxGridCellCoords(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellCoords *)new_wxGridCellCoords(_arg0,_arg1); + _result = (wxGridCellCoords *)new_wxGridCellCoords(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6927,7 +6764,7 @@ static PyObject *_wrap_delete_wxGridCellCoords(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGridCellCoords(_arg0); + delete_wxGridCellCoords(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6956,7 +6793,7 @@ static PyObject *_wrap_wxGridCellCoords_GetRow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellCoords_GetRow(_arg0); + _result = (int )wxGridCellCoords_GetRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6984,7 +6821,7 @@ static PyObject *_wrap_wxGridCellCoords_SetRow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellCoords_SetRow(_arg0,_arg1); + wxGridCellCoords_SetRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7013,7 +6850,7 @@ static PyObject *_wrap_wxGridCellCoords_GetCol(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellCoords_GetCol(_arg0); + _result = (int )wxGridCellCoords_GetCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7041,7 +6878,7 @@ static PyObject *_wrap_wxGridCellCoords_SetCol(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellCoords_SetCol(_arg0,_arg1); + wxGridCellCoords_SetCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7071,7 +6908,7 @@ static PyObject *_wrap_wxGridCellCoords_Set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellCoords_Set(_arg0,_arg1,_arg2); + wxGridCellCoords_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7105,7 +6942,7 @@ static PyObject *_wrap_wxGridCellCoords_asTuple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxGridCellCoords_asTuple(_arg0); + _result = (PyObject *)wxGridCellCoords_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7146,7 +6983,7 @@ static PyObject *_wrap_wxGridCellCoords___cmp__(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellCoords___cmp__(_arg0,*_arg1); + _result = (int )wxGridCellCoords___cmp__(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7236,7 +7073,7 @@ static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7273,7 +7110,7 @@ static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7301,7 +7138,7 @@ static PyObject *_wrap_wxGrid_SetSelectionMode(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetSelectionMode(_arg0,_arg1); + wxGrid_SetSelectionMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7330,7 +7167,7 @@ static PyObject *_wrap_wxGrid_GetNumberRows(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetNumberRows(_arg0); + _result = (int )wxGrid_GetNumberRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7358,7 +7195,7 @@ static PyObject *_wrap_wxGrid_GetNumberCols(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetNumberCols(_arg0); + _result = (int )wxGrid_GetNumberCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7395,7 +7232,7 @@ static PyObject *_wrap_wxGrid_ProcessTableMessage(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_ProcessTableMessage(_arg0,*_arg1); + _result = (bool )wxGrid_ProcessTableMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7423,7 +7260,7 @@ static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); + _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7464,7 +7301,7 @@ static PyObject *_wrap_wxGrid_SetTable(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_SetTable(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_SetTable(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7491,7 +7328,7 @@ static PyObject *_wrap_wxGrid_ClearGrid(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ClearGrid(_arg0); + wxGrid_ClearGrid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7525,7 +7362,7 @@ static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7557,7 +7394,7 @@ static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7590,7 +7427,7 @@ static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7623,7 +7460,7 @@ static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7655,7 +7492,7 @@ static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7688,7 +7525,7 @@ static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7733,7 +7570,7 @@ static PyObject *_wrap_wxGrid_DrawCellHighlight(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DrawCellHighlight(_arg0,*_arg1,_arg2); + wxGrid_DrawCellHighlight(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7776,22 +7613,9 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { _arg3 = &temp; @@ -7800,7 +7624,7 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7860,15 +7684,20 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO int i, len=PySequence_Length(_obj2); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg2->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); + wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7910,7 +7739,7 @@ static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_BeginBatch(_arg0); + wxGrid_BeginBatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7938,7 +7767,7 @@ static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EndBatch(_arg0); + wxGrid_EndBatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7967,7 +7796,7 @@ static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetBatchCount(_arg0); + _result = (int )wxGrid_GetBatchCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7994,7 +7823,7 @@ static PyObject *_wrap_wxGrid_ForceRefresh(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ForceRefresh(_arg0); + wxGrid_ForceRefresh(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8023,7 +7852,7 @@ static PyObject *_wrap_wxGrid_IsEditable(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsEditable(_arg0); + _result = (bool )wxGrid_IsEditable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8053,7 +7882,7 @@ static PyObject *_wrap_wxGrid_EnableEditing(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableEditing(_arg0,_arg1); + wxGrid_EnableEditing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8084,7 +7913,7 @@ static PyObject *_wrap_wxGrid_EnableCellEditControl(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableCellEditControl(_arg0,_arg1); + wxGrid_EnableCellEditControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8112,7 +7941,7 @@ static PyObject *_wrap_wxGrid_DisableCellEditControl(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableCellEditControl(_arg0); + wxGrid_DisableCellEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8141,7 +7970,7 @@ static PyObject *_wrap_wxGrid_CanEnableCellControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanEnableCellControl(_arg0); + _result = (bool )wxGrid_CanEnableCellControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8169,7 +7998,7 @@ static PyObject *_wrap_wxGrid_IsCellEditControlEnabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsCellEditControlEnabled(_arg0); + _result = (bool )wxGrid_IsCellEditControlEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8197,7 +8026,7 @@ static PyObject *_wrap_wxGrid_IsCellEditControlShown(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsCellEditControlShown(_arg0); + _result = (bool )wxGrid_IsCellEditControlShown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8225,7 +8054,7 @@ static PyObject *_wrap_wxGrid_IsCurrentCellReadOnly(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsCurrentCellReadOnly(_arg0); + _result = (bool )wxGrid_IsCurrentCellReadOnly(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8252,7 +8081,7 @@ static PyObject *_wrap_wxGrid_ShowCellEditControl(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ShowCellEditControl(_arg0); + wxGrid_ShowCellEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8280,7 +8109,7 @@ static PyObject *_wrap_wxGrid_HideCellEditControl(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_HideCellEditControl(_arg0); + wxGrid_HideCellEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8308,7 +8137,7 @@ static PyObject *_wrap_wxGrid_SaveEditControlValue(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SaveEditControlValue(_arg0); + wxGrid_SaveEditControlValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8344,7 +8173,7 @@ static PyObject *_wrap_wxGrid_XYToCell(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellCoords *)wxGrid_XYToCell(_arg0,_arg1,_arg2); + _result = (wxGridCellCoords *)wxGrid_XYToCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8379,7 +8208,7 @@ static PyObject *_wrap_wxGrid_YToRow(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_YToRow(_arg0,_arg1); + _result = (int )wxGrid_YToRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8408,7 +8237,7 @@ static PyObject *_wrap_wxGrid_XToCol(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_XToCol(_arg0,_arg1); + _result = (int )wxGrid_XToCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8437,7 +8266,7 @@ static PyObject *_wrap_wxGrid_YToEdgeOfRow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_YToEdgeOfRow(_arg0,_arg1); + _result = (int )wxGrid_YToEdgeOfRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8466,7 +8295,7 @@ static PyObject *_wrap_wxGrid_XToEdgeOfCol(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_XToEdgeOfCol(_arg0,_arg1); + _result = (int )wxGrid_XToEdgeOfCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8497,7 +8326,7 @@ static PyObject *_wrap_wxGrid_CellToRect(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxGrid_CellToRect(_arg0,_arg1,_arg2)); + _result = new wxRect (wxGrid_CellToRect(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8526,7 +8355,7 @@ static PyObject *_wrap_wxGrid_GetGridCursorRow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetGridCursorRow(_arg0); + _result = (int )wxGrid_GetGridCursorRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8554,7 +8383,7 @@ static PyObject *_wrap_wxGrid_GetGridCursorCol(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetGridCursorCol(_arg0); + _result = (int )wxGrid_GetGridCursorCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8587,7 +8416,7 @@ static PyObject *_wrap_wxGrid_IsVisible(PyObject *self, PyObject *args, PyObject _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsVisible(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_IsVisible(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8616,7 +8445,7 @@ static PyObject *_wrap_wxGrid_MakeCellVisible(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_MakeCellVisible(_arg0,_arg1,_arg2); + wxGrid_MakeCellVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8646,7 +8475,7 @@ static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetGridCursor(_arg0,_arg1,_arg2); + wxGrid_SetGridCursor(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8678,7 +8507,7 @@ static PyObject *_wrap_wxGrid_MoveCursorUp(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorUp(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8709,7 +8538,7 @@ static PyObject *_wrap_wxGrid_MoveCursorDown(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorDown(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8740,7 +8569,7 @@ static PyObject *_wrap_wxGrid_MoveCursorLeft(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorLeft(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8771,7 +8600,7 @@ static PyObject *_wrap_wxGrid_MoveCursorRight(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorRight(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8799,7 +8628,7 @@ static PyObject *_wrap_wxGrid_MovePageDown(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MovePageDown(_arg0); + _result = (bool )wxGrid_MovePageDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8827,7 +8656,7 @@ static PyObject *_wrap_wxGrid_MovePageUp(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MovePageUp(_arg0); + _result = (bool )wxGrid_MovePageUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8858,7 +8687,7 @@ static PyObject *_wrap_wxGrid_MoveCursorUpBlock(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorUpBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorUpBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8889,7 +8718,7 @@ static PyObject *_wrap_wxGrid_MoveCursorDownBlock(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorDownBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorDownBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8920,7 +8749,7 @@ static PyObject *_wrap_wxGrid_MoveCursorLeftBlock(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorLeftBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorLeftBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8951,7 +8780,7 @@ static PyObject *_wrap_wxGrid_MoveCursorRightBlock(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorRightBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorRightBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8979,7 +8808,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRowLabelSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultRowLabelSize(_arg0); + _result = (int )wxGrid_GetDefaultRowLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9007,7 +8836,7 @@ static PyObject *_wrap_wxGrid_GetRowLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetRowLabelSize(_arg0); + _result = (int )wxGrid_GetRowLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9035,7 +8864,7 @@ static PyObject *_wrap_wxGrid_GetDefaultColLabelSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultColLabelSize(_arg0); + _result = (int )wxGrid_GetDefaultColLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9063,7 +8892,7 @@ static PyObject *_wrap_wxGrid_GetColLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetColLabelSize(_arg0); + _result = (int )wxGrid_GetColLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9092,7 +8921,7 @@ static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetLabelBackgroundColour(_arg0)); + _result = new wxColour (wxGrid_GetLabelBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9122,7 +8951,7 @@ static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetLabelTextColour(_arg0)); + _result = new wxColour (wxGrid_GetLabelTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9152,7 +8981,7 @@ static PyObject *_wrap_wxGrid_GetLabelFont(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGrid_GetLabelFont(_arg0)); + _result = new wxFont (wxGrid_GetLabelFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9190,7 +9019,7 @@ static PyObject *_wrap_wxGrid_GetRowLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetRowLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_GetRowLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9238,7 +9067,7 @@ static PyObject *_wrap_wxGrid_GetColLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetColLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_GetColLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9278,12 +9107,16 @@ static PyObject *_wrap_wxGrid_GetRowLabelValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGrid_GetRowLabelValue(_arg0,_arg1)); + _result = new wxString (wxGrid_GetRowLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9312,12 +9145,16 @@ static PyObject *_wrap_wxGrid_GetColLabelValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGrid_GetColLabelValue(_arg0,_arg1)); + _result = new wxString (wxGrid_GetColLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9346,7 +9183,7 @@ static PyObject *_wrap_wxGrid_GetGridLineColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetGridLineColour(_arg0)); + _result = new wxColour (wxGrid_GetGridLineColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9376,7 +9213,7 @@ static PyObject *_wrap_wxGrid_GetCellHighlightColour(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetCellHighlightColour(_arg0)); + _result = new wxColour (wxGrid_GetCellHighlightColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9405,7 +9242,7 @@ static PyObject *_wrap_wxGrid_GetCellHighlightPenWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetCellHighlightPenWidth(_arg0); + _result = (int )wxGrid_GetCellHighlightPenWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9433,7 +9270,7 @@ static PyObject *_wrap_wxGrid_GetCellHighlightROPenWidth(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetCellHighlightROPenWidth(_arg0); + _result = (int )wxGrid_GetCellHighlightROPenWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9461,7 +9298,7 @@ static PyObject *_wrap_wxGrid_SetRowLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowLabelSize(_arg0,_arg1); + wxGrid_SetRowLabelSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9490,7 +9327,7 @@ static PyObject *_wrap_wxGrid_SetColLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColLabelSize(_arg0,_arg1); + wxGrid_SetColLabelSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9526,7 +9363,7 @@ static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); + wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9562,7 +9399,7 @@ static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetLabelTextColour(_arg0,*_arg1); + wxGrid_SetLabelTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9599,7 +9436,7 @@ static PyObject *_wrap_wxGrid_SetLabelFont(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetLabelFont(_arg0,*_arg1); + wxGrid_SetLabelFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9629,7 +9466,7 @@ static PyObject *_wrap_wxGrid_SetRowLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_SetRowLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9659,7 +9496,7 @@ static PyObject *_wrap_wxGrid_SetColLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_SetColLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9689,26 +9526,13 @@ static PyObject *_wrap_wxGrid_SetRowLabelValue(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowLabelValue(_arg0,_arg1,*_arg2); + wxGrid_SetRowLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9742,26 +9566,13 @@ static PyObject *_wrap_wxGrid_SetColLabelValue(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColLabelValue(_arg0,_arg1,*_arg2); + wxGrid_SetColLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9801,7 +9612,7 @@ static PyObject *_wrap_wxGrid_SetGridLineColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetGridLineColour(_arg0,*_arg1); + wxGrid_SetGridLineColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9837,7 +9648,7 @@ static PyObject *_wrap_wxGrid_SetCellHighlightColour(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellHighlightColour(_arg0,*_arg1); + wxGrid_SetCellHighlightColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9866,7 +9677,7 @@ static PyObject *_wrap_wxGrid_SetCellHighlightPenWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellHighlightPenWidth(_arg0,_arg1); + wxGrid_SetCellHighlightPenWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9895,7 +9706,7 @@ static PyObject *_wrap_wxGrid_SetCellHighlightROPenWidth(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellHighlightROPenWidth(_arg0,_arg1); + wxGrid_SetCellHighlightROPenWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9926,7 +9737,7 @@ static PyObject *_wrap_wxGrid_EnableDragRowSize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableDragRowSize(_arg0,_arg1); + wxGrid_EnableDragRowSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9954,7 +9765,7 @@ static PyObject *_wrap_wxGrid_DisableDragRowSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableDragRowSize(_arg0); + wxGrid_DisableDragRowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9983,7 +9794,7 @@ static PyObject *_wrap_wxGrid_CanDragRowSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanDragRowSize(_arg0); + _result = (bool )wxGrid_CanDragRowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10013,7 +9824,7 @@ static PyObject *_wrap_wxGrid_EnableDragColSize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableDragColSize(_arg0,_arg1); + wxGrid_EnableDragColSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10041,7 +9852,7 @@ static PyObject *_wrap_wxGrid_DisableDragColSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableDragColSize(_arg0); + wxGrid_DisableDragColSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10070,7 +9881,7 @@ static PyObject *_wrap_wxGrid_CanDragColSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanDragColSize(_arg0); + _result = (bool )wxGrid_CanDragColSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10100,7 +9911,7 @@ static PyObject *_wrap_wxGrid_EnableDragGridSize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableDragGridSize(_arg0,_arg1); + wxGrid_EnableDragGridSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10128,7 +9939,7 @@ static PyObject *_wrap_wxGrid_DisableDragGridSize(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableDragGridSize(_arg0); + wxGrid_DisableDragGridSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10157,7 +9968,7 @@ static PyObject *_wrap_wxGrid_CanDragGridSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanDragGridSize(_arg0); + _result = (bool )wxGrid_CanDragGridSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10194,7 +10005,7 @@ static PyObject *_wrap_wxGrid_SetRowAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowAttr(_arg0,_arg1,_arg2); + wxGrid_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10232,7 +10043,7 @@ static PyObject *_wrap_wxGrid_SetColAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColAttr(_arg0,_arg1,_arg2); + wxGrid_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10261,7 +10072,7 @@ static PyObject *_wrap_wxGrid_SetColFormatBool(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatBool(_arg0,_arg1); + wxGrid_SetColFormatBool(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10290,7 +10101,7 @@ static PyObject *_wrap_wxGrid_SetColFormatNumber(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatNumber(_arg0,_arg1); + wxGrid_SetColFormatNumber(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10321,7 +10132,7 @@ static PyObject *_wrap_wxGrid_SetColFormatFloat(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatFloat(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetColFormatFloat(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10351,26 +10162,13 @@ static PyObject *_wrap_wxGrid_SetColFormatCustom(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatCustom(_arg0,_arg1,*_arg2); + wxGrid_SetColFormatCustom(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10405,7 +10203,7 @@ static PyObject *_wrap_wxGrid_EnableGridLines(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableGridLines(_arg0,_arg1); + wxGrid_EnableGridLines(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10434,7 +10232,7 @@ static PyObject *_wrap_wxGrid_GridLinesEnabled(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_GridLinesEnabled(_arg0); + _result = (bool )wxGrid_GridLinesEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10462,7 +10260,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRowSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultRowSize(_arg0); + _result = (int )wxGrid_GetDefaultRowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10491,7 +10289,7 @@ static PyObject *_wrap_wxGrid_GetRowSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetRowSize(_arg0,_arg1); + _result = (int )wxGrid_GetRowSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10519,7 +10317,7 @@ static PyObject *_wrap_wxGrid_GetDefaultColSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultColSize(_arg0); + _result = (int )wxGrid_GetDefaultColSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10548,7 +10346,7 @@ static PyObject *_wrap_wxGrid_GetColSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetColSize(_arg0,_arg1); + _result = (int )wxGrid_GetColSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10577,7 +10375,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellBackgroundColour(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetDefaultCellBackgroundColour(_arg0)); + _result = new wxColour (wxGrid_GetDefaultCellBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10609,7 +10407,7 @@ static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2)); + _result = new wxColour (wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10639,7 +10437,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetDefaultCellTextColour(_arg0)); + _result = new wxColour (wxGrid_GetDefaultCellTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10671,7 +10469,7 @@ static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetCellTextColour(_arg0,_arg1,_arg2)); + _result = new wxColour (wxGrid_GetCellTextColour(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10701,7 +10499,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGrid_GetDefaultCellFont(_arg0)); + _result = new wxFont (wxGrid_GetDefaultCellFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10733,7 +10531,7 @@ static PyObject *_wrap_wxGrid_GetCellFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGrid_GetCellFont(_arg0,_arg1,_arg2)); + _result = new wxFont (wxGrid_GetCellFont(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10779,7 +10577,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellAlignment(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetDefaultCellAlignment(_arg0,_arg1,_arg2); + wxGrid_GetDefaultCellAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10827,7 +10625,7 @@ static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + wxGrid_GetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10859,7 +10657,7 @@ static PyObject *_wrap_wxGrid_SetDefaultRowSize(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultRowSize(_arg0,_arg1,_arg2); + wxGrid_SetDefaultRowSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10889,7 +10687,7 @@ static PyObject *_wrap_wxGrid_SetRowSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowSize(_arg0,_arg1,_arg2); + wxGrid_SetRowSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10921,7 +10719,7 @@ static PyObject *_wrap_wxGrid_SetDefaultColSize(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultColSize(_arg0,_arg1,_arg2); + wxGrid_SetDefaultColSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10951,7 +10749,7 @@ static PyObject *_wrap_wxGrid_SetColSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColSize(_arg0,_arg1,_arg2); + wxGrid_SetColSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10983,7 +10781,7 @@ static PyObject *_wrap_wxGrid_AutoSizeColumn(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeColumn(_arg0,_arg1,_arg2); + wxGrid_AutoSizeColumn(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11015,7 +10813,7 @@ static PyObject *_wrap_wxGrid_AutoSizeRow(PyObject *self, PyObject *args, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeRow(_arg0,_arg1,_arg2); + wxGrid_AutoSizeRow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11046,7 +10844,7 @@ static PyObject *_wrap_wxGrid_AutoSizeColumns(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeColumns(_arg0,_arg1); + wxGrid_AutoSizeColumns(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11077,7 +10875,7 @@ static PyObject *_wrap_wxGrid_AutoSizeRows(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeRows(_arg0,_arg1); + wxGrid_AutoSizeRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11105,7 +10903,7 @@ static PyObject *_wrap_wxGrid_AutoSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSize(_arg0); + wxGrid_AutoSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11135,7 +10933,7 @@ static PyObject *_wrap_wxGrid_SetColMinimalWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColMinimalWidth(_arg0,_arg1,_arg2); + wxGrid_SetColMinimalWidth(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11165,7 +10963,7 @@ static PyObject *_wrap_wxGrid_SetRowMinimalHeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowMinimalHeight(_arg0,_arg1,_arg2); + wxGrid_SetRowMinimalHeight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11201,7 +10999,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellBackgroundColour(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellBackgroundColour(_arg0,*_arg1); + wxGrid_SetDefaultCellBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11239,7 +11037,7 @@ static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellBackgroundColour(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellBackgroundColour(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11275,7 +11073,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellTextColour(_arg0,*_arg1); + wxGrid_SetDefaultCellTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11313,7 +11111,7 @@ static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellTextColour(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellTextColour(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11350,7 +11148,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellFont(_arg0,*_arg1); + wxGrid_SetDefaultCellFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11389,7 +11187,7 @@ static PyObject *_wrap_wxGrid_SetCellFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellFont(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellFont(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11419,7 +11217,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellAlignment(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellAlignment(_arg0,_arg1,_arg2); + wxGrid_SetDefaultCellAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11451,7 +11249,7 @@ static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11488,7 +11286,7 @@ static PyObject *_wrap_wxGrid_SetDefaultRenderer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultRenderer(_arg0,_arg1); + wxGrid_SetDefaultRenderer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11527,7 +11325,7 @@ static PyObject *_wrap_wxGrid_SetCellRenderer(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellRenderer(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetCellRenderer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11557,7 +11355,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRenderer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetDefaultRenderer(_arg0); + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRenderer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11594,7 +11392,7 @@ static PyObject *_wrap_wxGrid_GetCellRenderer(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetCellRenderer(_arg0,_arg1,_arg2); + _result = (wxGridCellRenderer *)wxGrid_GetCellRenderer(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11636,7 +11434,7 @@ static PyObject *_wrap_wxGrid_SetDefaultEditor(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultEditor(_arg0,_arg1); + wxGrid_SetDefaultEditor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11675,7 +11473,7 @@ static PyObject *_wrap_wxGrid_SetCellEditor(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellEditor(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetCellEditor(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11705,7 +11503,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditor(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetDefaultEditor(_arg0); + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11742,7 +11540,7 @@ static PyObject *_wrap_wxGrid_GetCellEditor(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetCellEditor(_arg0,_arg1,_arg2); + _result = (wxGridCellEditor *)wxGrid_GetCellEditor(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11778,12 +11576,16 @@ static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGrid_GetCellValue(_arg0,_arg1,_arg2)); + _result = new wxString (wxGrid_GetCellValue(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -11813,26 +11615,13 @@ static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellValue(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellValue(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11867,7 +11656,7 @@ static PyObject *_wrap_wxGrid_IsReadOnly(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsReadOnly(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_IsReadOnly(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11899,7 +11688,7 @@ static PyObject *_wrap_wxGrid_SetReadOnly(PyObject *self, PyObject *args, PyObje _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetReadOnly(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetReadOnly(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11931,7 +11720,7 @@ static PyObject *_wrap_wxGrid_SelectRow(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectRow(_arg0,_arg1,_arg2); + wxGrid_SelectRow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11963,7 +11752,7 @@ static PyObject *_wrap_wxGrid_SelectCol(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectCol(_arg0,_arg1,_arg2); + wxGrid_SelectCol(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11998,7 +11787,7 @@ static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObje _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12026,7 +11815,7 @@ static PyObject *_wrap_wxGrid_SelectAll(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectAll(_arg0); + wxGrid_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12055,7 +11844,7 @@ static PyObject *_wrap_wxGrid_IsSelection(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsSelection(_arg0); + _result = (bool )wxGrid_IsSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12082,7 +11871,7 @@ static PyObject *_wrap_wxGrid_ClearSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ClearSelection(_arg0); + wxGrid_ClearSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12113,7 +11902,7 @@ static PyObject *_wrap_wxGrid_IsInSelection(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsInSelection(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_IsInSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12158,7 +11947,7 @@ static PyObject *_wrap_wxGrid_BlockToDeviceRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxGrid_BlockToDeviceRect(_arg0,*_arg1,*_arg2)); + _result = new wxRect (wxGrid_BlockToDeviceRect(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12188,7 +11977,7 @@ static PyObject *_wrap_wxGrid_GetSelectionBackground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetSelectionBackground(_arg0)); + _result = new wxColour (wxGrid_GetSelectionBackground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12218,7 +12007,7 @@ static PyObject *_wrap_wxGrid_GetSelectionForeground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetSelectionForeground(_arg0)); + _result = new wxColour (wxGrid_GetSelectionForeground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12254,7 +12043,7 @@ static PyObject *_wrap_wxGrid_SetSelectionBackground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetSelectionBackground(_arg0,*_arg1); + wxGrid_SetSelectionBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12290,7 +12079,7 @@ static PyObject *_wrap_wxGrid_SetSelectionForeground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetSelectionForeground(_arg0,*_arg1); + wxGrid_SetSelectionForeground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12323,22 +12112,9 @@ static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -12356,7 +12132,7 @@ static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_RegisterDataType(_arg0,*_arg1,_arg2,_arg3); + wxGrid_RegisterDataType(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12392,7 +12168,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForCell(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForCell(_arg0,_arg1,_arg2); + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12429,7 +12205,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForCell(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForCell(_arg0,_arg1,_arg2); + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12465,26 +12241,13 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForType(_arg0,*_arg1); + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12524,26 +12287,13 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForType(_arg0,*_arg1); + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12582,7 +12332,7 @@ static PyObject *_wrap_wxGrid_SetMargins(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetMargins(_arg0,_arg1,_arg2); + wxGrid_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12611,7 +12361,7 @@ static PyObject *_wrap_wxGrid_GetGridWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12639,7 +12389,7 @@ static PyObject *_wrap_wxGrid_GetGridRowLabelWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridRowLabelWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridRowLabelWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12667,7 +12417,7 @@ static PyObject *_wrap_wxGrid_GetGridColLabelWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridColLabelWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridColLabelWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12695,7 +12445,7 @@ static PyObject *_wrap_wxGrid_GetGridCornerLabelWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridCornerLabelWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridCornerLabelWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12777,7 +12527,7 @@ static PyObject *_wrap_new_wxGridEvent(PyObject *self, PyObject *args, PyObject _arg11 = (bool ) tempbool11; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridEvent *)new_wxGridEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11); + _result = (wxGridEvent *)new_wxGridEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12811,7 +12561,7 @@ static PyObject *_wrap_wxGridEvent_GetRow(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEvent_GetRow(_arg0); + _result = (int )wxGridEvent_GetRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12839,7 +12589,7 @@ static PyObject *_wrap_wxGridEvent_GetCol(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEvent_GetCol(_arg0); + _result = (int )wxGridEvent_GetCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12868,7 +12618,7 @@ static PyObject *_wrap_wxGridEvent_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); + _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12897,7 +12647,7 @@ static PyObject *_wrap_wxGridEvent_Selecting(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_Selecting(_arg0); + _result = (bool )wxGridEvent_Selecting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12925,7 +12675,7 @@ static PyObject *_wrap_wxGridEvent_ControlDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_ControlDown(_arg0); + _result = (bool )wxGridEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12953,7 +12703,7 @@ static PyObject *_wrap_wxGridEvent_MetaDown(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_MetaDown(_arg0); + _result = (bool )wxGridEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12981,7 +12731,7 @@ static PyObject *_wrap_wxGridEvent_ShiftDown(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_ShiftDown(_arg0); + _result = (bool )wxGridEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13009,7 +12759,7 @@ static PyObject *_wrap_wxGridEvent_AltDown(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_AltDown(_arg0); + _result = (bool )wxGridEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13087,7 +12837,7 @@ static PyObject *_wrap_new_wxGridSizeEvent(PyObject *self, PyObject *args, PyObj _arg9 = (bool ) tempbool9; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridSizeEvent *)new_wxGridSizeEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxGridSizeEvent *)new_wxGridSizeEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13121,7 +12871,7 @@ static PyObject *_wrap_wxGridSizeEvent_GetRowOrCol(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizeEvent_GetRowOrCol(_arg0); + _result = (int )wxGridSizeEvent_GetRowOrCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13150,7 +12900,7 @@ static PyObject *_wrap_wxGridSizeEvent_GetPosition(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxGridSizeEvent_GetPosition(_arg0)); + _result = new wxPoint (wxGridSizeEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13179,7 +12929,7 @@ static PyObject *_wrap_wxGridSizeEvent_ControlDown(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_ControlDown(_arg0); + _result = (bool )wxGridSizeEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13207,7 +12957,7 @@ static PyObject *_wrap_wxGridSizeEvent_MetaDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_MetaDown(_arg0); + _result = (bool )wxGridSizeEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13235,7 +12985,7 @@ static PyObject *_wrap_wxGridSizeEvent_ShiftDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_ShiftDown(_arg0); + _result = (bool )wxGridSizeEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13263,7 +13013,7 @@ static PyObject *_wrap_wxGridSizeEvent_AltDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_AltDown(_arg0); + _result = (bool )wxGridSizeEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13357,7 +13107,7 @@ static PyObject *_wrap_new_wxGridRangeSelectEvent(PyObject *self, PyObject *args _arg9 = (bool ) tempbool9; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridRangeSelectEvent *)new_wxGridRangeSelectEvent(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxGridRangeSelectEvent *)new_wxGridRangeSelectEvent(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13392,7 +13142,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetTopLeftCoords(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetTopLeftCoords(_arg0)); + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetTopLeftCoords(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13422,7 +13172,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRightCoords(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetBottomRightCoords(_arg0)); + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetBottomRightCoords(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13451,7 +13201,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetTopRow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetTopRow(_arg0); + _result = (int )wxGridRangeSelectEvent_GetTopRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13479,7 +13229,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRow(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetBottomRow(_arg0); + _result = (int )wxGridRangeSelectEvent_GetBottomRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13507,7 +13257,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetLeftCol(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetLeftCol(_arg0); + _result = (int )wxGridRangeSelectEvent_GetLeftCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13535,7 +13285,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetRightCol(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetRightCol(_arg0); + _result = (int )wxGridRangeSelectEvent_GetRightCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13563,7 +13313,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_Selecting(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_Selecting(_arg0); + _result = (bool )wxGridRangeSelectEvent_Selecting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13591,7 +13341,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_ControlDown(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_ControlDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13619,7 +13369,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_MetaDown(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_MetaDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13647,7 +13397,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_ShiftDown(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_ShiftDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13675,7 +13425,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_AltDown(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_AltDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13741,7 +13491,7 @@ static PyObject *_wrap_new_wxGridEditorCreatedEvent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridEditorCreatedEvent *)new_wxGridEditorCreatedEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + _result = (wxGridEditorCreatedEvent *)new_wxGridEditorCreatedEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13775,7 +13525,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_GetRow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEditorCreatedEvent_GetRow(_arg0); + _result = (int )wxGridEditorCreatedEvent_GetRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13803,7 +13553,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_GetCol(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEditorCreatedEvent_GetCol(_arg0); + _result = (int )wxGridEditorCreatedEvent_GetCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13831,7 +13581,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_GetControl(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)wxGridEditorCreatedEvent_GetControl(_arg0); + _result = (wxControl *)wxGridEditorCreatedEvent_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13859,7 +13609,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_SetRow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridEditorCreatedEvent_SetRow(_arg0,_arg1); + wxGridEditorCreatedEvent_SetRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13888,7 +13638,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_SetCol(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridEditorCreatedEvent_SetCol(_arg0,_arg1); + wxGridEditorCreatedEvent_SetCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13925,7 +13675,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_SetControl(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridEditorCreatedEvent_SetControl(_arg0,_arg1); + wxGridEditorCreatedEvent_SetControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/help.cpp b/wxPython/src/gtk/help.cpp index dbf86856e6..0a34f441a7 100644 --- a/wxPython/src/gtk/help.cpp +++ b/wxPython/src/gtk/help.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -140,7 +134,7 @@ static PyObject *_wrap_new_wxHelpEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHelpEvent *)new_wxHelpEvent(_arg0,_arg1,*_arg2); + _result = (wxHelpEvent *)new_wxHelpEvent(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -175,7 +169,7 @@ static PyObject *_wrap_wxHelpEvent_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxPoint & _result_ref = wxHelpEvent_GetPosition(_arg0); + const wxPoint & _result_ref = wxHelpEvent_GetPosition(_arg0); _result = (wxPoint *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -217,7 +211,7 @@ static PyObject *_wrap_wxHelpEvent_SetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpEvent_SetPosition(_arg0,*_arg1); + wxHelpEvent_SetPosition(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -246,13 +240,17 @@ static PyObject *_wrap_wxHelpEvent_GetLink(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxHelpEvent_GetLink(_arg0); + const wxString & _result_ref = wxHelpEvent_GetLink(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -277,26 +275,13 @@ static PyObject *_wrap_wxHelpEvent_SetLink(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpEvent_SetLink(_arg0,*_arg1); + wxHelpEvent_SetLink(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -329,13 +314,17 @@ static PyObject *_wrap_wxHelpEvent_GetTarget(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxHelpEvent_GetTarget(_arg0); + const wxString & _result_ref = wxHelpEvent_GetTarget(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -360,26 +349,13 @@ static PyObject *_wrap_wxHelpEvent_SetTarget(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpEvent_SetTarget(_arg0,*_arg1); + wxHelpEvent_SetTarget(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -439,7 +415,7 @@ static PyObject *_wrap_new_wxContextMenuEvent(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextMenuEvent *)new_wxContextMenuEvent(_arg0,_arg1,*_arg2); + _result = (wxContextMenuEvent *)new_wxContextMenuEvent(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -474,7 +450,7 @@ static PyObject *_wrap_wxContextMenuEvent_GetPosition(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxPoint & _result_ref = wxContextMenuEvent_GetPosition(_arg0); + const wxPoint & _result_ref = wxContextMenuEvent_GetPosition(_arg0); _result = (wxPoint *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -516,7 +492,7 @@ static PyObject *_wrap_wxContextMenuEvent_SetPosition(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxContextMenuEvent_SetPosition(_arg0,*_arg1); + wxContextMenuEvent_SetPosition(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -557,7 +533,7 @@ static PyObject *_wrap_new_wxContextHelp(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextHelp *)new_wxContextHelp(_arg0,_arg1); + _result = (wxContextHelp *)new_wxContextHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -590,7 +566,7 @@ static PyObject *_wrap_delete_wxContextHelp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxContextHelp(_arg0); + delete_wxContextHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -628,7 +604,7 @@ static PyObject *_wrap_wxContextHelp_BeginContextHelp(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxContextHelp_BeginContextHelp(_arg0,_arg1); + _result = (bool )wxContextHelp_BeginContextHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -656,7 +632,7 @@ static PyObject *_wrap_wxContextHelp_EndContextHelp(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxContextHelp_EndContextHelp(_arg0); + _result = (bool )wxContextHelp_EndContextHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -753,7 +729,7 @@ static PyObject *_wrap_new_wxContextHelpButton(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextHelpButton *)new_wxContextHelpButton(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxContextHelpButton *)new_wxContextHelpButton(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -787,7 +763,7 @@ static PyObject *_wrap_wxHelpProvider_Set(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHelpProvider *)wxHelpProvider::Set(_arg0); + _result = (wxHelpProvider *)wxHelpProvider::Set(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -812,7 +788,7 @@ static PyObject *_wrap_wxHelpProvider_Get(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHelpProvider *)wxHelpProvider::Get(); + _result = (wxHelpProvider *)wxHelpProvider::Get(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -855,12 +831,16 @@ static PyObject *_wrap_wxHelpProvider_GetHelp(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHelpProvider_GetHelp(_arg0,_arg1)); + _result = new wxString (wxHelpProvider_GetHelp(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -897,7 +877,7 @@ static PyObject *_wrap_wxHelpProvider_ShowHelp(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHelpProvider_ShowHelp(_arg0,_arg1); + _result = (bool )wxHelpProvider_ShowHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -934,26 +914,13 @@ static PyObject *_wrap_wxHelpProvider_AddHelp(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpProvider_AddHelp(_arg0,_arg1,*_arg2); + wxHelpProvider_AddHelp(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -987,26 +954,13 @@ static PyObject *_wrap_wxHelpProvider_AddHelpById(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpProvider_AddHelpById(_arg0,_arg1,*_arg2); + wxHelpProvider_AddHelpById(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1038,7 +992,7 @@ static PyObject *_wrap_wxHelpProvider_Destroy(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpProvider_Destroy(_arg0); + wxHelpProvider_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1067,7 +1021,7 @@ static PyObject *_wrap_new_wxSimpleHelpProvider(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSimpleHelpProvider *)new_wxSimpleHelpProvider(); + _result = (wxSimpleHelpProvider *)new_wxSimpleHelpProvider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index 4ba47fc52b..6923dd81fc 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -92,12 +92,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPyHtmlTagHandler : public wxHtmlTagHandler { DECLARE_DYNAMIC_CLASS(wxPyHtmlTagHandler); public: @@ -306,7 +300,7 @@ static PyObject *_wrap_wxHtmlWinParser_AddTagHandler(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_AddTagHandler(_arg0); + wxHtmlWinParser_AddTagHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -333,7 +327,7 @@ static PyObject *_wrap_wxHtmlWindow_AddFilter(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_AddFilter(_arg0); + wxHtmlWindow_AddFilter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -365,45 +359,19 @@ static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxHtmlLinkInfo",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlLinkInfo *)new_wxHtmlLinkInfo(*_arg0,*_arg1); + _result = (wxHtmlLinkInfo *)new_wxHtmlLinkInfo(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -445,12 +413,16 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetHref(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlLinkInfo_GetHref(_arg0)); + _result = new wxString (wxHtmlLinkInfo_GetHref(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -478,12 +450,16 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetTarget(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlLinkInfo_GetTarget(_arg0)); + _result = new wxString (wxHtmlLinkInfo_GetTarget(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -511,7 +487,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMouseEvent *)wxHtmlLinkInfo_GetEvent(_arg0); + _result = (wxMouseEvent *)wxHtmlLinkInfo_GetEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -540,7 +516,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetHtmlCell(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlLinkInfo_GetHtmlCell(_arg0); + _result = (wxHtmlCell *)wxHtmlLinkInfo_GetHtmlCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -582,7 +558,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_SetEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlLinkInfo_SetEvent(_arg0,_arg1); + wxHtmlLinkInfo_SetEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -619,7 +595,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_SetHtmlCell(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlLinkInfo_SetHtmlCell(_arg0,_arg1); + wxHtmlLinkInfo_SetHtmlCell(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -656,12 +632,16 @@ static PyObject *_wrap_wxHtmlTag_GetName(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlTag_GetName(_arg0)); + _result = new wxString (wxHtmlTag_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -690,26 +670,13 @@ static PyObject *_wrap_wxHtmlTag_HasParam(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlTag_HasParam(_arg0,*_arg1); + _result = (bool )wxHtmlTag_HasParam(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -743,31 +710,22 @@ static PyObject *_wrap_wxHtmlTag_GetParam(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlTag_GetParam(_arg0,*_arg1,_arg2)); + _result = new wxString (wxHtmlTag_GetParam(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -799,12 +757,16 @@ static PyObject *_wrap_wxHtmlTag_GetAllParams(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlTag_GetAllParams(_arg0)); + _result = new wxString (wxHtmlTag_GetAllParams(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -832,7 +794,7 @@ static PyObject *_wrap_wxHtmlTag_HasEnding(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlTag_HasEnding(_arg0); + _result = (bool )wxHtmlTag_HasEnding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -860,7 +822,7 @@ static PyObject *_wrap_wxHtmlTag_GetBeginPos(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlTag_GetBeginPos(_arg0); + _result = (int )wxHtmlTag_GetBeginPos(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -888,7 +850,7 @@ static PyObject *_wrap_wxHtmlTag_GetEndPos1(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlTag_GetEndPos1(_arg0); + _result = (int )wxHtmlTag_GetEndPos1(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -916,7 +878,7 @@ static PyObject *_wrap_wxHtmlTag_GetEndPos2(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlTag_GetEndPos2(_arg0); + _result = (int )wxHtmlTag_GetEndPos2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -960,7 +922,7 @@ static PyObject *_wrap_wxHtmlParser_SetFS(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_SetFS(_arg0,_arg1); + wxHtmlParser_SetFS(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -989,7 +951,7 @@ static PyObject *_wrap_wxHtmlParser_GetFS(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileSystem *)wxHtmlParser_GetFS(_arg0); + _result = (wxFileSystem *)wxHtmlParser_GetFS(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1018,26 +980,13 @@ static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxObject *)wxHtmlParser_Parse(_arg0,*_arg1); + _result = (wxObject *)wxHtmlParser_Parse(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1069,26 +1018,13 @@ static PyObject *_wrap_wxHtmlParser_InitParser(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_InitParser(_arg0,*_arg1); + wxHtmlParser_InitParser(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1120,7 +1056,7 @@ static PyObject *_wrap_wxHtmlParser_DoneParser(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_DoneParser(_arg0); + wxHtmlParser_DoneParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1150,7 +1086,7 @@ static PyObject *_wrap_wxHtmlParser_DoParsing(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_DoParsing(_arg0,_arg1,_arg2); + wxHtmlParser_DoParsing(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1187,7 +1123,7 @@ static PyObject *_wrap_wxHtmlParser_AddTagHandler(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_AddTagHandler(_arg0,_arg1); + wxHtmlParser_AddTagHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1216,12 +1152,16 @@ static PyObject *_wrap_wxHtmlParser_GetSource(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxHtmlParser_GetSource(_arg0); + _result = (wxString *)wxHtmlParser_GetSource(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1255,26 +1195,13 @@ static PyObject *_wrap_wxHtmlParser_PushTagHandler(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_PushTagHandler(_arg0,_arg1,*_arg2); + wxHtmlParser_PushTagHandler(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1306,7 +1233,7 @@ static PyObject *_wrap_wxHtmlParser_PopTagHandler(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_PopTagHandler(_arg0); + wxHtmlParser_PopTagHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1279,7 @@ static PyObject *_wrap_new_wxHtmlWinParser(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWinParser *)new_wxHtmlWinParser(_arg0); + _result = (wxHtmlWinParser *)new_wxHtmlWinParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1394,7 +1321,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetDC(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetDC(_arg0,_arg1); + wxHtmlWinParser_SetDC(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1423,7 +1350,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetDC(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxHtmlWinParser_GetDC(_arg0); + _result = (wxDC *)wxHtmlWinParser_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1451,7 +1378,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetCharHeight(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetCharHeight(_arg0); + _result = (int )wxHtmlWinParser_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1406,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetCharWidth(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetCharWidth(_arg0); + _result = (int )wxHtmlWinParser_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1507,7 +1434,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWindow *)wxHtmlWinParser_GetWindow(_arg0); + _result = (wxHtmlWindow *)wxHtmlWinParser_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1545,47 +1472,21 @@ static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { _arg3 = _obj3; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1623,7 +1524,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetContainer(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_GetContainer(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_GetContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1658,7 +1559,7 @@ static PyObject *_wrap_wxHtmlWinParser_OpenContainer(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_OpenContainer(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_OpenContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1702,7 +1603,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetContainer(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_SetContainer(_arg0,_arg1); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_SetContainer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1737,7 +1638,7 @@ static PyObject *_wrap_wxHtmlWinParser_CloseContainer(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_CloseContainer(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_CloseContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1771,7 +1672,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontSize(_arg0); + _result = (int )wxHtmlWinParser_GetFontSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1799,7 +1700,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontSize(_arg0,_arg1); + wxHtmlWinParser_SetFontSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1828,7 +1729,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontBold(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontBold(_arg0); + _result = (int )wxHtmlWinParser_GetFontBold(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1856,7 +1757,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontBold(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontBold(_arg0,_arg1); + wxHtmlWinParser_SetFontBold(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1885,7 +1786,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontItalic(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontItalic(_arg0); + _result = (int )wxHtmlWinParser_GetFontItalic(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1913,7 +1814,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontItalic(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontItalic(_arg0,_arg1); + wxHtmlWinParser_SetFontItalic(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1942,7 +1843,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontUnderlined(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontUnderlined(_arg0); + _result = (int )wxHtmlWinParser_GetFontUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1970,7 +1871,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontUnderlined(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontUnderlined(_arg0,_arg1); + wxHtmlWinParser_SetFontUnderlined(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1999,7 +1900,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontFixed(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontFixed(_arg0); + _result = (int )wxHtmlWinParser_GetFontFixed(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2027,7 +1928,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontFixed(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontFixed(_arg0,_arg1); + wxHtmlWinParser_SetFontFixed(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2056,7 +1957,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetAlign(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetAlign(_arg0); + _result = (int )wxHtmlWinParser_GetAlign(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2084,7 +1985,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetAlign(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetAlign(_arg0,_arg1); + wxHtmlWinParser_SetAlign(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2114,7 +2015,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetLinkColor(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxHtmlWinParser_GetLinkColor(_arg0)); + _result = new wxColour (wxHtmlWinParser_GetLinkColor(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2150,7 +2051,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); + wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2180,7 +2081,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetActualColor(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxHtmlWinParser_GetActualColor(_arg0)); + _result = new wxColour (wxHtmlWinParser_GetActualColor(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2216,7 +2117,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetActualColor(_arg0,*_arg1); + wxHtmlWinParser_SetActualColor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2245,26 +2146,13 @@ static PyObject *_wrap_wxHtmlWinParser_SetLink(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetLink(_arg0,*_arg1); + wxHtmlWinParser_SetLink(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2298,7 +2186,7 @@ static PyObject *_wrap_wxHtmlWinParser_CreateCurrentFont(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)wxHtmlWinParser_CreateCurrentFont(_arg0); + _result = (wxFont *)wxHtmlWinParser_CreateCurrentFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2333,7 +2221,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetLink(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxHtmlLinkInfo (wxHtmlWinParser_GetLink(_arg0)); + _result = new wxHtmlLinkInfo (wxHtmlWinParser_GetLink(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2362,7 +2250,7 @@ static PyObject *_wrap_new_wxHtmlTagHandler(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlTagHandler *)new_wxHtmlTagHandler(); + _result = (wxPyHtmlTagHandler *)new_wxHtmlTagHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2405,7 +2293,7 @@ static PyObject *_wrap_wxHtmlTagHandler__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxHtmlTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2442,7 +2330,7 @@ static PyObject *_wrap_wxHtmlTagHandler_SetParser(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlTagHandler_SetParser(_arg0,_arg1); + wxHtmlTagHandler_SetParser(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2472,7 +2360,7 @@ static PyObject *_wrap_wxHtmlTagHandler_GetParser(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlParser *)wxHtmlTagHandler_GetParser(_arg0); + _result = (wxHtmlParser *)wxHtmlTagHandler_GetParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2514,7 +2402,7 @@ static PyObject *_wrap_wxHtmlTagHandler_ParseInner(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlTagHandler_ParseInner(_arg0,*_arg1); + wxHtmlTagHandler_ParseInner(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2551,7 +2439,7 @@ static PyObject *_wrap_new_wxHtmlWinTagHandler(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlWinTagHandler *)new_wxHtmlWinTagHandler(); + _result = (wxPyHtmlWinTagHandler *)new_wxHtmlWinTagHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2594,7 +2482,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler__setCallbackInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxHtmlWinTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2631,7 +2519,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_SetParser(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinTagHandler_SetParser(_arg0,_arg1); + wxHtmlWinTagHandler_SetParser(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2661,7 +2549,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_GetParser(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWinParser *)wxHtmlWinTagHandler_GetParser(_arg0); + _result = (wxHtmlWinParser *)wxHtmlWinTagHandler_GetParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2703,7 +2591,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_ParseInner(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinTagHandler_ParseInner(_arg0,*_arg1); + wxHtmlWinTagHandler_ParseInner(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2732,7 +2620,7 @@ static PyObject *_wrap_new_wxHtmlCell(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)new_wxHtmlCell(); + _result = (wxHtmlCell *)new_wxHtmlCell(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2766,7 +2654,7 @@ static PyObject *_wrap_wxHtmlCell_GetPosX(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetPosX(_arg0); + _result = (int )wxHtmlCell_GetPosX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2794,7 +2682,7 @@ static PyObject *_wrap_wxHtmlCell_GetPosY(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetPosY(_arg0); + _result = (int )wxHtmlCell_GetPosY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2822,7 +2710,7 @@ static PyObject *_wrap_wxHtmlCell_GetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetWidth(_arg0); + _result = (int )wxHtmlCell_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2850,7 +2738,7 @@ static PyObject *_wrap_wxHtmlCell_GetHeight(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetHeight(_arg0); + _result = (int )wxHtmlCell_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2878,7 +2766,7 @@ static PyObject *_wrap_wxHtmlCell_GetDescent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetDescent(_arg0); + _result = (int )wxHtmlCell_GetDescent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +2797,7 @@ static PyObject *_wrap_wxHtmlCell_GetLink(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlLinkInfo *)wxHtmlCell_GetLink(_arg0,_arg1,_arg2); + _result = (wxHtmlLinkInfo *)wxHtmlCell_GetLink(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2944,7 +2832,7 @@ static PyObject *_wrap_wxHtmlCell_GetNext(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlCell_GetNext(_arg0); + _result = (wxHtmlCell *)wxHtmlCell_GetNext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2979,7 +2867,7 @@ static PyObject *_wrap_wxHtmlCell_GetParent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlCell_GetParent(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlCell_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3021,7 +2909,7 @@ static PyObject *_wrap_wxHtmlCell_SetLink(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetLink(_arg0,*_arg1); + wxHtmlCell_SetLink(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3058,7 +2946,7 @@ static PyObject *_wrap_wxHtmlCell_SetNext(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetNext(_arg0,_arg1); + wxHtmlCell_SetNext(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3095,7 +2983,7 @@ static PyObject *_wrap_wxHtmlCell_SetParent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetParent(_arg0,_arg1); + wxHtmlCell_SetParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3125,7 +3013,7 @@ static PyObject *_wrap_wxHtmlCell_SetPos(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetPos(_arg0,_arg1,_arg2); + wxHtmlCell_SetPos(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3154,7 +3042,7 @@ static PyObject *_wrap_wxHtmlCell_Layout(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_Layout(_arg0,_arg1); + wxHtmlCell_Layout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3195,7 +3083,7 @@ static PyObject *_wrap_wxHtmlCell_Draw(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_Draw(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxHtmlCell_Draw(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3234,7 +3122,7 @@ static PyObject *_wrap_wxHtmlCell_DrawInvisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_DrawInvisible(_arg0,*_arg1,_arg2,_arg3); + wxHtmlCell_DrawInvisible(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3274,7 +3162,7 @@ static PyObject *_wrap_wxHtmlCell_Find(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlCell_Find(_arg0,_arg1,_arg2); + _result = (wxHtmlCell *)wxHtmlCell_Find(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3317,7 +3205,7 @@ static PyObject *_wrap_wxHtmlCell_AdjustPagebreak(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlCell_AdjustPagebreak(_arg0,_arg1); + _result = (bool )wxHtmlCell_AdjustPagebreak(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3347,7 +3235,7 @@ static PyObject *_wrap_wxHtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetCanLiveOnPagebreak(_arg0,_arg1); + wxHtmlCell_SetCanLiveOnPagebreak(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3387,22 +3275,9 @@ static PyObject *_wrap_new_wxHtmlWordCell(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxHtmlWordCell",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -3413,7 +3288,7 @@ static PyObject *_wrap_new_wxHtmlWordCell(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWordCell *)new_wxHtmlWordCell(*_arg0,*_arg1); + _result = (wxHtmlWordCell *)new_wxHtmlWordCell(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3468,7 +3343,7 @@ static PyObject *_wrap_new_wxHtmlContainerCell(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)new_wxHtmlContainerCell(_arg0); + _result = (wxHtmlContainerCell *)new_wxHtmlContainerCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3510,7 +3385,7 @@ static PyObject *_wrap_wxHtmlContainerCell_InsertCell(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_InsertCell(_arg0,_arg1); + wxHtmlContainerCell_InsertCell(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3539,7 +3414,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlignHor(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetAlignHor(_arg0,_arg1); + wxHtmlContainerCell_SetAlignHor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3568,7 +3443,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetAlignHor(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetAlignHor(_arg0); + _result = (int )wxHtmlContainerCell_GetAlignHor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3596,7 +3471,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlignVer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetAlignVer(_arg0,_arg1); + wxHtmlContainerCell_SetAlignVer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3625,7 +3500,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetAlignVer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetAlignVer(_arg0); + _result = (int )wxHtmlContainerCell_GetAlignVer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3655,7 +3530,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetIndent(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetIndent(_arg0,_arg1,_arg2,_arg3); + wxHtmlContainerCell_SetIndent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3685,7 +3560,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetIndent(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetIndent(_arg0,_arg1); + _result = (int )wxHtmlContainerCell_GetIndent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3714,7 +3589,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetIndentUnits(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetIndentUnits(_arg0,_arg1); + _result = (int )wxHtmlContainerCell_GetIndentUnits(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3750,7 +3625,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlign(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetAlign(_arg0,*_arg1); + wxHtmlContainerCell_SetAlign(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3780,7 +3655,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloat(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetWidthFloat(_arg0,_arg1,_arg2); + wxHtmlContainerCell_SetWidthFloat(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3817,7 +3692,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloatFromTag(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetWidthFloatFromTag(_arg0,*_arg1); + wxHtmlContainerCell_SetWidthFloatFromTag(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3847,7 +3722,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetMinHeight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetMinHeight(_arg0,_arg1,_arg2); + wxHtmlContainerCell_SetMinHeight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3883,7 +3758,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); + wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3927,7 +3802,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); + wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3957,7 +3832,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetFirstCell(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlContainerCell_GetFirstCell(_arg0); + _result = (wxHtmlCell *)wxHtmlContainerCell_GetFirstCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4008,7 +3883,7 @@ static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); + _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4059,7 +3934,7 @@ static PyObject *_wrap_new_wxHtmlFontCell(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlFontCell *)new_wxHtmlFontCell(_arg0); + _result = (wxHtmlFontCell *)new_wxHtmlFontCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4111,7 +3986,7 @@ static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWidgetCell *)new_wxHtmlWidgetCell(_arg0,_arg1); + _result = (wxHtmlWidgetCell *)new_wxHtmlWidgetCell(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4207,7 +4082,7 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlWindow *)new_wxHtmlWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxPyHtmlWindow *)new_wxHtmlWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4233,7 +4108,7 @@ static PyObject *_wrap_new_wxPreHtmlWindow(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow(); + _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4297,7 +4172,7 @@ static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4334,7 +4209,7 @@ static PyObject *_wrap_wxHtmlWindow__setCallbackInfo(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow__setCallbackInfo(_arg0,_arg1,_arg2); + wxHtmlWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4364,26 +4239,13 @@ static PyObject *_wrap_wxHtmlWindow_SetPage(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_SetPage(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_SetPage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4416,26 +4278,13 @@ static PyObject *_wrap_wxHtmlWindow_LoadPage(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_LoadPage(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_LoadPage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4468,26 +4317,13 @@ static PyObject *_wrap_wxHtmlWindow_AppendToPage(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_AppendToPage(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_AppendToPage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4519,12 +4355,16 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPage(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlWindow_GetOpenedPage(_arg0)); + _result = new wxString (wxHtmlWindow_GetOpenedPage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4552,12 +4392,16 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedAnchor(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlWindow_GetOpenedAnchor(_arg0)); + _result = new wxString (wxHtmlWindow_GetOpenedAnchor(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4585,12 +4429,16 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPageTitle(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlWindow_GetOpenedPageTitle(_arg0)); + _result = new wxString (wxHtmlWindow_GetOpenedPageTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4627,7 +4475,7 @@ static PyObject *_wrap_wxHtmlWindow_SetRelatedFrame(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetRelatedFrame(_arg0,_arg1,_arg2); + wxHtmlWindow_SetRelatedFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4656,7 +4504,7 @@ static PyObject *_wrap_wxHtmlWindow_GetRelatedFrame(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxHtmlWindow_GetRelatedFrame(_arg0); + _result = (wxFrame *)wxHtmlWindow_GetRelatedFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4684,7 +4532,7 @@ static PyObject *_wrap_wxHtmlWindow_SetRelatedStatusBar(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetRelatedStatusBar(_arg0,_arg1); + wxHtmlWindow_SetRelatedStatusBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4723,47 +4571,21 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { _arg3 = _obj3; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4800,26 +4622,13 @@ static PyObject *_wrap_wxHtmlWindow_SetTitle(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetTitle(_arg0,*_arg1); + wxHtmlWindow_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4852,7 +4661,7 @@ static PyObject *_wrap_wxHtmlWindow_SetBorders(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetBorders(_arg0,_arg1); + wxHtmlWindow_SetBorders(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4891,26 +4700,13 @@ static PyObject *_wrap_wxHtmlWindow_ReadCustomization(PyObject *self, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_ReadCustomization(_arg0,_arg1,*_arg2); + wxHtmlWindow_ReadCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4953,26 +4749,13 @@ static PyObject *_wrap_wxHtmlWindow_WriteCustomization(PyObject *self, PyObject } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_WriteCustomization(_arg0,_arg1,*_arg2); + wxHtmlWindow_WriteCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5005,7 +4788,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryBack(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryBack(_arg0); + _result = (bool )wxHtmlWindow_HistoryBack(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5033,7 +4816,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryForward(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryForward(_arg0); + _result = (bool )wxHtmlWindow_HistoryForward(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5061,7 +4844,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryCanBack(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryCanBack(_arg0); + _result = (bool )wxHtmlWindow_HistoryCanBack(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5089,7 +4872,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryCanForward(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryCanForward(_arg0); + _result = (bool )wxHtmlWindow_HistoryCanForward(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5116,7 +4899,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryClear(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_HistoryClear(_arg0); + wxHtmlWindow_HistoryClear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5146,7 +4929,7 @@ static PyObject *_wrap_wxHtmlWindow_GetInternalRepresentation(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWindow_GetInternalRepresentation(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWindow_GetInternalRepresentation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5181,7 +4964,7 @@ static PyObject *_wrap_wxHtmlWindow_GetParser(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWinParser *)wxHtmlWindow_GetParser(_arg0); + _result = (wxHtmlWinParser *)wxHtmlWindow_GetParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5216,26 +4999,13 @@ static PyObject *_wrap_wxHtmlWindow_ScrollToAnchor(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_ScrollToAnchor(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_ScrollToAnchor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5268,26 +5038,13 @@ static PyObject *_wrap_wxHtmlWindow_HasAnchor(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HasAnchor(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_HasAnchor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5327,7 +5084,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnLinkClicked(_arg0,*_arg1); + wxHtmlWindow_base_OnLinkClicked(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5356,7 +5113,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnSetTitle(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnSetTitle(_arg0,_arg1); + wxHtmlWindow_base_OnSetTitle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5395,7 +5152,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnCellMouseHover(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnCellMouseHover(_arg0,_arg1,_arg2,_arg3); + wxHtmlWindow_base_OnCellMouseHover(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5443,7 +5200,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnCellClicked(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnCellClicked(_arg0,_arg1,_arg2,_arg3,*_arg4); + wxHtmlWindow_base_OnCellClicked(_arg0,_arg1,_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5472,7 +5229,7 @@ static PyObject *_wrap_new_wxHtmlDCRenderer(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlDCRenderer *)new_wxHtmlDCRenderer(); + _result = (wxHtmlDCRenderer *)new_wxHtmlDCRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5505,7 +5262,7 @@ static PyObject *_wrap_delete_wxHtmlDCRenderer(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlDCRenderer(_arg0); + delete_wxHtmlDCRenderer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5543,7 +5300,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetDC(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlDCRenderer_SetDC(_arg0,_arg1,_arg2); + wxHtmlDCRenderer_SetDC(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5573,7 +5330,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlDCRenderer_SetSize(_arg0,_arg1,_arg2); + wxHtmlDCRenderer_SetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5606,46 +5363,20 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlDCRenderer_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); + wxHtmlDCRenderer_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5686,7 +5417,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_Render(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5714,7 +5445,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_GetTotalHeight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlDCRenderer_GetTotalHeight(_arg0); + _result = (int )wxHtmlDCRenderer_GetTotalHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5751,7 +5482,7 @@ static PyObject *_wrap_new_wxHtmlPrintout(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlPrintout *)new_wxHtmlPrintout(_arg0); + _result = (wxHtmlPrintout *)new_wxHtmlPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5789,46 +5520,20 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlText(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); + wxHtmlPrintout_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5865,26 +5570,13 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlFile(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetHtmlFile(_arg0,*_arg1); + wxHtmlPrintout_SetHtmlFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5918,26 +5610,13 @@ static PyObject *_wrap_wxHtmlPrintout_SetHeader(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetHeader(_arg0,*_arg1,_arg2); + wxHtmlPrintout_SetHeader(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5971,26 +5650,13 @@ static PyObject *_wrap_wxHtmlPrintout_SetFooter(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetFooter(_arg0,*_arg1,_arg2); + wxHtmlPrintout_SetFooter(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6027,7 +5693,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetMargins(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxHtmlPrintout_SetMargins(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6066,7 +5732,7 @@ static PyObject *_wrap_new_wxHtmlEasyPrinting(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlEasyPrinting *)new_wxHtmlEasyPrinting(_arg0,_arg1); + _result = (wxHtmlEasyPrinting *)new_wxHtmlEasyPrinting(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6099,7 +5765,7 @@ static PyObject *_wrap_delete_wxHtmlEasyPrinting(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlEasyPrinting(_arg0); + delete_wxHtmlEasyPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6128,26 +5794,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewFile(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PreviewFile(_arg0,*_arg1); + wxHtmlEasyPrinting_PreviewFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6182,45 +5835,19 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewText(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PreviewText(_arg0,*_arg1,*_arg2); + wxHtmlEasyPrinting_PreviewText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6257,26 +5884,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintFile(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PrintFile(_arg0,*_arg1); + wxHtmlEasyPrinting_PrintFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6311,45 +5925,19 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintText(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PrintText(_arg0,*_arg1,*_arg2); + wxHtmlEasyPrinting_PrintText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6385,7 +5973,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrinterSetup(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PrinterSetup(_arg0); + wxHtmlEasyPrinting_PrinterSetup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6413,7 +6001,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PageSetup(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PageSetup(_arg0); + wxHtmlEasyPrinting_PageSetup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6443,26 +6031,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetHeader(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_SetHeader(_arg0,*_arg1,_arg2); + wxHtmlEasyPrinting_SetHeader(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6496,26 +6071,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetFooter(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_SetFooter(_arg0,*_arg1,_arg2); + wxHtmlEasyPrinting_SetFooter(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6549,7 +6111,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_GetPrintData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxHtmlEasyPrinting_GetPrintData(_arg0); + _result = (wxPrintData *)wxHtmlEasyPrinting_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6584,7 +6146,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_GetPageSetupData(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialogData *)wxHtmlEasyPrinting_GetPageSetupData(_arg0); + _result = (wxPageSetupDialogData *)wxHtmlEasyPrinting_GetPageSetupData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/htmlhelp.cpp b/wxPython/src/gtk/htmlhelp.cpp index 7a0546196d..435e78b217 100644 --- a/wxPython/src/gtk/htmlhelp.cpp +++ b/wxPython/src/gtk/htmlhelp.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -125,80 +119,28 @@ static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:new_wxHtmlBookRecord",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlBookRecord *)new_wxHtmlBookRecord(*_arg0,*_arg1,*_arg2,*_arg3); + _result = (wxHtmlBookRecord *)new_wxHtmlBookRecord(*_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -248,12 +190,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBookFile(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetBookFile(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetBookFile(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -281,12 +227,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetTitle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetTitle(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -314,12 +264,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetStart(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetStart(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetStart(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -347,12 +301,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBasePath(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetBasePath(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetBasePath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -381,7 +339,7 @@ static PyObject *_wrap_wxHtmlBookRecord_SetContentsRange(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetContentsRange(_arg0,_arg1,_arg2); + wxHtmlBookRecord_SetContentsRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -410,7 +368,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetContentsStart(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlBookRecord_GetContentsStart(_arg0); + _result = (int )wxHtmlBookRecord_GetContentsStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -438,7 +396,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetContentsEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlBookRecord_GetContentsEnd(_arg0); + _result = (int )wxHtmlBookRecord_GetContentsEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -466,26 +424,13 @@ static PyObject *_wrap_wxHtmlBookRecord_SetTitle(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetTitle(_arg0,*_arg1); + wxHtmlBookRecord_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -518,26 +463,13 @@ static PyObject *_wrap_wxHtmlBookRecord_SetBasePath(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetBasePath(_arg0,*_arg1); + wxHtmlBookRecord_SetBasePath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -570,26 +502,13 @@ static PyObject *_wrap_wxHtmlBookRecord_SetStart(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetStart(_arg0,*_arg1); + wxHtmlBookRecord_SetStart(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -623,31 +542,22 @@ static PyObject *_wrap_wxHtmlBookRecord_GetFullPath(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetFullPath(_arg0,*_arg1)); + _result = new wxString (wxHtmlBookRecord_GetFullPath(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -659,35 +569,6 @@ static PyObject *_wrap_wxHtmlBookRecord_GetFullPath(PyObject *self, PyObject *ar return _resultobj; } -#define wxHtmlContentsItem_m_Level_set(_swigobj,_swigval) (_swigobj->m_Level = _swigval,_swigval) -static PyObject *_wrap_wxHtmlContentsItem_m_Level_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - short _result; - wxHtmlContentsItem * _arg0; - short _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_Level", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxHtmlContentsItem_m_Level_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Level_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (short )wxHtmlContentsItem_m_Level_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("h",_result); - return _resultobj; -} - #define wxHtmlContentsItem_m_Level_get(_swigobj) ((short ) _swigobj->m_Level) static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -708,7 +589,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (short )wxHtmlContentsItem_m_Level_get(_arg0); + _result = (short )wxHtmlContentsItem_m_Level_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -716,35 +597,6 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject * return _resultobj; } -#define wxHtmlContentsItem_m_ID_set(_swigobj,_swigval) (_swigobj->m_ID = _swigval,_swigval) -static PyObject *_wrap_wxHtmlContentsItem_m_ID_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxHtmlContentsItem * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_ID", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContentsItem_m_ID_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_ID_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContentsItem_m_ID_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxHtmlContentsItem_m_ID_get(_swigobj) ((int ) _swigobj->m_ID) static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -765,7 +617,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContentsItem_m_ID_get(_arg0); + _result = (int )wxHtmlContentsItem_m_ID_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -773,44 +625,10 @@ static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *arg return _resultobj; } -static char * wxHtmlContentsItem_m_Name_set(wxHtmlContentsItem *obj, char *val) { - if (obj->m_Name) delete [] obj->m_Name; - obj->m_Name = new char[strlen(val)+1]; - strcpy((char *)obj->m_Name,val); - return (char *) val; -} -static PyObject *_wrap_wxHtmlContentsItem_m_Name_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char * _result; - wxHtmlContentsItem * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_Name", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlContentsItem_m_Name_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Name_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Name_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -#define wxHtmlContentsItem_m_Name_get(_swigobj) ((char *) _swigobj->m_Name) +#define wxHtmlContentsItem_m_Name_get(_swigobj) ((wxChar *) _swigobj->m_Name) static PyObject *_wrap_wxHtmlContentsItem_m_Name_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxChar * _result; wxHtmlContentsItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -827,41 +645,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Name_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Name_get(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static char * wxHtmlContentsItem_m_Page_set(wxHtmlContentsItem *obj, char *val) { - if (obj->m_Page) delete [] obj->m_Page; - obj->m_Page = new char[strlen(val)+1]; - strcpy((char *)obj->m_Page,val); - return (char *) val; -} -static PyObject *_wrap_wxHtmlContentsItem_m_Page_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char * _result; - wxHtmlContentsItem * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_Page", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlContentsItem_m_Page_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Page_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Page_set(_arg0,_arg1); + _result = (wxChar *)wxHtmlContentsItem_m_Name_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -869,10 +653,10 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Page_set(PyObject *self, PyObject *a return _resultobj; } -#define wxHtmlContentsItem_m_Page_get(_swigobj) ((char *) _swigobj->m_Page) +#define wxHtmlContentsItem_m_Page_get(_swigobj) ((wxChar *) _swigobj->m_Page) static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxChar * _result; wxHtmlContentsItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -889,7 +673,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Page_get(_arg0); + _result = (wxChar *)wxHtmlContentsItem_m_Page_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -897,50 +681,6 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *a return _resultobj; } -#define wxHtmlContentsItem_m_Book_set(_swigobj,_swigval) (_swigobj->m_Book = _swigval,_swigval) -static PyObject *_wrap_wxHtmlContentsItem_m_Book_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxHtmlBookRecord * _result; - wxHtmlContentsItem * _arg0; - wxHtmlBookRecord * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","m_Book", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContentsItem_m_Book_set",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Book_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlBookRecord_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContentsItem_m_Book_set. Expected _wxHtmlBookRecord_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlBookRecord_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - #define wxHtmlContentsItem_m_Book_get(_swigobj) ((wxHtmlBookRecord *) _swigobj->m_Book) static PyObject *_wrap_wxHtmlContentsItem_m_Book_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -962,7 +702,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Book_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_get(_arg0); + _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -996,7 +736,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_Search(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlSearchStatus_Search(_arg0); + _result = (bool )wxHtmlSearchStatus_Search(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1024,7 +764,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_IsActive(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlSearchStatus_IsActive(_arg0); + _result = (bool )wxHtmlSearchStatus_IsActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1052,7 +792,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetCurIndex(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlSearchStatus_GetCurIndex(_arg0); + _result = (int )wxHtmlSearchStatus_GetCurIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1080,7 +820,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetMaxIndex(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlSearchStatus_GetMaxIndex(_arg0); + _result = (int )wxHtmlSearchStatus_GetMaxIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1108,13 +848,17 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxHtmlSearchStatus_GetName(_arg0); + const wxString & _result_ref = wxHtmlSearchStatus_GetName(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1140,7 +884,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetContentsItem(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContentsItem *)wxHtmlSearchStatus_GetContentsItem(_arg0); + _result = (wxHtmlContentsItem *)wxHtmlSearchStatus_GetContentsItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1166,7 +910,7 @@ static PyObject *_wrap_new_wxHtmlHelpData(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpData *)new_wxHtmlHelpData(); + _result = (wxHtmlHelpData *)new_wxHtmlHelpData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1199,7 +943,7 @@ static PyObject *_wrap_delete_wxHtmlHelpData(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlHelpData(_arg0); + delete_wxHtmlHelpData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1228,26 +972,13 @@ static PyObject *_wrap_wxHtmlHelpData_SetTempDir(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpData_SetTempDir(_arg0,*_arg1); + wxHtmlHelpData_SetTempDir(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1281,26 +1012,13 @@ static PyObject *_wrap_wxHtmlHelpData_AddBook(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpData_AddBook(_arg0,*_arg1); + _result = (bool )wxHtmlHelpData_AddBook(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1333,31 +1051,22 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlHelpData_FindPageByName(_arg0,*_arg1)); + _result = new wxString (wxHtmlHelpData_FindPageByName(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1390,12 +1099,16 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageById(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlHelpData_FindPageById(_arg0,_arg1)); + _result = new wxString (wxHtmlHelpData_FindPageById(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1424,7 +1137,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetBookRecArray(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxHtmlBookRecArray & _result_ref = wxHtmlHelpData_GetBookRecArray(_arg0); + const wxHtmlBookRecArray & _result_ref = wxHtmlHelpData_GetBookRecArray(_arg0); _result = (wxHtmlBookRecArray *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1460,7 +1173,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetContents(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetContents(_arg0); + _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetContents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1494,7 +1207,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetContentsCnt(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlHelpData_GetContentsCnt(_arg0); + _result = (int )wxHtmlHelpData_GetContentsCnt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1523,7 +1236,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetIndex(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetIndex(_arg0); + _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1557,7 +1270,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetIndexCnt(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlHelpData_GetIndexCnt(_arg0); + _result = (int )wxHtmlHelpData_GetIndexCnt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1632,22 +1345,9 @@ static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObj } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -1658,7 +1358,7 @@ static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpFrame *)new_wxHtmlHelpFrame(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (wxHtmlHelpFrame *)new_wxHtmlHelpFrame(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1697,7 +1397,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_GetData(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpData *)wxHtmlHelpFrame_GetData(_arg0); + _result = (wxHtmlHelpData *)wxHtmlHelpFrame_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1731,26 +1431,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_SetTitleFormat(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_SetTitleFormat(_arg0,*_arg1); + wxHtmlHelpFrame_SetTitleFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1783,26 +1470,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_Display(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_Display(_arg0,*_arg1); + wxHtmlHelpFrame_Display(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1835,7 +1509,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_DisplayID(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_DisplayID(_arg0,_arg1); + wxHtmlHelpFrame_DisplayID(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1863,7 +1537,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_DisplayContents(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_DisplayContents(_arg0); + wxHtmlHelpFrame_DisplayContents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1891,7 +1565,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_DisplayIndex(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_DisplayIndex(_arg0); + wxHtmlHelpFrame_DisplayIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1921,26 +1595,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_KeywordSearch(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpFrame_KeywordSearch(_arg0,*_arg1); + _result = (bool )wxHtmlHelpFrame_KeywordSearch(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1982,26 +1643,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_UseConfig(PyObject *self, PyObject *args, } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_UseConfig(_arg0,_arg1,*_arg2); + wxHtmlHelpFrame_UseConfig(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2044,26 +1692,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_ReadCustomization(PyObject *self, PyObjec } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_ReadCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpFrame_ReadCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2106,26 +1741,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_WriteCustomization(PyObject *self, PyObje } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_WriteCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpFrame_WriteCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2167,7 +1789,7 @@ static PyObject *_wrap_new_wxHtmlHelpController(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpController *)new_wxHtmlHelpController(_arg0); + _result = (wxHtmlHelpController *)new_wxHtmlHelpController(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2200,7 +1822,7 @@ static PyObject *_wrap_delete_wxHtmlHelpController(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlHelpController(_arg0); + delete_wxHtmlHelpController(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2229,26 +1851,13 @@ static PyObject *_wrap_wxHtmlHelpController_SetTitleFormat(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_SetTitleFormat(_arg0,*_arg1); + wxHtmlHelpController_SetTitleFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2281,26 +1890,13 @@ static PyObject *_wrap_wxHtmlHelpController_SetTempDir(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_SetTempDir(_arg0,*_arg1); + wxHtmlHelpController_SetTempDir(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2335,26 +1931,13 @@ static PyObject *_wrap_wxHtmlHelpController_AddBook(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpController_AddBook(_arg0,*_arg1,_arg2); + _result = (bool )wxHtmlHelpController_AddBook(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2386,26 +1969,13 @@ static PyObject *_wrap_wxHtmlHelpController_Display(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_Display(_arg0,*_arg1); + wxHtmlHelpController_Display(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2438,7 +2008,7 @@ static PyObject *_wrap_wxHtmlHelpController_DisplayID(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_DisplayID(_arg0,_arg1); + wxHtmlHelpController_DisplayID(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2466,7 +2036,7 @@ static PyObject *_wrap_wxHtmlHelpController_DisplayContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_DisplayContents(_arg0); + wxHtmlHelpController_DisplayContents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2494,7 +2064,7 @@ static PyObject *_wrap_wxHtmlHelpController_DisplayIndex(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_DisplayIndex(_arg0); + wxHtmlHelpController_DisplayIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2524,26 +2094,13 @@ static PyObject *_wrap_wxHtmlHelpController_KeywordSearch(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpController_KeywordSearch(_arg0,*_arg1); + _result = (bool )wxHtmlHelpController_KeywordSearch(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2585,26 +2142,13 @@ static PyObject *_wrap_wxHtmlHelpController_UseConfig(PyObject *self, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_UseConfig(_arg0,_arg1,*_arg2); + wxHtmlHelpController_UseConfig(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2647,26 +2191,13 @@ static PyObject *_wrap_wxHtmlHelpController_ReadCustomization(PyObject *self, Py } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_ReadCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpController_ReadCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2709,26 +2240,13 @@ static PyObject *_wrap_wxHtmlHelpController_WriteCustomization(PyObject *self, P } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_WriteCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpController_WriteCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2762,7 +2280,7 @@ static PyObject *_wrap_wxHtmlHelpController_GetFrame(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpFrame *)wxHtmlHelpController_GetFrame(_arg0); + _result = (wxHtmlHelpFrame *)wxHtmlHelpController_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2820,15 +2338,10 @@ static PyMethodDef htmlhelpcMethods[] = { { "wxHtmlSearchStatus_IsActive", (PyCFunction) _wrap_wxHtmlSearchStatus_IsActive, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlSearchStatus_Search", (PyCFunction) _wrap_wxHtmlSearchStatus_Search, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Book_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Book_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Book_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Book_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Page_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Page_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Page_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Page_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Name_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Name_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Name_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Name_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_ID_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_ID_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_ID_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_ID_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Level_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Level_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Level_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Level_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlBookRecord_GetFullPath", (PyCFunction) _wrap_wxHtmlBookRecord_GetFullPath, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlBookRecord_SetStart", (PyCFunction) _wrap_wxHtmlBookRecord_SetStart, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlBookRecord_SetBasePath", (PyCFunction) _wrap_wxHtmlBookRecord_SetBasePath, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/image.cpp b/wxPython/src/gtk/image.cpp index 0796f706fe..4909ae75b1 100644 --- a/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/image.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - wxImage* wxEmptyImage(int width=0, int height=0) { if (width == 0 && height == 0) return new wxImage; @@ -158,7 +152,7 @@ static PyObject *_wrap_wxEmptyImage(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxEmptyImage(_arg0,_arg1); + _result = (wxImage *)wxEmptyImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -187,44 +181,18 @@ static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxImageFromMime",_kwnames,&_obj0,&_obj1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromMime(*_arg0,*_arg1,_arg2); + _result = (wxImage *)wxImageFromMime(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -266,7 +234,7 @@ static PyObject *_wrap_wxImageFromBitmap(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromBitmap(*_arg0); + _result = (wxImage *)wxImageFromBitmap(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -302,7 +270,7 @@ static PyObject *_wrap_wxImageFromData(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromData(_arg0,_arg1,_arg2); + _result = (wxImage *)wxImageFromData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -346,7 +314,7 @@ static PyObject *_wrap_wxImageFromStream(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromStream(*_arg0,_arg1,_arg2); + _result = (wxImage *)wxImageFromStream(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -394,26 +362,13 @@ static PyObject *_wrap_wxImageFromStreamMime(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromStreamMime(*_arg0,*_arg1,_arg2); + _result = (wxImage *)wxImageFromStreamMime(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -444,7 +399,7 @@ static PyObject *_wrap_wxInitAllImageHandlers(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInitAllImageHandlers(); + wxInitAllImageHandlers(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -489,7 +444,7 @@ static PyObject *_wrap_wxBitmapFromImage(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromImage(*_arg0,_arg1); + _result = (wxBitmap *)wxBitmapFromImage(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,12 +486,16 @@ static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImageHandler_GetName(_arg0)); + _result = new wxString (wxImageHandler_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -564,12 +523,16 @@ static PyObject *_wrap_wxImageHandler_GetExtension(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImageHandler_GetExtension(_arg0)); + _result = new wxString (wxImageHandler_GetExtension(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -597,7 +560,7 @@ static PyObject *_wrap_wxImageHandler_GetType(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxImageHandler_GetType(_arg0); + _result = (long )wxImageHandler_GetType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -625,12 +588,16 @@ static PyObject *_wrap_wxImageHandler_GetMimeType(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImageHandler_GetMimeType(_arg0)); + _result = new wxString (wxImageHandler_GetMimeType(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -659,26 +626,13 @@ static PyObject *_wrap_wxImageHandler_CanRead(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageHandler_CanRead(_arg0,*_arg1); + _result = (bool )wxImageHandler_CanRead(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -710,26 +664,13 @@ static PyObject *_wrap_wxImageHandler_SetName(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetName(_arg0,*_arg1); + wxImageHandler_SetName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -762,26 +703,13 @@ static PyObject *_wrap_wxImageHandler_SetExtension(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetExtension(_arg0,*_arg1); + wxImageHandler_SetExtension(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -814,7 +742,7 @@ static PyObject *_wrap_wxImageHandler_SetType(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetType(_arg0,_arg1); + wxImageHandler_SetType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -843,26 +771,13 @@ static PyObject *_wrap_wxImageHandler_SetMimeType(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetMimeType(_arg0,*_arg1); + wxImageHandler_SetMimeType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -903,7 +818,7 @@ static PyObject *_wrap_new_wxPNGHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPNGHandler *)new_wxPNGHandler(); + _result = (wxPNGHandler *)new_wxPNGHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -945,7 +860,7 @@ static PyObject *_wrap_new_wxJPEGHandler(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxJPEGHandler *)new_wxJPEGHandler(); + _result = (wxJPEGHandler *)new_wxJPEGHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -987,7 +902,7 @@ static PyObject *_wrap_new_wxBMPHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBMPHandler *)new_wxBMPHandler(); + _result = (wxBMPHandler *)new_wxBMPHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1037,7 +952,7 @@ static PyObject *_wrap_new_wxICOHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxICOHandler *)new_wxICOHandler(); + _result = (wxICOHandler *)new_wxICOHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1095,7 +1010,7 @@ static PyObject *_wrap_new_wxCURHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCURHandler *)new_wxCURHandler(); + _result = (wxCURHandler *)new_wxCURHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1161,7 +1076,7 @@ static PyObject *_wrap_new_wxANIHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxANIHandler *)new_wxANIHandler(); + _result = (wxANIHandler *)new_wxANIHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1203,7 +1118,7 @@ static PyObject *_wrap_new_wxGIFHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGIFHandler *)new_wxGIFHandler(); + _result = (wxGIFHandler *)new_wxGIFHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1245,7 +1160,7 @@ static PyObject *_wrap_new_wxPNMHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPNMHandler *)new_wxPNMHandler(); + _result = (wxPNMHandler *)new_wxPNMHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,7 +1202,7 @@ static PyObject *_wrap_new_wxPCXHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPCXHandler *)new_wxPCXHandler(); + _result = (wxPCXHandler *)new_wxPCXHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1329,7 +1244,7 @@ static PyObject *_wrap_new_wxTIFFHandler(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTIFFHandler *)new_wxTIFFHandler(); + _result = (wxTIFFHandler *)new_wxTIFFHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1366,26 +1281,13 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|li:new_wxImage",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)new_wxImage(*_arg0,_arg1,_arg2); + _result = (wxImage *)new_wxImage(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1422,7 +1324,7 @@ static PyObject *_wrap_delete_wxImage(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxImage(_arg0); + delete_wxImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1452,7 +1354,7 @@ static PyObject *_wrap_wxImage_ConvertToBitmap(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxImage_ConvertToBitmap(_arg0)); + _result = new wxBitmap (wxImage_ConvertToBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1485,7 +1387,7 @@ static PyObject *_wrap_wxImage_ConvertToMonoBitmap(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxImage_ConvertToMonoBitmap(_arg0,_arg1,_arg2,_arg3)); + _result = new wxBitmap (wxImage_ConvertToMonoBitmap(_arg0,_arg1,_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1515,7 +1417,7 @@ static PyObject *_wrap_wxImage_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Create(_arg0,_arg1,_arg2); + wxImage_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1543,7 +1445,7 @@ static PyObject *_wrap_wxImage_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Destroy(_arg0); + wxImage_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1575,7 +1477,7 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Scale(_arg0,_arg1,_arg2)); + _result = new wxImage (wxImage_Scale(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1607,7 +1509,7 @@ static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2); + wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2); _result = (wxImage *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1646,7 +1548,7 @@ static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetRGB(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxImage_SetRGB(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1677,7 +1579,7 @@ static PyObject *_wrap_wxImage_GetRed(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetRed(_arg0,_arg1,_arg2); + _result = (unsigned char )wxImage_GetRed(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1707,7 +1609,7 @@ static PyObject *_wrap_wxImage_GetGreen(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetGreen(_arg0,_arg1,_arg2); + _result = (unsigned char )wxImage_GetGreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1737,7 +1639,7 @@ static PyObject *_wrap_wxImage_GetBlue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetBlue(_arg0,_arg1,_arg2); + _result = (unsigned char )wxImage_GetBlue(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1756,26 +1658,13 @@ static PyObject *_wrap_wxImage_CanRead(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_CanRead",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage::CanRead(*_arg0); + _result = (bool )wxImage::CanRead(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1799,26 +1688,13 @@ static PyObject *_wrap_wxImage_GetImageCount(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxImage_GetImageCount",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage::GetImageCount(*_arg0,_arg1); + _result = (int )wxImage::GetImageCount(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1853,26 +1729,13 @@ static PyObject *_wrap_wxImage_LoadFile(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadFile(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxImage_LoadFile(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1908,44 +1771,18 @@ static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadMimeFile(_arg0,*_arg1,*_arg2,_arg3); + _result = (bool )wxImage_LoadMimeFile(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1983,26 +1820,13 @@ static PyObject *_wrap_wxImage_SaveFile(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_SaveFile(_arg0,*_arg1,_arg2); + _result = (bool )wxImage_SaveFile(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2037,44 +1861,18 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_SaveMimeFile(_arg0,*_arg1,*_arg2); + _result = (bool )wxImage_SaveMimeFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2117,7 +1915,7 @@ static PyObject *_wrap_wxImage_CanReadStream(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage::CanRead(*_arg0); + _result = (bool )wxImage::CanRead(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2168,7 +1966,7 @@ static PyObject *_wrap_wxImage_LoadStream(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadStream(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxImage_LoadStream(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2219,26 +2017,13 @@ static PyObject *_wrap_wxImage_LoadMimeStream(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadMimeStream(_arg0,*_arg1,*_arg2,_arg3); + _result = (bool )wxImage_LoadMimeStream(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2274,7 +2059,7 @@ static PyObject *_wrap_wxImage_Ok(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_Ok(_arg0); + _result = (bool )wxImage_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2302,7 +2087,7 @@ static PyObject *_wrap_wxImage_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage_GetWidth(_arg0); + _result = (int )wxImage_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2330,7 +2115,7 @@ static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage_GetHeight(_arg0); + _result = (int )wxImage_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2367,7 +2152,7 @@ static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1)); + _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2397,7 +2182,7 @@ static PyObject *_wrap_wxImage_Copy(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Copy(_arg0)); + _result = new wxImage (wxImage_Copy(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2436,7 +2221,7 @@ static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Paste(_arg0,*_arg1,_arg2,_arg3); + wxImage_Paste(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2469,7 +2254,7 @@ static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxImage_GetData(_arg0); + _result = (PyObject *)wxImage_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2515,7 +2300,7 @@ static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetData(_arg0,_arg1); + wxImage_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2546,7 +2331,7 @@ static PyObject *_wrap_wxImage_SetMaskColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetMaskColour(_arg0,_arg1,_arg2,_arg3); + wxImage_SetMaskColour(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2575,7 +2360,7 @@ static PyObject *_wrap_wxImage_GetMaskRed(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetMaskRed(_arg0); + _result = (unsigned char )wxImage_GetMaskRed(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2603,7 +2388,7 @@ static PyObject *_wrap_wxImage_GetMaskGreen(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetMaskGreen(_arg0); + _result = (unsigned char )wxImage_GetMaskGreen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2631,7 +2416,7 @@ static PyObject *_wrap_wxImage_GetMaskBlue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetMaskBlue(_arg0); + _result = (unsigned char )wxImage_GetMaskBlue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2661,7 +2446,7 @@ static PyObject *_wrap_wxImage_SetMask(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetMask(_arg0,_arg1); + wxImage_SetMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2690,7 +2475,7 @@ static PyObject *_wrap_wxImage_HasMask(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_HasMask(_arg0); + _result = (bool )wxImage_HasMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2740,7 +2525,7 @@ static PyObject *_wrap_wxImage_Rotate(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4)); + _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2773,7 +2558,7 @@ static PyObject *_wrap_wxImage_Rotate90(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Rotate90(_arg0,_arg1)); + _result = new wxImage (wxImage_Rotate90(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2806,7 +2591,7 @@ static PyObject *_wrap_wxImage_Mirror(PyObject *self, PyObject *args, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Mirror(_arg0,_arg1)); + _result = new wxImage (wxImage_Mirror(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2840,7 +2625,7 @@ static PyObject *_wrap_wxImage_Replace(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2873,7 +2658,7 @@ static PyObject *_wrap_wxImage_ConvertToMono(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_ConvertToMono(_arg0,_arg1,_arg2,_arg3)); + _result = new wxImage (wxImage_ConvertToMono(_arg0,_arg1,_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2904,44 +2689,18 @@ static PyObject *_wrap_wxImage_SetOption(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetOption(_arg0,*_arg1,*_arg2); + wxImage_SetOption(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2979,26 +2738,13 @@ static PyObject *_wrap_wxImage_SetOptionInt(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetOptionInt(_arg0,*_arg1,_arg2); + wxImage_SetOptionInt(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3032,31 +2778,22 @@ static PyObject *_wrap_wxImage_GetOption(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImage_GetOption(_arg0,*_arg1)); + _result = new wxString (wxImage_GetOption(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -3089,26 +2826,13 @@ static PyObject *_wrap_wxImage_GetOptionInt(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage_GetOptionInt(_arg0,*_arg1); + _result = (int )wxImage_GetOptionInt(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3141,26 +2865,13 @@ static PyObject *_wrap_wxImage_HasOption(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_HasOption(_arg0,*_arg1); + _result = (bool )wxImage_HasOption(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3193,7 +2904,7 @@ static PyObject *_wrap_wxImage_CountColours(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned long )wxImage_CountColours(_arg0,_arg1); + _result = (unsigned long )wxImage_CountColours(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3219,7 +2930,7 @@ static PyObject *_wrap_wxImage_AddHandler(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage::AddHandler(_arg0); + wxImage::AddHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3246,7 +2957,7 @@ static PyObject *_wrap_wxImage_InsertHandler(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage::InsertHandler(_arg0); + wxImage::InsertHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3266,26 +2977,13 @@ static PyObject *_wrap_wxImage_RemoveHandler(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_RemoveHandler",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage::RemoveHandler(*_arg0); + _result = (bool )wxImage::RemoveHandler(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index 7f9c07fe8c..ab11a398c3 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.cpp @@ -83,12 +83,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -163,22 +157,9 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -194,7 +175,7 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIParentFrame *)new_wxMDIParentFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxMDIParentFrame *)new_wxMDIParentFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -224,7 +205,7 @@ static PyObject *_wrap_new_wxPreMDIParentFrame(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIParentFrame *)new_wxPreMDIParentFrame(); + _result = (wxMDIParentFrame *)new_wxPreMDIParentFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -277,22 +258,9 @@ static PyObject *_wrap_wxMDIParentFrame_Create(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -308,7 +276,7 @@ static PyObject *_wrap_wxMDIParentFrame_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMDIParentFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxMDIParentFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -339,7 +307,7 @@ static PyObject *_wrap_wxMDIParentFrame_ActivateNext(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_ActivateNext(_arg0); + wxMDIParentFrame_ActivateNext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -367,7 +335,7 @@ static PyObject *_wrap_wxMDIParentFrame_ActivatePrevious(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_ActivatePrevious(_arg0); + wxMDIParentFrame_ActivatePrevious(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -395,7 +363,7 @@ static PyObject *_wrap_wxMDIParentFrame_ArrangeIcons(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_ArrangeIcons(_arg0); + wxMDIParentFrame_ArrangeIcons(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -423,7 +391,7 @@ static PyObject *_wrap_wxMDIParentFrame_Cascade(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_Cascade(_arg0); + wxMDIParentFrame_Cascade(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -452,7 +420,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetActiveChild(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); + _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -480,7 +448,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetClientWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); + _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -508,7 +476,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); + _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -535,7 +503,7 @@ static PyObject *_wrap_wxMDIParentFrame_Tile(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_Tile(_arg0); + wxMDIParentFrame_Tile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -615,22 +583,9 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -646,7 +601,7 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIChildFrame *)new_wxMDIChildFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxMDIChildFrame *)new_wxMDIChildFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -676,7 +631,7 @@ static PyObject *_wrap_new_wxPreMDIChildFrame(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIChildFrame *)new_wxPreMDIChildFrame(); + _result = (wxMDIChildFrame *)new_wxPreMDIChildFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -729,22 +684,9 @@ static PyObject *_wrap_wxMDIChildFrame_Create(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -760,7 +702,7 @@ static PyObject *_wrap_wxMDIChildFrame_Create(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMDIChildFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxMDIChildFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -791,7 +733,7 @@ static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIChildFrame_Activate(_arg0); + wxMDIChildFrame_Activate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -822,7 +764,7 @@ static PyObject *_wrap_wxMDIChildFrame_Maximize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIChildFrame_Maximize(_arg0,_arg1); + wxMDIChildFrame_Maximize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -850,7 +792,7 @@ static PyObject *_wrap_wxMDIChildFrame_Restore(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIChildFrame_Restore(_arg0); + wxMDIChildFrame_Restore(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -905,7 +847,7 @@ static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIClientWindow *)new_wxMDIClientWindow(_arg0,_arg1); + _result = (wxMDIClientWindow *)new_wxMDIClientWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -931,7 +873,7 @@ static PyObject *_wrap_new_wxPreMDIClientWindow(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIClientWindow *)new_wxPreMDIClientWindow(); + _result = (wxMDIClientWindow *)new_wxPreMDIClientWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -975,7 +917,7 @@ static PyObject *_wrap_wxMDIClientWindow_Create(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMDIClientWindow_Create(_arg0,_arg1,_arg2); + _result = (bool )wxMDIClientWindow_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 86a3f6c0a0..07f36a4733 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -87,12 +87,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); @@ -116,8 +110,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return Py_None; } - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; + wxString wxGetResource(const wxString& section, const wxString& entry, + const wxString& file = wxEmptyString) { + wxChar * retval; wxGetResource(section, entry, &retval, file); return retval; } @@ -156,7 +151,7 @@ static PyObject *_wrap_wxIntersectRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxIntersectRect(_arg0,_arg1); + _result = (PyObject *)wxIntersectRect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -176,7 +171,7 @@ static PyObject *_wrap_wxNewId(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); + _result = (long )wxNewId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -194,7 +189,7 @@ static PyObject *_wrap_wxRegisterId(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); + wxRegisterId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -213,7 +208,7 @@ static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) { return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); + _result = (long )wxNewId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -231,7 +226,7 @@ static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); + wxRegisterId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -250,7 +245,7 @@ static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetCurrentId(); + _result = (long )wxGetCurrentId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -267,7 +262,7 @@ static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBell(); + wxBell(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -285,7 +280,7 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEndBusyCursor(); + wxEndBusyCursor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -307,7 +302,7 @@ static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetElapsedTime(_arg0); + _result = (long )wxGetElapsedTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -334,7 +329,7 @@ static PyObject *_wrap_wxGetMousePosition(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGetMousePosition(_arg0,_arg1); + wxGetMousePosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -363,7 +358,7 @@ static PyObject *_wrap_wxIsBusy(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIsBusy(); + _result = (bool )wxIsBusy(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -381,12 +376,16 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNow()); + _result = new wxString (wxNow()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -406,26 +405,13 @@ static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShell(*_arg0); + _result = (bool )wxShell(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -446,7 +432,7 @@ static PyObject *_wrap_wxStartTimer(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStartTimer(); + wxStartTimer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -475,7 +461,7 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetOsVersion(_arg0,_arg1); + _result = (int )wxGetOsVersion(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -503,12 +489,16 @@ static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetOsDescription()); + _result = new wxString (wxGetOsDescription()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -526,7 +516,7 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSleep(_arg0); + wxSleep(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -545,7 +535,7 @@ static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUsleep(_arg0); + wxUsleep(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -564,7 +554,7 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxYield(); + _result = (bool )wxYield(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -582,7 +572,7 @@ static PyObject *_wrap_wxYieldIfNeeded(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxYieldIfNeeded(); + _result = (bool )wxYieldIfNeeded(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -602,7 +592,7 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEnableTopLevelWindows(_arg0); + wxEnableTopLevelWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -613,22 +603,62 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1; - char * _arg2 = (char *) NULL; + wxString * _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "section","entry","file", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ss|s:wxGetResource",_kwnames,&_arg0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxGetResource",_kwnames,&_obj0,&_obj1,&_obj2)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxGetResource(_arg0,_arg1,_arg2); + _result = new wxString (wxGetResource(*_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} return _resultobj; } @@ -643,31 +673,22 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStripMenuCodes",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStripMenuCodes(*_arg0)); + _result = new wxString (wxStripMenuCodes(*_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -689,12 +710,16 @@ static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetEmailAddress()); + _result = new wxString (wxGetEmailAddress()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -712,12 +737,16 @@ static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetHostName()); + _result = new wxString (wxGetHostName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -735,12 +764,16 @@ static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetFullHostName()); + _result = new wxString (wxGetFullHostName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -758,12 +791,16 @@ static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserId()); + _result = new wxString (wxGetUserId()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -781,12 +818,16 @@ static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserName()); + _result = new wxString (wxGetUserName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -804,12 +845,16 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetHomeDir()); + _result = new wxString (wxGetHomeDir()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -828,12 +873,16 @@ static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserHome(_arg0)); + _result = new wxString (wxGetUserHome(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -853,26 +902,13 @@ static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -905,12 +941,12 @@ static PyObject *_wrap_wxNullAcceleratorTable_get() { return pyobj; } -static const char * wxObject_GetClassName(wxObject *self) { +static wxString wxObject_GetClassName(wxObject *self) { return self->GetClassInfo()->GetClassName(); } static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxString * _result; wxObject * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -927,11 +963,20 @@ static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxObject_GetClassName(_arg0); + _result = new wxString (wxObject_GetClassName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } @@ -956,7 +1001,7 @@ static PyObject *_wrap_wxObject_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxObject_Destroy(_arg0); + wxObject_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -985,7 +1030,7 @@ static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_x_set(_arg0,_arg1); + _result = (long )wxSize_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1012,7 +1057,7 @@ static PyObject *_wrap_wxSize_x_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_x_get(_arg0); + _result = (long )wxSize_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1040,7 +1085,7 @@ static PyObject *_wrap_wxSize_y_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_y_set(_arg0,_arg1); + _result = (long )wxSize_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1067,7 +1112,7 @@ static PyObject *_wrap_wxSize_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_y_get(_arg0); + _result = (long )wxSize_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1089,7 +1134,7 @@ static PyObject *_wrap_new_wxSize(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSize *)new_wxSize(_arg0,_arg1); + _result = (wxSize *)new_wxSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1121,7 +1166,7 @@ static PyObject *_wrap_delete_wxSize(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxSize(_arg0); + delete_wxSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1150,7 +1195,7 @@ static PyObject *_wrap_wxSize_Set(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_Set(_arg0,_arg1,_arg2); + wxSize_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1178,7 +1223,7 @@ static PyObject *_wrap_wxSize_GetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetX(_arg0); + _result = (long )wxSize_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1205,7 +1250,7 @@ static PyObject *_wrap_wxSize_GetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetY(_arg0); + _result = (long )wxSize_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1232,7 +1277,7 @@ static PyObject *_wrap_wxSize_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetWidth(_arg0); + _result = (long )wxSize_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1259,7 +1304,7 @@ static PyObject *_wrap_wxSize_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetHeight(_arg0); + _result = (long )wxSize_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1286,7 +1331,7 @@ static PyObject *_wrap_wxSize_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_SetWidth(_arg0,_arg1); + wxSize_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1314,7 +1359,7 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_SetHeight(_arg0,_arg1); + wxSize_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1347,7 +1392,7 @@ static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSize_asTuple(_arg0); + _result = (PyObject *)wxSize_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1388,7 +1433,7 @@ static PyObject *_wrap_wxSize___cmp__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSize___cmp__(_arg0,_arg1); + _result = (int )wxSize___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1416,7 +1461,7 @@ static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_x_set(_arg0,_arg1); + _result = (double )wxRealPoint_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1443,7 +1488,7 @@ static PyObject *_wrap_wxRealPoint_x_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_x_get(_arg0); + _result = (double )wxRealPoint_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1471,7 +1516,7 @@ static PyObject *_wrap_wxRealPoint_y_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_y_set(_arg0,_arg1); + _result = (double )wxRealPoint_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1498,7 +1543,7 @@ static PyObject *_wrap_wxRealPoint_y_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_y_get(_arg0); + _result = (double )wxRealPoint_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1520,7 +1565,7 @@ static PyObject *_wrap_new_wxRealPoint(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); + _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1552,7 +1597,7 @@ static PyObject *_wrap_delete_wxRealPoint(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRealPoint(_arg0); + delete_wxRealPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1584,7 +1629,7 @@ static PyObject *_wrap_wxRealPoint_Set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRealPoint_Set(_arg0,_arg1,_arg2); + wxRealPoint_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1617,7 +1662,7 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxRealPoint_asTuple(_arg0); + _result = (PyObject *)wxRealPoint_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1658,7 +1703,7 @@ static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1698,7 +1743,7 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1738,7 +1783,7 @@ static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1766,7 +1811,7 @@ static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_x_set(_arg0,_arg1); + _result = (long )wxPoint_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1793,7 +1838,7 @@ static PyObject *_wrap_wxPoint_x_get(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_x_get(_arg0); + _result = (long )wxPoint_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1821,7 +1866,7 @@ static PyObject *_wrap_wxPoint_y_set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_y_set(_arg0,_arg1); + _result = (long )wxPoint_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1848,7 +1893,7 @@ static PyObject *_wrap_wxPoint_y_get(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_y_get(_arg0); + _result = (long )wxPoint_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1870,7 +1915,7 @@ static PyObject *_wrap_new_wxPoint(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)new_wxPoint(_arg0,_arg1); + _result = (wxPoint *)new_wxPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1902,7 +1947,7 @@ static PyObject *_wrap_delete_wxPoint(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPoint(_arg0); + delete_wxPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1934,7 +1979,7 @@ static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPoint_Set(_arg0,_arg1,_arg2); + wxPoint_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1967,7 +2012,7 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPoint_asTuple(_arg0); + _result = (PyObject *)wxPoint_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2008,7 +2053,7 @@ static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2048,7 +2093,7 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2088,7 +2133,7 @@ static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPoint___cmp__(_arg0,_arg1); + _result = (int )wxPoint___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2112,7 +2157,7 @@ static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); + _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2144,7 +2189,7 @@ static PyObject *_wrap_delete_wxRect(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRect(_arg0); + delete_wxRect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2172,7 +2217,7 @@ static PyObject *_wrap_wxRect_GetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetX(_arg0); + _result = (int )wxRect_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2199,7 +2244,7 @@ static PyObject *_wrap_wxRect_SetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetX(_arg0,_arg1); + wxRect_SetX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2227,7 +2272,7 @@ static PyObject *_wrap_wxRect_GetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetY(_arg0); + _result = (int )wxRect_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2254,7 +2299,7 @@ static PyObject *_wrap_wxRect_SetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetY(_arg0,_arg1); + wxRect_SetY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2282,7 +2327,7 @@ static PyObject *_wrap_wxRect_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetWidth(_arg0); + _result = (int )wxRect_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2309,7 +2354,7 @@ static PyObject *_wrap_wxRect_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetWidth(_arg0,_arg1); + wxRect_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2337,7 +2382,7 @@ static PyObject *_wrap_wxRect_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetHeight(_arg0); + _result = (int )wxRect_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2364,7 +2409,7 @@ static PyObject *_wrap_wxRect_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetHeight(_arg0,_arg1); + wxRect_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2393,7 +2438,7 @@ static PyObject *_wrap_wxRect_GetPosition(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxRect_GetPosition(_arg0)); + _result = new wxPoint (wxRect_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2422,7 +2467,7 @@ static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxRect_GetSize(_arg0)); + _result = new wxSize (wxRect_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2450,7 +2495,7 @@ static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetLeft(_arg0); + _result = (int )wxRect_GetLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2477,7 +2522,7 @@ static PyObject *_wrap_wxRect_GetTop(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetTop(_arg0); + _result = (int )wxRect_GetTop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2504,7 +2549,7 @@ static PyObject *_wrap_wxRect_GetBottom(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetBottom(_arg0); + _result = (int )wxRect_GetBottom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2531,7 +2576,7 @@ static PyObject *_wrap_wxRect_GetRight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetRight(_arg0); + _result = (int )wxRect_GetRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2558,7 +2603,7 @@ static PyObject *_wrap_wxRect_SetLeft(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetLeft(_arg0,_arg1); + wxRect_SetLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2631,7 @@ static PyObject *_wrap_wxRect_SetRight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetRight(_arg0,_arg1); + wxRect_SetRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2614,7 +2659,7 @@ static PyObject *_wrap_wxRect_SetTop(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetTop(_arg0,_arg1); + wxRect_SetTop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2642,7 +2687,7 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetBottom(_arg0,_arg1); + wxRect_SetBottom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2671,7 +2716,7 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_Inflate(_arg0,_arg1,_arg2); + wxRect_Inflate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2701,7 +2746,7 @@ static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2729,7 +2774,7 @@ static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_set(_arg0,_arg1); + _result = (int )wxRect_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2756,7 +2801,7 @@ static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_get(_arg0); + _result = (int )wxRect_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2784,7 +2829,7 @@ static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_set(_arg0,_arg1); + _result = (int )wxRect_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2811,7 +2856,7 @@ static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_get(_arg0); + _result = (int )wxRect_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2839,7 +2884,7 @@ static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_width_set(_arg0,_arg1); + _result = (int )wxRect_width_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2866,7 +2911,7 @@ static PyObject *_wrap_wxRect_width_get(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_width_get(_arg0); + _result = (int )wxRect_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2894,7 +2939,7 @@ static PyObject *_wrap_wxRect_height_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_height_set(_arg0,_arg1); + _result = (int )wxRect_height_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2921,7 +2966,7 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_height_get(_arg0); + _result = (int )wxRect_height_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2955,7 +3000,7 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxRect_asTuple(_arg0); + _result = (PyObject *)wxRect_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2996,7 +3041,7 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRect___add__(_arg0,_arg1)); + _result = new wxRect (wxRect___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3036,7 +3081,7 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect___cmp__(_arg0,_arg1); + _result = (int )wxRect___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3081,7 +3126,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3110,7 +3155,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Absolute(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); + wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3138,7 +3183,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_AsIs(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_AsIs(_arg0); + wxIndividualLayoutConstraint_AsIs(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3176,7 +3221,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Below(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3204,7 +3249,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Unconstrained(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Unconstrained(_arg0); + wxIndividualLayoutConstraint_Unconstrained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3242,7 +3287,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_LeftOf(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3281,7 +3326,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_PercentOf(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); + wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3319,7 +3364,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_RightOf(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3358,7 +3403,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_SameAs(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); + wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3399,7 +3444,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3428,7 +3473,7 @@ static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); + _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3463,7 +3508,7 @@ static PyObject *_wrap_wxLayoutConstraints_bottom_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3498,7 +3543,7 @@ static PyObject *_wrap_wxLayoutConstraints_centreX_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3533,7 +3578,7 @@ static PyObject *_wrap_wxLayoutConstraints_centreY_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3568,7 +3613,7 @@ static PyObject *_wrap_wxLayoutConstraints_height_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3603,7 +3648,7 @@ static PyObject *_wrap_wxLayoutConstraints_left_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3638,7 +3683,7 @@ static PyObject *_wrap_wxLayoutConstraints_right_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3673,7 +3718,7 @@ static PyObject *_wrap_wxLayoutConstraints_top_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3708,7 +3753,7 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3737,7 +3782,7 @@ static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); + _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3770,7 +3815,7 @@ static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxAcceleratorEntry(_arg0); + delete_wxAcceleratorEntry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3801,7 +3846,7 @@ static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); + wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3830,7 +3875,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetFlags(_arg0); + _result = (int )wxAcceleratorEntry_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3858,7 +3903,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); + _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3886,7 +3931,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetCommand(_arg0); + _result = (int )wxAcceleratorEntry_GetCommand(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3932,7 +3977,7 @@ static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); + _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3968,7 +4013,7 @@ static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxAcceleratorTable(_arg0); + delete_wxAcceleratorTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3998,26 +4043,13 @@ static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxBusyInfo",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); + _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4054,7 +4086,7 @@ static PyObject *_wrap_delete_wxBusyInfo(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBusyInfo(_arg0); + delete_wxBusyInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index fab3942670..24fbfd690f 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -101,12 +101,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - int wxCaret_GetBlinkTime() { return wxCaret::GetBlinkTime(); } @@ -162,7 +156,7 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DoLog"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); // TODO: unicode fix wxPyEndBlockThreads(); if (! found) wxLog::DoLog(level, szString, t); @@ -172,7 +166,7 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); // TODO: unicode fix wxPyEndBlockThreads(); if (! found) wxLog::DoLogString(szString, t); @@ -293,11 +287,11 @@ extern "C" { static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; - char * _arg0; + char * _arg0 = (char *) wxFileSelectorPromptStr; char * _arg1 = (char *) NULL; char * _arg2 = (char *) NULL; char * _arg3 = (char *) NULL; - char * _arg4 = (char *) "*.*"; + char * _arg4 = (char *) wxFileSelectorDefaultWildcardStr; int _arg5 = (int ) 0; wxWindow * _arg6 = (wxWindow *) NULL; int _arg7 = (int ) -1; @@ -306,7 +300,7 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject * char *_kwnames[] = { "message","default_path","default_filename","default_extension","wildcard","flags","parent","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|ssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|sssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) return NULL; if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -317,12 +311,16 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); + _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -351,60 +349,21 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOiii:wxGetTextFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4,&_arg5,&tempbool6)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -416,12 +375,16 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); + _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -458,60 +421,21 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOO:wxGetPasswordFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -522,12 +446,16 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetPasswordFromUser(*_arg0,*_arg1,*_arg2,_arg3)); + _result = new wxString (wxGetPasswordFromUser(*_arg0,*_arg1,*_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -571,40 +499,14 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj3) { @@ -631,12 +533,16 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); + _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -679,40 +585,14 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj3) { @@ -739,7 +619,7 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -776,41 +656,15 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOii:wxMessageBox",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4,&_arg5)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -821,7 +675,7 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -860,58 +714,19 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOl|llOO:wxGetNumberFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argo6,&_obj7)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -928,7 +743,7 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); + _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -958,7 +773,7 @@ static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxColourDisplay(); + _result = (bool )wxColourDisplay(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -976,7 +791,7 @@ static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDisplayDepth(); + _result = (int )wxDisplayDepth(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -994,7 +809,7 @@ static PyObject *_wrap_wxGetDisplayDepth(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetDisplayDepth(); + _result = (int )wxGetDisplayDepth(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1021,7 +836,7 @@ static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDisplaySize(_arg0,_arg1); + wxDisplaySize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1051,7 +866,7 @@ static PyObject *_wrap_wxGetDisplaySize(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGetDisplaySize()); + _result = new wxSize (wxGetDisplaySize()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1079,7 +894,7 @@ static PyObject *_wrap_wxDisplaySizeMM(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDisplaySizeMM(_arg0,_arg1); + wxDisplaySizeMM(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1109,7 +924,7 @@ static PyObject *_wrap_wxGetDisplaySizeMM(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGetDisplaySizeMM()); + _result = new wxSize (wxGetDisplaySizeMM()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1147,7 +962,7 @@ static PyObject *_wrap_wxClientDisplayRect(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClientDisplayRect(_arg0,_arg1,_arg2,_arg3); + wxClientDisplayRect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1187,7 +1002,7 @@ static PyObject *_wrap_wxGetClientDisplayRect(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxGetClientDisplayRect()); + _result = new wxRect (wxGetClientDisplayRect()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1214,7 +1029,7 @@ static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSetCursor(*_arg0); + wxSetCursor(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1236,22 +1051,9 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -1262,7 +1064,7 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); + _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,22 +1089,9 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -1313,7 +1102,7 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); + _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1343,7 +1132,7 @@ static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBeginBusyCursor(_arg0); + wxBeginBusyCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1362,7 +1151,7 @@ static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGetActiveWindow(); + _result = (wxWindow *)wxGetActiveWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1388,7 +1177,7 @@ static PyObject *_wrap_wxGenericFindWindowAtPoint(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGenericFindWindowAtPoint(*_arg0); + _result = (wxWindow *)wxGenericFindWindowAtPoint(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1414,7 +1203,7 @@ static PyObject *_wrap_wxFindWindowAtPoint(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowAtPoint(*_arg0); + _result = (wxWindow *)wxFindWindowAtPoint(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1434,7 +1223,7 @@ static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); + _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1451,7 +1240,7 @@ static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxResourceClear(); + wxResourceClear(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1472,7 +1261,7 @@ static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); + _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1493,7 +1282,7 @@ static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxResourceCreateIcon(_arg0)); + _result = new wxIcon (wxResourceCreateIcon(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1513,7 +1302,7 @@ static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); + _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1532,7 +1321,7 @@ static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxResourceGetIdentifier(_arg0); + _result = (int )wxResourceGetIdentifier(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1560,7 +1349,7 @@ static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseData(_arg0,_arg1); + _result = (bool )wxResourceParseData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1588,7 +1377,7 @@ static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseFile(_arg0,_arg1); + _result = (bool )wxResourceParseFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1616,7 +1405,7 @@ static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseString(_arg0,_arg1); + _result = (bool )wxResourceParseString(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1634,7 +1423,7 @@ static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCaret_GetBlinkTime(); + _result = (int )wxCaret_GetBlinkTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1652,7 +1441,7 @@ static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetBlinkTime(_arg0); + wxCaret_SetBlinkTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1680,7 +1469,7 @@ static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSafeYield(_arg0); + _result = (bool )wxSafeYield(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1715,7 +1504,7 @@ static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostEvent(_arg0,*_arg1); + wxPostEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1733,7 +1522,7 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWakeUpIdle(); + wxWakeUpIdle(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1751,7 +1540,7 @@ static PyObject *_wrap_wxMutexGuiEnter(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMutexGuiEnter(); + wxMutexGuiEnter(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1769,7 +1558,7 @@ static PyObject *_wrap_wxMutexGuiLeave(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMutexGuiLeave(); + wxMutexGuiLeave(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1788,7 +1577,7 @@ static PyObject *_wrap_wxThread_IsMain(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxThread_IsMain(); + _result = (bool )wxThread_IsMain(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1827,7 +1616,7 @@ static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwarg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShowTip(_arg0,_arg1,_arg2); + _result = (bool )wxShowTip(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1848,26 +1637,13 @@ static PyObject *_wrap_wxCreateFileTipProvider(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCreateFileTipProvider",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTipProvider *)wxCreateFileTipProvider(*_arg0,_arg1); + _result = (wxTipProvider *)wxCreateFileTipProvider(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1895,7 +1671,7 @@ static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned long )wxSysErrorCode(); + _result = (unsigned long )wxSysErrorCode(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1905,7 +1681,7 @@ static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject * static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxString * _result; unsigned long _arg0 = (unsigned long ) 0; char *_kwnames[] = { "nErrCode", NULL }; @@ -1914,156 +1690,236 @@ static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxSysErrorMsg(_arg0); + _result = new wxString (wxSysErrorMsg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } static PyObject *_wrap_wxLogFatalError(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogFatalError",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogFatalError",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogFatalError(_arg0); + wxLogFatalError(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogError(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogError",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogError",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogError(_arg0); + wxLogError(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogWarning(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogWarning",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWarning",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogWarning(_arg0); + wxLogWarning(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogMessage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogMessage",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogMessage",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogMessage(_arg0); + wxLogMessage(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogInfo",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogInfo",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogInfo(_arg0); + wxLogInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogVerbose",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogVerbose",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogVerbose(_arg0); + wxLogVerbose(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogStatus(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogStatus",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogStatus",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogStatus(_arg0); + wxLogStatus(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogStatusFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFrame * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "pFrame","szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxLogStatusFrame",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxLogStatusFrame",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2072,33 +1928,52 @@ static PyObject *_wrap_wxLogStatusFrame(PyObject *self, PyObject *args, PyObject return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogStatus(_arg0,_arg1); + wxLogStatus(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } static PyObject *_wrap_wxLogSysError(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogSysError",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogSysError",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogSysError(_arg0); + wxLogSysError(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } @@ -2116,22 +1991,9 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -2142,7 +2004,7 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxExecute(*_arg0,_arg1,_arg2); + _result = (long )wxExecute(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2166,26 +2028,13 @@ static PyObject *_wrap_wxWaveData(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWaveData",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWave *)wxWaveData(*_arg0); + _result = (wxWave *)wxWaveData(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2230,7 +2079,7 @@ static PyObject *_wrap_wxSystemSettings_GetColour(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxSystemSettings::GetColour(_arg0)); + _result = new wxColour (wxSystemSettings::GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2251,7 +2100,7 @@ static PyObject *_wrap_wxSystemSettings_GetFont(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxSystemSettings::GetFont(_arg0)); + _result = new wxFont (wxSystemSettings::GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2271,7 +2120,7 @@ static PyObject *_wrap_wxSystemSettings_GetMetric(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSystemSettings::GetMetric(_arg0); + _result = (int )wxSystemSettings::GetMetric(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2290,7 +2139,7 @@ static PyObject *_wrap_wxSystemSettings_HasFeature(PyObject *self, PyObject *arg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSystemSettings::HasFeature(_arg0); + _result = (bool )wxSystemSettings::HasFeature(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2319,26 +2168,13 @@ static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxToolTip",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolTip *)new_wxToolTip(*_arg0); + _result = (wxToolTip *)new_wxToolTip(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2376,26 +2212,13 @@ static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolTip_SetTip(_arg0,*_arg1); + wxToolTip_SetTip(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2428,12 +2251,16 @@ static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolTip_GetTip(_arg0)); + _result = new wxString (wxToolTip_GetTip(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2461,7 +2288,7 @@ static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxToolTip_GetWindow(_arg0); + _result = (wxWindow *)wxToolTip_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2481,7 +2308,7 @@ static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolTip::Enable(_arg0); + wxToolTip::Enable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2500,7 +2327,7 @@ static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolTip::SetDelay(_arg0); + wxToolTip::SetDelay(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2538,7 +2365,7 @@ static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); + _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2571,7 +2398,7 @@ static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxCaret(_arg0); + delete_wxCaret(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2600,7 +2427,7 @@ static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCaret_IsOk(_arg0); + _result = (bool )wxCaret_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2628,7 +2455,7 @@ static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCaret_IsVisible(_arg0); + _result = (bool )wxCaret_IsVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2665,7 +2492,7 @@ static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); + wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2705,7 +2532,7 @@ static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxCaret_GetPosition(_arg0)); + _result = new wxPoint (wxCaret_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2743,7 +2570,7 @@ static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); + wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2783,7 +2610,7 @@ static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxCaret_GetSize(_arg0)); + _result = new wxSize (wxCaret_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2812,7 +2639,7 @@ static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxCaret_GetWindow(_arg0); + _result = (wxWindow *)wxCaret_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2841,7 +2668,7 @@ static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_MoveXY(_arg0,_arg1,_arg2); + wxCaret_MoveXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2877,7 +2704,7 @@ static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_Move(_arg0,*_arg1); + wxCaret_Move(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2907,7 +2734,7 @@ static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetSizeWH(_arg0,_arg1,_arg2); + wxCaret_SetSizeWH(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2943,7 +2770,7 @@ static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetSize(_arg0,*_arg1); + wxCaret_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2972,7 +2799,7 @@ static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_Show(_arg0,_arg1); + wxCaret_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3000,7 +2827,7 @@ static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_Hide(_arg0); + wxCaret_Hide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3021,7 +2848,7 @@ static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); + _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3054,7 +2881,7 @@ static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyFontEnumerator(_arg0); + delete_wxPyFontEnumerator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3095,7 +2922,7 @@ static PyObject *_wrap_wxFontEnumerator__setCallbackInfo(PyObject *self, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontEnumerator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); + wxFontEnumerator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3128,7 +2955,7 @@ static PyObject *_wrap_wxFontEnumerator_EnumerateFacenames(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); + _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3157,7 +2984,7 @@ static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); + _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3188,7 +3015,7 @@ static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); + _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3221,7 +3048,7 @@ static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); + _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3252,7 +3079,7 @@ static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); + _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3285,7 +3112,7 @@ static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBusyCursor(_arg0); + delete_wxBusyCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3315,7 +3142,7 @@ static PyObject *_wrap_new_wxWindowDisabler(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); + _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3348,7 +3175,7 @@ static PyObject *_wrap_delete_wxWindowDisabler(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxWindowDisabler(_arg0); + delete_wxWindowDisabler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3369,7 +3196,7 @@ static PyObject *_wrap_new_wxMutexGuiLocker(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMutexGuiLocker *)new_wxMutexGuiLocker(); + _result = (wxMutexGuiLocker *)new_wxMutexGuiLocker(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3402,7 +3229,7 @@ static PyObject *_wrap_delete_wxMutexGuiLocker(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxMutexGuiLocker(_arg0); + delete_wxMutexGuiLocker(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3430,7 +3257,7 @@ static PyObject *_wrap_delete_wxTipProvider(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTipProvider(_arg0); + delete_wxTipProvider(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3459,12 +3286,16 @@ static PyObject *_wrap_wxTipProvider_GetTip(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTipProvider_GetTip(_arg0)); + _result = new wxString (wxTipProvider_GetTip(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3492,7 +3323,7 @@ static PyObject *_wrap_wxTipProvider_GetCurrentTip(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTipProvider_GetCurrentTip(_arg0); + _result = (size_t )wxTipProvider_GetCurrentTip(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3521,7 +3352,7 @@ static PyObject *_wrap_new_wxPyTipProvider(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTipProvider *)new_wxPyTipProvider(_arg0); + _result = (wxPyTipProvider *)new_wxPyTipProvider(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3573,7 +3404,7 @@ static PyObject *_wrap_new_wxDragImage(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragImage(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragImage(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3617,7 +3448,7 @@ static PyObject *_wrap_new_wxDragIcon(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragIcon(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragIcon(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3646,22 +3477,9 @@ static PyObject *_wrap_new_wxDragString(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxDragString",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -3672,7 +3490,7 @@ static PyObject *_wrap_new_wxDragString(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragString(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragString(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3720,7 +3538,7 @@ static PyObject *_wrap_new_wxDragTreeItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragTreeItem(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragTreeItem(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3756,7 +3574,7 @@ static PyObject *_wrap_new_wxDragListItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragListItem(*_arg0,_arg1); + _result = (wxGenericDragImage *)new_wxDragListItem(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3789,7 +3607,7 @@ static PyObject *_wrap_delete_wxDragImage(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGenericDragImage(_arg0); + delete_wxGenericDragImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3826,7 +3644,7 @@ static PyObject *_wrap_wxDragImage_SetBackingBitmap(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDragImage_SetBackingBitmap(_arg0,_arg1); + wxDragImage_SetBackingBitmap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3884,7 +3702,7 @@ static PyObject *_wrap_wxDragImage_BeginDrag(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_BeginDrag(_arg0,*_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxDragImage_BeginDrag(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3938,7 +3756,7 @@ static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3966,7 +3784,7 @@ static PyObject *_wrap_wxDragImage_EndDrag(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_EndDrag(_arg0); + _result = (bool )wxDragImage_EndDrag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4002,7 +3820,7 @@ static PyObject *_wrap_wxDragImage_Move(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_Move(_arg0,*_arg1); + _result = (bool )wxDragImage_Move(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4030,7 +3848,7 @@ static PyObject *_wrap_wxDragImage_Show(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_Show(_arg0); + _result = (bool )wxDragImage_Show(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4058,7 +3876,7 @@ static PyObject *_wrap_wxDragImage_Hide(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_Hide(_arg0); + _result = (bool )wxDragImage_Hide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4095,7 +3913,7 @@ static PyObject *_wrap_wxDragImage_GetImageRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxDragImage_GetImageRect(_arg0,*_arg1)); + _result = new wxRect (wxDragImage_GetImageRect(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4146,7 +3964,7 @@ static PyObject *_wrap_wxDragImage_RedrawImage(PyObject *self, PyObject *args, P _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_RedrawImage(_arg0,*_arg1,*_arg2,_arg3,_arg4); + _result = (bool )wxDragImage_RedrawImage(_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4179,7 +3997,7 @@ static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTimer *)new_wxPyTimer(_arg0); + _result = (wxPyTimer *)new_wxPyTimer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4212,7 +4030,7 @@ static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyTimer(_arg0); + delete_wxPyTimer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4241,7 +4059,7 @@ static PyObject *_wrap_wxPyTimer_GetInterval(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyTimer_GetInterval(_arg0); + _result = (int )wxPyTimer_GetInterval(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4269,7 +4087,7 @@ static PyObject *_wrap_wxPyTimer_IsOneShot(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyTimer_IsOneShot(_arg0); + _result = (bool )wxPyTimer_IsOneShot(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4297,7 +4115,7 @@ static PyObject *_wrap_wxPyTimer_IsRunning(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyTimer_IsRunning(_arg0); + _result = (bool )wxPyTimer_IsRunning(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4334,7 +4152,7 @@ static PyObject *_wrap_wxPyTimer_SetOwner(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTimer_SetOwner(_arg0,_arg1,_arg2); + wxPyTimer_SetOwner(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4364,7 +4182,7 @@ static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTimer_Start(_arg0,_arg1,_arg2); + wxPyTimer_Start(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4392,7 +4210,7 @@ static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTimer_Stop(_arg0); + wxPyTimer_Stop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4413,7 +4231,7 @@ static PyObject *_wrap_new_wxStopWatch(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStopWatch *)new_wxStopWatch(); + _result = (wxStopWatch *)new_wxStopWatch(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4446,7 +4264,7 @@ static PyObject *_wrap_delete_wxStopWatch(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxStopWatch(_arg0); + delete_wxStopWatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4475,7 +4293,7 @@ static PyObject *_wrap_wxStopWatch_Start(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStopWatch_Start(_arg0,_arg1); + wxStopWatch_Start(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4503,7 +4321,7 @@ static PyObject *_wrap_wxStopWatch_Pause(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStopWatch_Pause(_arg0); + wxStopWatch_Pause(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4531,7 +4349,7 @@ static PyObject *_wrap_wxStopWatch_Resume(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStopWatch_Resume(_arg0); + wxStopWatch_Resume(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4560,7 +4378,7 @@ static PyObject *_wrap_wxStopWatch_Time(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxStopWatch_Time(_arg0); + _result = (long )wxStopWatch_Time(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4580,7 +4398,7 @@ static PyObject *_wrap_new_wxLog(PyObject *self, PyObject *args, PyObject *kwarg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)new_wxLog(); + _result = (wxLog *)new_wxLog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4604,7 +4422,7 @@ static PyObject *_wrap_wxLog_IsEnabled(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog::IsEnabled(); + _result = (bool )wxLog::IsEnabled(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4625,7 +4443,7 @@ static PyObject *_wrap_wxLog_EnableLogging(PyObject *self, PyObject *args, PyObj _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog::EnableLogging(_arg0); + _result = (bool )wxLog::EnableLogging(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4636,13 +4454,14 @@ static PyObject *_wrap_wxLog_EnableLogging(PyObject *self, PyObject *args, PyObj static PyObject *_wrap_wxLog_OnLog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxLogLevel * _arg0; - char * _arg1; + wxString * _arg1; int _arg2 = (int ) 0; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "level","szString","t", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|i:wxLog_OnLog",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxLog_OnLog",_kwnames,&_argo0,&_obj1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4651,14 +4470,23 @@ static PyObject *_wrap_wxLog_OnLog(PyObject *self, PyObject *args, PyObject *kwa return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::OnLog(*_arg0,_arg1,_arg2); + wxLog::OnLog(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -4681,7 +4509,7 @@ static PyObject *_wrap_wxLog_Flush(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog_Flush(_arg0); + wxLog_Flush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4710,7 +4538,7 @@ static PyObject *_wrap_wxLog_HasPendingMessages(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog_HasPendingMessages(_arg0); + _result = (bool )wxLog_HasPendingMessages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4727,7 +4555,7 @@ static PyObject *_wrap_wxLog_FlushActive(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::FlushActive(); + wxLog::FlushActive(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4747,7 +4575,7 @@ static PyObject *_wrap_wxLog_GetActiveTarget(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLog::GetActiveTarget(); + _result = (wxLog *)wxLog::GetActiveTarget(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4781,7 +4609,7 @@ static PyObject *_wrap_wxLog_SetActiveTarget(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLog::SetActiveTarget(_arg0); + _result = (wxLog *)wxLog::SetActiveTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4804,7 +4632,7 @@ static PyObject *_wrap_wxLog_Suspend(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::Suspend(); + wxLog::Suspend(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4822,7 +4650,7 @@ static PyObject *_wrap_wxLog_Resume(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::Resume(); + wxLog::Resume(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4853,7 +4681,7 @@ static PyObject *_wrap_wxLog_SetVerbose(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog_SetVerbose(_arg0,_arg1); + wxLog_SetVerbose(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4871,7 +4699,7 @@ static PyObject *_wrap_wxLog_DontCreateOnDemand(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::DontCreateOnDemand(); + wxLog::DontCreateOnDemand(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4898,7 +4726,7 @@ static PyObject *_wrap_wxLog_SetTraceMask(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::SetTraceMask(*_arg0); + wxLog::SetTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4917,26 +4745,13 @@ static PyObject *_wrap_wxLog_AddTraceMask(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_AddTraceMask",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::AddTraceMask(*_arg0); + wxLog::AddTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4959,26 +4774,13 @@ static PyObject *_wrap_wxLog_RemoveTraceMask(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_RemoveTraceMask",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::RemoveTraceMask(*_arg0); + wxLog::RemoveTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5000,7 +4802,7 @@ static PyObject *_wrap_wxLog_ClearTraceMasks(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::ClearTraceMasks(); + wxLog::ClearTraceMasks(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5019,7 +4821,7 @@ static PyObject *_wrap_wxLog_SetTimestamp(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::SetTimestamp(_arg0); + wxLog::SetTimestamp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5038,7 +4840,7 @@ static PyObject *_wrap_wxLog_GetTimestamp(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChar *)wxLog::GetTimestamp(); + _result = (wxChar *)wxLog::GetTimestamp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5066,7 +4868,7 @@ static PyObject *_wrap_wxLog_GetVerbose(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog_GetVerbose(_arg0); + _result = (bool )wxLog_GetVerbose(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5085,7 +4887,7 @@ static PyObject *_wrap_wxLog_GetTraceMask(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTraceMask (wxLog::GetTraceMask()); + _result = new wxTraceMask (wxLog::GetTraceMask()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5097,19 +4899,29 @@ static PyObject *_wrap_wxLog_GetTraceMask(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxLog_IsAllowedTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "mask", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLog_IsAllowedTraceMask",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_IsAllowedTraceMask",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog::IsAllowedTraceMask(_arg0); + _result = (bool )wxLog::IsAllowedTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} return _resultobj; } @@ -5137,12 +4949,16 @@ static PyObject *_wrap_wxLog_TimeStamp(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxLog_TimeStamp(_arg0)); + _result = new wxString (wxLog_TimeStamp(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5170,7 +4986,7 @@ static PyObject *_wrap_new_wxLogStderr(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogStderr *)new_wxLogStderr(); + _result = (wxLogStderr *)new_wxLogStderr(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5213,7 +5029,7 @@ static PyObject *_wrap_new_wxLogTextCtrl(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogTextCtrl *)new_wxLogTextCtrl(_arg0); + _result = (wxLogTextCtrl *)new_wxLogTextCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5247,7 +5063,7 @@ static PyObject *_wrap_new_wxLogGui(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogGui *)new_wxLogGui(); + _result = (wxLogGui *)new_wxLogGui(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5274,17 +5090,18 @@ static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject PyObject * _resultobj; wxLogWindow * _result; wxFrame * _arg0; - char * _arg1; + wxString * _arg1; bool _arg2 = (bool ) TRUE; bool _arg3 = (bool ) TRUE; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; int tempbool2 = (int) TRUE; int tempbool3 = (int) TRUE; char *_kwnames[] = { "pParent","szTitle","bShow","bPassToOld", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|ii:new_wxLogWindow",_kwnames,&_argo0,&_arg1,&tempbool2,&tempbool3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|ii:new_wxLogWindow",_kwnames,&_argo0,&_obj1,&tempbool2,&tempbool3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5293,11 +5110,16 @@ static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} _arg2 = (bool ) tempbool2; _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogWindow *)new_wxLogWindow(_arg0,_arg1,_arg2,_arg3); + _result = (wxLogWindow *)new_wxLogWindow(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5308,6 +5130,10 @@ static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -5333,7 +5159,7 @@ static PyObject *_wrap_wxLogWindow_Show(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogWindow_Show(_arg0,_arg1); + wxLogWindow_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5362,7 +5188,7 @@ static PyObject *_wrap_wxLogWindow_GetFrame(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); + _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5391,7 +5217,7 @@ static PyObject *_wrap_wxLogWindow_GetOldLog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLogWindow_GetOldLog(_arg0); + _result = (wxLog *)wxLogWindow_GetOldLog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5425,7 +5251,7 @@ static PyObject *_wrap_wxLogWindow_IsPassingMessages(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLogWindow_IsPassingMessages(_arg0); + _result = (bool )wxLogWindow_IsPassingMessages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5455,7 +5281,7 @@ static PyObject *_wrap_wxLogWindow_PassMessages(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogWindow_PassMessages(_arg0,_arg1); + wxLogWindow_PassMessages(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5476,7 +5302,7 @@ static PyObject *_wrap_new_wxLogNull(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogNull *)new_wxLogNull(); + _result = (wxLogNull *)new_wxLogNull(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5509,7 +5335,7 @@ static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLogNull(_arg0); + delete_wxLogNull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5547,7 +5373,7 @@ static PyObject *_wrap_new_wxLogChain(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogChain *)new_wxLogChain(_arg0); + _result = (wxLogChain *)new_wxLogChain(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5589,7 +5415,7 @@ static PyObject *_wrap_wxLogChain_SetLog(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogChain_SetLog(_arg0,_arg1); + wxLogChain_SetLog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5620,7 +5446,7 @@ static PyObject *_wrap_wxLogChain_PassMessages(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogChain_PassMessages(_arg0,_arg1); + wxLogChain_PassMessages(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5649,7 +5475,7 @@ static PyObject *_wrap_wxLogChain_IsPassingMessages(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLogChain_IsPassingMessages(_arg0); + _result = (bool )wxLogChain_IsPassingMessages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5678,7 +5504,7 @@ static PyObject *_wrap_wxLogChain_GetOldLog(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLogChain_GetOldLog(_arg0); + _result = (wxLog *)wxLogChain_GetOldLog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5712,7 +5538,7 @@ static PyObject *_wrap_new_wxPyLog(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyLog *)new_wxPyLog(); + _result = (wxPyLog *)new_wxPyLog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5755,7 +5581,7 @@ static PyObject *_wrap_wxPyLog__setCallbackInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLog__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyLog__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5783,7 +5609,7 @@ static PyObject *_wrap_wxPyLog_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLog_Destroy(_arg0); + wxPyLog_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5823,7 +5649,7 @@ static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); + _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5857,7 +5683,7 @@ static PyObject *_wrap_wxProcessEvent_GetPid(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_GetPid(_arg0); + _result = (int )wxProcessEvent_GetPid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5885,7 +5711,7 @@ static PyObject *_wrap_wxProcessEvent_GetExitCode(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_GetExitCode(_arg0); + _result = (int )wxProcessEvent_GetExitCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5914,7 +5740,7 @@ static PyObject *_wrap_wxProcessEvent_m_pid_set(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); + _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5942,7 +5768,7 @@ static PyObject *_wrap_wxProcessEvent_m_pid_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_pid_get(_arg0); + _result = (int )wxProcessEvent_m_pid_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5971,7 +5797,7 @@ static PyObject *_wrap_wxProcessEvent_m_exitcode_set(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); + _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5999,7 +5825,7 @@ static PyObject *_wrap_wxProcessEvent_m_exitcode_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_exitcode_get(_arg0); + _result = (int )wxProcessEvent_m_exitcode_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6045,7 +5871,7 @@ static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); + _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6078,7 +5904,7 @@ static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyProcess_Destroy(_arg0); + wxPyProcess_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6116,7 +5942,7 @@ static PyObject *_wrap_wxProcess__setCallbackInfo(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess__setCallbackInfo(_arg0,_arg1,_arg2); + wxProcess__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6146,7 +5972,7 @@ static PyObject *_wrap_wxProcess_base_OnTerminate(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); + wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6174,7 +6000,7 @@ static PyObject *_wrap_wxProcess_Redirect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_Redirect(_arg0); + wxProcess_Redirect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6203,7 +6029,7 @@ static PyObject *_wrap_wxProcess_IsRedirected(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxProcess_IsRedirected(_arg0); + _result = (bool )wxProcess_IsRedirected(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6230,7 +6056,7 @@ static PyObject *_wrap_wxProcess_Detach(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_Detach(_arg0); + wxProcess_Detach(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6259,7 +6085,7 @@ static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); + _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6294,7 +6120,7 @@ static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); + _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6330,7 +6156,7 @@ static PyObject *_wrap_wxProcess_GetOutputStream(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); + _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6363,7 +6189,7 @@ static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_CloseOutput(_arg0); + wxProcess_CloseOutput(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6393,7 +6219,7 @@ static PyObject *_wrap_new_wxJoystick(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxJoystick *)new_wxJoystick(_arg0); + _result = (wxJoystick *)new_wxJoystick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6426,7 +6252,7 @@ static PyObject *_wrap_delete_wxJoystick(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxJoystick(_arg0); + delete_wxJoystick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6456,7 +6282,7 @@ static PyObject *_wrap_wxJoystick_GetPosition(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxJoystick_GetPosition(_arg0)); + _result = new wxPoint (wxJoystick_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6485,7 +6311,7 @@ static PyObject *_wrap_wxJoystick_GetZPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetZPosition(_arg0); + _result = (int )wxJoystick_GetZPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6513,7 +6339,7 @@ static PyObject *_wrap_wxJoystick_GetButtonState(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetButtonState(_arg0); + _result = (int )wxJoystick_GetButtonState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6541,7 +6367,7 @@ static PyObject *_wrap_wxJoystick_GetPOVPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPOVPosition(_arg0); + _result = (int )wxJoystick_GetPOVPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6569,7 +6395,7 @@ static PyObject *_wrap_wxJoystick_GetPOVCTSPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPOVCTSPosition(_arg0); + _result = (int )wxJoystick_GetPOVCTSPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6597,7 +6423,7 @@ static PyObject *_wrap_wxJoystick_GetRudderPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetRudderPosition(_arg0); + _result = (int )wxJoystick_GetRudderPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6625,7 +6451,7 @@ static PyObject *_wrap_wxJoystick_GetUPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetUPosition(_arg0); + _result = (int )wxJoystick_GetUPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6653,7 +6479,7 @@ static PyObject *_wrap_wxJoystick_GetVPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetVPosition(_arg0); + _result = (int )wxJoystick_GetVPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6681,7 +6507,7 @@ static PyObject *_wrap_wxJoystick_GetMovementThreshold(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetMovementThreshold(_arg0); + _result = (int )wxJoystick_GetMovementThreshold(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6709,7 +6535,7 @@ static PyObject *_wrap_wxJoystick_SetMovementThreshold(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystick_SetMovementThreshold(_arg0,_arg1); + wxJoystick_SetMovementThreshold(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6738,7 +6564,7 @@ static PyObject *_wrap_wxJoystick_IsOk(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_IsOk(_arg0); + _result = (bool )wxJoystick_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6766,7 +6592,7 @@ static PyObject *_wrap_wxJoystick_GetNumberJoysticks(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetNumberJoysticks(_arg0); + _result = (int )wxJoystick_GetNumberJoysticks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6794,7 +6620,7 @@ static PyObject *_wrap_wxJoystick_GetManufacturerId(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetManufacturerId(_arg0); + _result = (int )wxJoystick_GetManufacturerId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6822,7 +6648,7 @@ static PyObject *_wrap_wxJoystick_GetProductId(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetProductId(_arg0); + _result = (int )wxJoystick_GetProductId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6850,12 +6676,16 @@ static PyObject *_wrap_wxJoystick_GetProductName(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxJoystick_GetProductName(_arg0)); + _result = new wxString (wxJoystick_GetProductName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6883,7 +6713,7 @@ static PyObject *_wrap_wxJoystick_GetXMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetXMin(_arg0); + _result = (int )wxJoystick_GetXMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6911,7 +6741,7 @@ static PyObject *_wrap_wxJoystick_GetYMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetYMin(_arg0); + _result = (int )wxJoystick_GetYMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6939,7 +6769,7 @@ static PyObject *_wrap_wxJoystick_GetZMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetZMin(_arg0); + _result = (int )wxJoystick_GetZMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6967,7 +6797,7 @@ static PyObject *_wrap_wxJoystick_GetXMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetXMax(_arg0); + _result = (int )wxJoystick_GetXMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6995,7 +6825,7 @@ static PyObject *_wrap_wxJoystick_GetYMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetYMax(_arg0); + _result = (int )wxJoystick_GetYMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7023,7 +6853,7 @@ static PyObject *_wrap_wxJoystick_GetZMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetZMax(_arg0); + _result = (int )wxJoystick_GetZMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7051,7 +6881,7 @@ static PyObject *_wrap_wxJoystick_GetNumberButtons(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetNumberButtons(_arg0); + _result = (int )wxJoystick_GetNumberButtons(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7079,7 +6909,7 @@ static PyObject *_wrap_wxJoystick_GetNumberAxes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetNumberAxes(_arg0); + _result = (int )wxJoystick_GetNumberAxes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7107,7 +6937,7 @@ static PyObject *_wrap_wxJoystick_GetMaxButtons(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetMaxButtons(_arg0); + _result = (int )wxJoystick_GetMaxButtons(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7135,7 +6965,7 @@ static PyObject *_wrap_wxJoystick_GetMaxAxes(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetMaxAxes(_arg0); + _result = (int )wxJoystick_GetMaxAxes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7163,7 +6993,7 @@ static PyObject *_wrap_wxJoystick_GetPollingMin(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPollingMin(_arg0); + _result = (int )wxJoystick_GetPollingMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7191,7 +7021,7 @@ static PyObject *_wrap_wxJoystick_GetPollingMax(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPollingMax(_arg0); + _result = (int )wxJoystick_GetPollingMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7219,7 +7049,7 @@ static PyObject *_wrap_wxJoystick_GetRudderMin(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetRudderMin(_arg0); + _result = (int )wxJoystick_GetRudderMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7247,7 +7077,7 @@ static PyObject *_wrap_wxJoystick_GetRudderMax(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetRudderMax(_arg0); + _result = (int )wxJoystick_GetRudderMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7275,7 +7105,7 @@ static PyObject *_wrap_wxJoystick_GetUMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetUMin(_arg0); + _result = (int )wxJoystick_GetUMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7303,7 +7133,7 @@ static PyObject *_wrap_wxJoystick_GetUMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetUMax(_arg0); + _result = (int )wxJoystick_GetUMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7331,7 +7161,7 @@ static PyObject *_wrap_wxJoystick_GetVMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetVMin(_arg0); + _result = (int )wxJoystick_GetVMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7359,7 +7189,7 @@ static PyObject *_wrap_wxJoystick_GetVMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetVMax(_arg0); + _result = (int )wxJoystick_GetVMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7387,7 +7217,7 @@ static PyObject *_wrap_wxJoystick_HasRudder(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasRudder(_arg0); + _result = (bool )wxJoystick_HasRudder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7415,7 +7245,7 @@ static PyObject *_wrap_wxJoystick_HasZ(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasZ(_arg0); + _result = (bool )wxJoystick_HasZ(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7443,7 +7273,7 @@ static PyObject *_wrap_wxJoystick_HasU(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasU(_arg0); + _result = (bool )wxJoystick_HasU(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7471,7 +7301,7 @@ static PyObject *_wrap_wxJoystick_HasV(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasV(_arg0); + _result = (bool )wxJoystick_HasV(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7499,7 +7329,7 @@ static PyObject *_wrap_wxJoystick_HasPOV(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasPOV(_arg0); + _result = (bool )wxJoystick_HasPOV(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7527,7 +7357,7 @@ static PyObject *_wrap_wxJoystick_HasPOV4Dir(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasPOV4Dir(_arg0); + _result = (bool )wxJoystick_HasPOV4Dir(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7555,7 +7385,7 @@ static PyObject *_wrap_wxJoystick_HasPOVCTS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasPOVCTS(_arg0); + _result = (bool )wxJoystick_HasPOVCTS(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7593,7 +7423,7 @@ static PyObject *_wrap_wxJoystick_SetCapture(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_SetCapture(_arg0,_arg1,_arg2); + _result = (bool )wxJoystick_SetCapture(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7621,7 +7451,7 @@ static PyObject *_wrap_wxJoystick_ReleaseCapture(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_ReleaseCapture(_arg0); + _result = (bool )wxJoystick_ReleaseCapture(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7652,27 +7482,14 @@ static PyObject *_wrap_new_wxWave(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxWave",_kwnames,&_obj0,&tempbool1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWave *)new_wxWave(*_arg0,_arg1); + _result = (wxWave *)new_wxWave(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7709,7 +7526,7 @@ static PyObject *_wrap_delete_wxWave(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxWave(_arg0); + delete_wxWave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7738,7 +7555,7 @@ static PyObject *_wrap_wxWave_IsOk(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWave_IsOk(_arg0); + _result = (bool )wxWave_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7772,7 +7589,7 @@ static PyObject *_wrap_wxWave_Play(PyObject *self, PyObject *args, PyObject *kwa _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWave_Play(_arg0,_arg1,_arg2); + _result = (bool )wxWave_Play(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7796,7 +7613,7 @@ static PyObject *_wrap_new_wxFileTypeInfo(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxFileTypeInfo(_arg0,_arg1,_arg2,_arg3); + _result = (wxFileTypeInfo *)new_wxFileTypeInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7831,15 +7648,20 @@ static PyObject *_wrap_new_wxFileTypeInfoSequence(PyObject *self, PyObject *args int i, len=PySequence_Length(_obj0); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg0->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxFileTypeInfoSequence(*_arg0); + _result = (wxFileTypeInfo *)new_wxFileTypeInfoSequence(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7869,7 +7691,7 @@ static PyObject *_wrap_new_wxNullFileTypeInfo(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxNullFileTypeInfo(); + _result = (wxFileTypeInfo *)new_wxNullFileTypeInfo(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7903,7 +7725,7 @@ static PyObject *_wrap_wxFileTypeInfo_IsValid(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileTypeInfo_IsValid(_arg0); + _result = (bool )wxFileTypeInfo_IsValid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7932,26 +7754,13 @@ static PyObject *_wrap_wxFileTypeInfo_SetIcon(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileTypeInfo_SetIcon(_arg0,*_arg1,_arg2); + wxFileTypeInfo_SetIcon(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7984,26 +7793,13 @@ static PyObject *_wrap_wxFileTypeInfo_SetShortDesc(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileTypeInfo_SetShortDesc(_arg0,*_arg1); + wxFileTypeInfo_SetShortDesc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8036,13 +7832,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetMimeType(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetMimeType(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetMimeType(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8067,13 +7867,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetOpenCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetOpenCommand(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetOpenCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8098,13 +7902,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetPrintCommand(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetPrintCommand(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetPrintCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8129,13 +7937,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetShortDesc(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetShortDesc(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetShortDesc(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8160,13 +7972,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetDescription(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetDescription(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetDescription(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8194,7 +8010,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetExtensions(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileTypeInfo_GetExtensions(_arg0); + _result = (PyObject *)wxFileTypeInfo_GetExtensions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8224,7 +8040,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetExtensionsCount(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileTypeInfo_GetExtensionsCount(_arg0); + _result = (int )wxFileTypeInfo_GetExtensionsCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8252,13 +8068,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetIconFile(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetIconFile(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetIconFile(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8283,7 +8103,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetIconIndex(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileTypeInfo_GetIconIndex(_arg0); + _result = (int )wxFileTypeInfo_GetIconIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8312,7 +8132,7 @@ static PyObject *_wrap_new_wxFileType(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)new_wxFileType(*_arg0); + _result = (wxFileType *)new_wxFileType(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8328,8 +8148,13 @@ static PyObject *_wrap_new_wxFileType(PyObject *self, PyObject *args, PyObject * static PyObject * wxFileType_GetMimeType(wxFileType *self) { wxString str; - if (self->GetMimeType(&str)) - return PyString_FromString(str.c_str()); + if (self->GetMimeType(&str)) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } @@ -8352,7 +8177,7 @@ static PyObject *_wrap_wxFileType_GetMimeType(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetMimeType(_arg0); + _result = (PyObject *)wxFileType_GetMimeType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8388,7 +8213,7 @@ static PyObject *_wrap_wxFileType_GetMimeTypes(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetMimeTypes(_arg0); + _result = (PyObject *)wxFileType_GetMimeTypes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8424,7 +8249,7 @@ static PyObject *_wrap_wxFileType_GetExtensions(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetExtensions(_arg0); + _result = (PyObject *)wxFileType_GetExtensions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8461,7 +8286,7 @@ static PyObject *_wrap_wxFileType_GetIcon(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxFileType_GetIcon(_arg0); + _result = (wxIcon *)wxFileType_GetIcon(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8484,7 +8309,11 @@ static PyObject * wxFileType_GetIconInfo(wxFileType *self) { PyObject* tuple = PyTuple_New(3); PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon), "wxIcon", TRUE)); - PyTuple_SetItem(tuple, 1, PyString_FromString(iconFile.c_str())); +#if wxUSE_UNICODE + PyTuple_SetItem(tuple, 1, PyUnicode_FromUnicode(iconFile.c_str(), iconFile.Len())); +#else + PyTuple_SetItem(tuple, 1, PyString_FromStringAndSize(iconFile.c_str(), iconFile.Len())); +#endif PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex)); wxPyEndBlockThreads(); return tuple; @@ -8511,7 +8340,7 @@ static PyObject *_wrap_wxFileType_GetIconInfo(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetIconInfo(_arg0); + _result = (PyObject *)wxFileType_GetIconInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8523,9 +8352,13 @@ static PyObject *_wrap_wxFileType_GetIconInfo(PyObject *self, PyObject *args, Py static PyObject * wxFileType_GetDescription(wxFileType *self) { wxString str; - if (self->GetDescription(&str)) - return PyString_FromString(str.c_str()); - else + if (self->GetDescription(&str)) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -8547,7 +8380,7 @@ static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetDescription(_arg0); + _result = (PyObject *)wxFileType_GetDescription(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8559,9 +8392,13 @@ static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, static PyObject * wxFileType_GetOpenCommand(wxFileType *self,const wxString & filename,const wxString & mimetype) { wxString str; - if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) - return PyString_FromString(str.c_str()); - else + if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -8586,45 +8423,19 @@ static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetOpenCommand(_arg0,*_arg1,*_arg2); + _result = (PyObject *)wxFileType_GetOpenCommand(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8644,9 +8455,13 @@ static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, static PyObject * wxFileType_GetPrintCommand(wxFileType *self,const wxString & filename,const wxString & mimetype) { wxString str; - if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) - return PyString_FromString(str.c_str()); - else + if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } static PyObject *_wrap_wxFileType_GetPrintCommand(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -8671,45 +8486,19 @@ static PyObject *_wrap_wxFileType_GetPrintCommand(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetPrintCommand(_arg0,*_arg1,*_arg2); + _result = (PyObject *)wxFileType_GetPrintCommand(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8764,45 +8553,19 @@ static PyObject *_wrap_wxFileType_GetAllCommands(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetAllCommands(_arg0,*_arg1,*_arg2); + _result = (PyObject *)wxFileType_GetAllCommands(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8845,45 +8608,19 @@ static PyObject *_wrap_wxFileType_SetCommand(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileType_SetCommand(_arg0,*_arg1,*_arg2,_arg3); + _result = (bool )wxFileType_SetCommand(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8922,26 +8659,13 @@ static PyObject *_wrap_wxFileType_SetDefaultIcon(PyObject *self, PyObject *args, } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileType_SetDefaultIcon(_arg0,*_arg1,_arg2); + _result = (bool )wxFileType_SetDefaultIcon(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8973,7 +8697,7 @@ static PyObject *_wrap_wxFileType_Unassociate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileType_Unassociate(_arg0); + _result = (bool )wxFileType_Unassociate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8994,22 +8718,9 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileType_ExpandCommand",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -9020,12 +8731,16 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileType::ExpandCommand(*_arg0,*_arg1)); + _result = new wxString (wxFileType::ExpandCommand(*_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -9056,7 +8771,7 @@ static PyObject *_wrap_delete_wxFileType(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFileType(_arg0); + delete_wxFileType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9078,44 +8793,18 @@ static PyObject *_wrap_wxMimeTypesManager_IsOfType(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_IsOfType",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager::IsOfType(*_arg0,*_arg1); + _result = (bool )wxMimeTypesManager::IsOfType(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9143,7 +8832,7 @@ static PyObject *_wrap_new_wxMimeTypesManager(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMimeTypesManager *)new_wxMimeTypesManager(); + _result = (wxMimeTypesManager *)new_wxMimeTypesManager(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9179,26 +8868,13 @@ static PyObject *_wrap_wxMimeTypesManager_Initialize(PyObject *self, PyObject *a } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMimeTypesManager_Initialize(_arg0,_arg1,*_arg2); + wxMimeTypesManager_Initialize(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9230,7 +8906,7 @@ static PyObject *_wrap_wxMimeTypesManager_ClearData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMimeTypesManager_ClearData(_arg0); + wxMimeTypesManager_ClearData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9261,26 +8937,13 @@ static PyObject *_wrap_wxMimeTypesManager_GetFileTypeFromExtension(PyObject *sel } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromExtension(_arg0,*_arg1); + _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromExtension(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9320,26 +8983,13 @@ static PyObject *_wrap_wxMimeTypesManager_GetFileTypeFromMimeType(PyObject *self } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromMimeType(_arg0,*_arg1); + _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromMimeType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9380,27 +9030,14 @@ static PyObject *_wrap_wxMimeTypesManager_ReadMailcap(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager_ReadMailcap(_arg0,*_arg1,_arg2); + _result = (bool )wxMimeTypesManager_ReadMailcap(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9433,26 +9070,13 @@ static PyObject *_wrap_wxMimeTypesManager_ReadMimeTypes(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager_ReadMimeTypes(_arg0,*_arg1); + _result = (bool )wxMimeTypesManager_ReadMimeTypes(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9488,7 +9112,7 @@ static PyObject *_wrap_wxMimeTypesManager_EnumAllFileTypes(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxMimeTypesManager_EnumAllFileTypes(_arg0); + _result = (PyObject *)wxMimeTypesManager_EnumAllFileTypes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9526,7 +9150,7 @@ static PyObject *_wrap_wxMimeTypesManager_AddFallback(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMimeTypesManager_AddFallback(_arg0,*_arg1); + wxMimeTypesManager_AddFallback(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9565,7 +9189,7 @@ static PyObject *_wrap_wxMimeTypesManager_Associate(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)wxMimeTypesManager_Associate(_arg0,*_arg1); + _result = (wxFileType *)wxMimeTypesManager_Associate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9608,7 +9232,7 @@ static PyObject *_wrap_wxMimeTypesManager_Unassociate(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager_Unassociate(_arg0,_arg1); + _result = (bool )wxMimeTypesManager_Unassociate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9635,7 +9259,7 @@ static PyObject *_wrap_delete_wxMimeTypesManager(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxMimeTypesManager(_arg0); + delete_wxMimeTypesManager(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9665,7 +9289,7 @@ static PyObject *_wrap_new_wxFileHistory(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileHistory *)new_wxFileHistory(_arg0); + _result = (wxFileHistory *)new_wxFileHistory(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9698,7 +9322,7 @@ static PyObject *_wrap_delete_wxFileHistory(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFileHistory(_arg0); + delete_wxFileHistory(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9727,26 +9351,13 @@ static PyObject *_wrap_wxFileHistory_AddFileToHistory(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_AddFileToHistory(_arg0,*_arg1); + wxFileHistory_AddFileToHistory(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9779,7 +9390,7 @@ static PyObject *_wrap_wxFileHistory_RemoveFileFromHistory(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_RemoveFileFromHistory(_arg0,_arg1); + wxFileHistory_RemoveFileFromHistory(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9808,7 +9419,7 @@ static PyObject *_wrap_wxFileHistory_GetMaxFiles(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileHistory_GetMaxFiles(_arg0); + _result = (int )wxFileHistory_GetMaxFiles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9844,7 +9455,7 @@ static PyObject *_wrap_wxFileHistory_UseMenu(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_UseMenu(_arg0,_arg1); + wxFileHistory_UseMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9881,7 +9492,7 @@ static PyObject *_wrap_wxFileHistory_RemoveMenu(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_RemoveMenu(_arg0,_arg1); + wxFileHistory_RemoveMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9918,7 +9529,7 @@ static PyObject *_wrap_wxFileHistory_Load(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_Load(_arg0,*_arg1); + wxFileHistory_Load(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9955,7 +9566,7 @@ static PyObject *_wrap_wxFileHistory_Save(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_Save(_arg0,*_arg1); + wxFileHistory_Save(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9983,7 +9594,7 @@ static PyObject *_wrap_wxFileHistory_AddFilesToMenu(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_AddFilesToMenu(_arg0); + wxFileHistory_AddFilesToMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10020,7 +9631,7 @@ static PyObject *_wrap_wxFileHistory_AddFilesToSingleMenu(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_AddFilesToSingleMenu(_arg0,_arg1); + wxFileHistory_AddFilesToSingleMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10050,12 +9661,16 @@ static PyObject *_wrap_wxFileHistory_GetHistoryFile(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileHistory_GetHistoryFile(_arg0,_arg1)); + _result = new wxString (wxFileHistory_GetHistoryFile(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10083,7 +9698,7 @@ static PyObject *_wrap_wxFileHistory_GetCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileHistory_GetCount(_arg0); + _result = (int )wxFileHistory_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10111,7 +9726,7 @@ static PyObject *_wrap_wxFileHistory_GetNoHistoryFiles(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileHistory_GetNoHistoryFiles(_arg0); + _result = (int )wxFileHistory_GetNoHistoryFiles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index 8d80987a6b..e7b091c40e 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/printfw.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - // Since this one would be tough and ugly to do with the Macros... @@ -175,7 +169,7 @@ static PyObject *_wrap_new_wxPrintData(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)new_wxPrintData(); + _result = (wxPrintData *)new_wxPrintData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -208,7 +202,7 @@ static PyObject *_wrap_delete_wxPrintData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrintData(_arg0); + delete_wxPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -237,7 +231,7 @@ static PyObject *_wrap_wxPrintData_GetNoCopies(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintData_GetNoCopies(_arg0); + _result = (int )wxPrintData_GetNoCopies(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -265,7 +259,7 @@ static PyObject *_wrap_wxPrintData_GetCollate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintData_GetCollate(_arg0); + _result = (bool )wxPrintData_GetCollate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -293,7 +287,7 @@ static PyObject *_wrap_wxPrintData_GetOrientation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintData_GetOrientation(_arg0); + _result = (int )wxPrintData_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -321,13 +315,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterName(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterName(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -352,7 +350,7 @@ static PyObject *_wrap_wxPrintData_GetColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintData_GetColour(_arg0); + _result = (bool )wxPrintData_GetColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -380,7 +378,7 @@ static PyObject *_wrap_wxPrintData_GetDuplex(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDuplexMode )wxPrintData_GetDuplex(_arg0); + _result = (wxDuplexMode )wxPrintData_GetDuplex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -408,7 +406,7 @@ static PyObject *_wrap_wxPrintData_GetPaperId(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaperSize )wxPrintData_GetPaperId(_arg0); + _result = (wxPaperSize )wxPrintData_GetPaperId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -437,7 +435,7 @@ static PyObject *_wrap_wxPrintData_GetPaperSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxSize & _result_ref = wxPrintData_GetPaperSize(_arg0); + const wxSize & _result_ref = wxPrintData_GetPaperSize(_arg0); _result = (wxSize *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -472,7 +470,7 @@ static PyObject *_wrap_wxPrintData_GetQuality(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintQuality )wxPrintData_GetQuality(_arg0); + _result = (wxPrintQuality )wxPrintData_GetQuality(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -500,7 +498,7 @@ static PyObject *_wrap_wxPrintData_SetNoCopies(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetNoCopies(_arg0,_arg1); + wxPrintData_SetNoCopies(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,7 +529,7 @@ static PyObject *_wrap_wxPrintData_SetCollate(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetCollate(_arg0,_arg1); + wxPrintData_SetCollate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -560,7 +558,7 @@ static PyObject *_wrap_wxPrintData_SetOrientation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetOrientation(_arg0,_arg1); + wxPrintData_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -589,26 +587,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterName(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterName(_arg0,*_arg1); + wxPrintData_SetPrinterName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -643,7 +628,7 @@ static PyObject *_wrap_wxPrintData_SetColour(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetColour(_arg0,_arg1); + wxPrintData_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -672,7 +657,7 @@ static PyObject *_wrap_wxPrintData_SetDuplex(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetDuplex(_arg0,_arg1); + wxPrintData_SetDuplex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -701,7 +686,7 @@ static PyObject *_wrap_wxPrintData_SetPaperId(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPaperId(_arg0,_arg1); + wxPrintData_SetPaperId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -737,7 +722,7 @@ static PyObject *_wrap_wxPrintData_SetPaperSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPaperSize(_arg0,*_arg1); + wxPrintData_SetPaperSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -766,7 +751,7 @@ static PyObject *_wrap_wxPrintData_SetQuality(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetQuality(_arg0,_arg1); + wxPrintData_SetQuality(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -795,13 +780,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterCommand(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -826,13 +815,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterOptions(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterOptions(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterOptions(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -857,13 +850,17 @@ static PyObject *_wrap_wxPrintData_GetPreviewCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPreviewCommand(_arg0); + const wxString & _result_ref = wxPrintData_GetPreviewCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -888,13 +885,17 @@ static PyObject *_wrap_wxPrintData_GetFilename(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetFilename(_arg0); + const wxString & _result_ref = wxPrintData_GetFilename(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -919,13 +920,17 @@ static PyObject *_wrap_wxPrintData_GetFontMetricPath(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetFontMetricPath(_arg0); + const wxString & _result_ref = wxPrintData_GetFontMetricPath(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -950,7 +955,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterScaleX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPrintData_GetPrinterScaleX(_arg0); + _result = (double )wxPrintData_GetPrinterScaleX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -978,7 +983,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterScaleY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPrintData_GetPrinterScaleY(_arg0); + _result = (double )wxPrintData_GetPrinterScaleY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1006,7 +1011,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterTranslateX(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPrintData_GetPrinterTranslateX(_arg0); + _result = (long )wxPrintData_GetPrinterTranslateX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1034,7 +1039,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterTranslateY(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPrintData_GetPrinterTranslateY(_arg0); + _result = (long )wxPrintData_GetPrinterTranslateY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1063,7 +1068,7 @@ static PyObject *_wrap_wxPrintData_GetPrintMode(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPrintMode (wxPrintData_GetPrintMode(_arg0)); + _result = new wxPrintMode (wxPrintData_GetPrintMode(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1092,26 +1097,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterCommand(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterCommand(_arg0,*_arg1); + wxPrintData_SetPrinterCommand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1144,26 +1136,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterOptions(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterOptions(_arg0,*_arg1); + wxPrintData_SetPrinterOptions(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1196,26 +1175,13 @@ static PyObject *_wrap_wxPrintData_SetPreviewCommand(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPreviewCommand(_arg0,*_arg1); + wxPrintData_SetPreviewCommand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1248,26 +1214,13 @@ static PyObject *_wrap_wxPrintData_SetFilename(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetFilename(_arg0,*_arg1); + wxPrintData_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1300,26 +1253,13 @@ static PyObject *_wrap_wxPrintData_SetFontMetricPath(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetFontMetricPath(_arg0,*_arg1); + wxPrintData_SetFontMetricPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1292,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaleX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaleX(_arg0,_arg1); + wxPrintData_SetPrinterScaleX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1381,7 +1321,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaleY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaleY(_arg0,_arg1); + wxPrintData_SetPrinterScaleY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1351,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaling(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaling(_arg0,_arg1,_arg2); + wxPrintData_SetPrinterScaling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1440,7 +1380,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslateX(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslateX(_arg0,_arg1); + wxPrintData_SetPrinterTranslateX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1469,7 +1409,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslateY(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslateY(_arg0,_arg1); + wxPrintData_SetPrinterTranslateY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1499,7 +1439,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslation(_arg0,_arg1,_arg2); + wxPrintData_SetPrinterTranslation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1536,7 +1476,7 @@ static PyObject *_wrap_wxPrintData_SetPrintMode(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrintMode(_arg0,*_arg1); + wxPrintData_SetPrintMode(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1582,7 +1522,7 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); + _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1613,22 +1553,9 @@ static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC2",_kwnames,&_obj0,&tempbool1,&_argo2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } _arg1 = (bool ) tempbool1; if (_argo2) { @@ -1640,7 +1567,7 @@ static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); + _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1679,7 +1606,7 @@ static PyObject *_wrap_wxPostScriptDC_GetPrintData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); + wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); _result = (wxPrintData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1722,7 +1649,7 @@ static PyObject *_wrap_wxPostScriptDC_SetPrintData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostScriptDC_SetPrintData(_arg0,*_arg1); + wxPostScriptDC_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1741,7 +1668,7 @@ static PyObject *_wrap_wxPostScriptDC_SetResolution(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostScriptDC::SetResolution(_arg0); + wxPostScriptDC::SetResolution(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,7 +1687,7 @@ static PyObject *_wrap_wxPostScriptDC_GetResolution(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPostScriptDC::GetResolution(); + _result = (int )wxPostScriptDC::GetResolution(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1788,7 +1715,7 @@ static PyObject *_wrap_new_wxPageSetupDialogData(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialogData *)new_wxPageSetupDialogData(); + _result = (wxPageSetupDialogData *)new_wxPageSetupDialogData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1821,7 +1748,7 @@ static PyObject *_wrap_delete_wxPageSetupDialogData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPageSetupDialogData(_arg0); + delete_wxPageSetupDialogData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1852,7 +1779,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableHelp(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableHelp(_arg0,_arg1); + wxPageSetupDialogData_EnableHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1883,7 +1810,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableMargins(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableMargins(_arg0,_arg1); + wxPageSetupDialogData_EnableMargins(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1914,7 +1841,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableOrientation(PyObject *self, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableOrientation(_arg0,_arg1); + wxPageSetupDialogData_EnableOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1945,7 +1872,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnablePaper(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnablePaper(_arg0,_arg1); + wxPageSetupDialogData_EnablePaper(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1976,7 +1903,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnablePrinter(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnablePrinter(_arg0,_arg1); + wxPageSetupDialogData_EnablePrinter(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2005,7 +1932,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetDefaultMinMargins(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetDefaultMinMargins(_arg0); + _result = (bool )wxPageSetupDialogData_GetDefaultMinMargins(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2033,7 +1960,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableMargins(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableMargins(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableMargins(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2061,7 +1988,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableOrientation(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableOrientation(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2089,7 +2016,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnablePaper(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnablePaper(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnablePaper(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2117,7 +2044,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnablePrinter(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnablePrinter(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnablePrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2145,7 +2072,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableHelp(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableHelp(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2173,7 +2100,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetDefaultInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetDefaultInfo(_arg0); + _result = (bool )wxPageSetupDialogData_GetDefaultInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2202,7 +2129,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMarginTopLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMarginTopLeft(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMarginTopLeft(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2232,7 +2159,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMarginBottomRight(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMarginBottomRight(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMarginBottomRight(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2262,7 +2189,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMinMarginTopLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMinMarginTopLeft(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMinMarginTopLeft(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2292,7 +2219,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMinMarginBottomRight(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMinMarginBottomRight(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMinMarginBottomRight(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2321,7 +2248,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPaperId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaperSize )wxPageSetupDialogData_GetPaperId(_arg0); + _result = (wxPaperSize )wxPageSetupDialogData_GetPaperId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2350,7 +2277,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPaperSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxPageSetupDialogData_GetPaperSize(_arg0)); + _result = new wxSize (wxPageSetupDialogData_GetPaperSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2382,7 +2309,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPrintData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxPageSetupDialogData_GetPrintData(_arg0); + _result = (wxPrintData *)wxPageSetupDialogData_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2418,7 +2345,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetDefaultInfo(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetDefaultInfo(_arg0,_arg1); + wxPageSetupDialogData_SetDefaultInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2449,7 +2376,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetDefaultMinMargins(PyObject *self _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetDefaultMinMargins(_arg0,_arg1); + wxPageSetupDialogData_SetDefaultMinMargins(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2485,7 +2412,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMarginTopLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMarginTopLeft(_arg0,*_arg1); + wxPageSetupDialogData_SetMarginTopLeft(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2521,7 +2448,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMarginBottomRight(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMarginBottomRight(_arg0,*_arg1); + wxPageSetupDialogData_SetMarginBottomRight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2557,7 +2484,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginTopLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMinMarginTopLeft(_arg0,*_arg1); + wxPageSetupDialogData_SetMinMarginTopLeft(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2593,7 +2520,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMinMarginBottomRight(_arg0,*_arg1); + wxPageSetupDialogData_SetMinMarginBottomRight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2622,7 +2549,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPaperId(_arg0,_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2658,7 +2585,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPaperSize(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2695,7 +2622,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPrintData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPrintData(_arg0,*_arg1); + wxPageSetupDialogData_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2774,7 +2701,7 @@ static PyObject *_wrap_new_wxPageSetupDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); + _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2809,7 +2736,7 @@ static PyObject *_wrap_wxPageSetupDialog_GetPageSetupData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); + wxPageSetupDialogData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); _result = (wxPageSetupDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2844,7 +2771,7 @@ static PyObject *_wrap_wxPageSetupDialog_ShowModal(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPageSetupDialog_ShowModal(_arg0); + _result = (int )wxPageSetupDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2872,7 +2799,7 @@ static PyObject *_wrap_new_wxPrintDialogData(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintDialogData *)new_wxPrintDialogData(); + _result = (wxPrintDialogData *)new_wxPrintDialogData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2905,7 +2832,7 @@ static PyObject *_wrap_delete_wxPrintDialogData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrintDialogData(_arg0); + delete_wxPrintDialogData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2936,7 +2863,7 @@ static PyObject *_wrap_wxPrintDialogData_EnableHelp(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnableHelp(_arg0,_arg1); + wxPrintDialogData_EnableHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2967,7 +2894,7 @@ static PyObject *_wrap_wxPrintDialogData_EnablePageNumbers(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnablePageNumbers(_arg0,_arg1); + wxPrintDialogData_EnablePageNumbers(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2998,7 +2925,7 @@ static PyObject *_wrap_wxPrintDialogData_EnablePrintToFile(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnablePrintToFile(_arg0,_arg1); + wxPrintDialogData_EnablePrintToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3029,7 +2956,7 @@ static PyObject *_wrap_wxPrintDialogData_EnableSelection(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnableSelection(_arg0,_arg1); + wxPrintDialogData_EnableSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3058,7 +2985,7 @@ static PyObject *_wrap_wxPrintDialogData_GetAllPages(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetAllPages(_arg0); + _result = (bool )wxPrintDialogData_GetAllPages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3086,7 +3013,7 @@ static PyObject *_wrap_wxPrintDialogData_GetCollate(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetCollate(_arg0); + _result = (bool )wxPrintDialogData_GetCollate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3114,7 +3041,7 @@ static PyObject *_wrap_wxPrintDialogData_GetFromPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetFromPage(_arg0); + _result = (int )wxPrintDialogData_GetFromPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3142,7 +3069,7 @@ static PyObject *_wrap_wxPrintDialogData_GetMaxPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetMaxPage(_arg0); + _result = (int )wxPrintDialogData_GetMaxPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3170,7 +3097,7 @@ static PyObject *_wrap_wxPrintDialogData_GetMinPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetMinPage(_arg0); + _result = (int )wxPrintDialogData_GetMinPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3198,7 +3125,7 @@ static PyObject *_wrap_wxPrintDialogData_GetNoCopies(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetNoCopies(_arg0); + _result = (int )wxPrintDialogData_GetNoCopies(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3229,7 +3156,7 @@ static PyObject *_wrap_wxPrintDialogData_GetPrintData(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxPrintDialogData_GetPrintData(_arg0); + _result = (wxPrintData *)wxPrintDialogData_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3263,7 +3190,7 @@ static PyObject *_wrap_wxPrintDialogData_GetPrintToFile(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetPrintToFile(_arg0); + _result = (bool )wxPrintDialogData_GetPrintToFile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3291,7 +3218,7 @@ static PyObject *_wrap_wxPrintDialogData_GetToPage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetToPage(_arg0); + _result = (int )wxPrintDialogData_GetToPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3321,7 +3248,7 @@ static PyObject *_wrap_wxPrintDialogData_SetCollate(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetCollate(_arg0,_arg1); + wxPrintDialogData_SetCollate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3350,7 +3277,7 @@ static PyObject *_wrap_wxPrintDialogData_SetFromPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetFromPage(_arg0,_arg1); + wxPrintDialogData_SetFromPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3379,7 +3306,7 @@ static PyObject *_wrap_wxPrintDialogData_SetMaxPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetMaxPage(_arg0,_arg1); + wxPrintDialogData_SetMaxPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3408,7 +3335,7 @@ static PyObject *_wrap_wxPrintDialogData_SetMinPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetMinPage(_arg0,_arg1); + wxPrintDialogData_SetMinPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3437,7 +3364,7 @@ static PyObject *_wrap_wxPrintDialogData_SetNoCopies(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetNoCopies(_arg0,_arg1); + wxPrintDialogData_SetNoCopies(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3474,7 +3401,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintData(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetPrintData(_arg0,*_arg1); + wxPrintDialogData_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3505,7 +3432,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintToFile(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetPrintToFile(_arg0,_arg1); + wxPrintDialogData_SetPrintToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3536,7 +3463,7 @@ static PyObject *_wrap_wxPrintDialogData_SetSetupDialog(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetSetupDialog(_arg0,_arg1); + wxPrintDialogData_SetSetupDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3565,7 +3492,7 @@ static PyObject *_wrap_wxPrintDialogData_SetToPage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetToPage(_arg0,_arg1); + wxPrintDialogData_SetToPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3644,7 +3571,7 @@ static PyObject *_wrap_new_wxPrintDialog(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); + _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3679,7 +3606,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDialogData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrintDialog_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrintDialog_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3714,7 +3641,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDC(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); + _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3742,7 +3669,7 @@ static PyObject *_wrap_wxPrintDialog_ShowModal(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialog_ShowModal(_arg0); + _result = (int )wxPrintDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3771,7 +3698,7 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)new_wxPrintout(_arg0); + _result = (wxPyPrintout *)new_wxPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3814,7 +3741,7 @@ static PyObject *_wrap_wxPrintout__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); + wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3842,7 +3769,7 @@ static PyObject *_wrap_wxPrintout_Destroy(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPrintout_Destroy(_arg0); + wxPyPrintout_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3871,7 +3798,7 @@ static PyObject *_wrap_wxPrintout_GetDC(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrintout_GetDC(_arg0); + _result = (wxDC *)wxPrintout_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3908,7 +3835,7 @@ static PyObject *_wrap_wxPrintout_GetPageSizeMM(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPageSizeMM(_arg0,_arg1,_arg2); + wxPrintout_GetPageSizeMM(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3956,7 +3883,7 @@ static PyObject *_wrap_wxPrintout_GetPageSizePixels(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPageSizePixels(_arg0,_arg1,_arg2); + wxPrintout_GetPageSizePixels(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4004,7 +3931,7 @@ static PyObject *_wrap_wxPrintout_GetPPIPrinter(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPPIPrinter(_arg0,_arg1,_arg2); + wxPrintout_GetPPIPrinter(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4052,7 +3979,7 @@ static PyObject *_wrap_wxPrintout_GetPPIScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPPIScreen(_arg0,_arg1,_arg2); + wxPrintout_GetPPIScreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4091,7 +4018,7 @@ static PyObject *_wrap_wxPrintout_IsPreview(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_IsPreview(_arg0); + _result = (bool )wxPrintout_IsPreview(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4121,7 +4048,7 @@ static PyObject *_wrap_wxPrintout_base_OnBeginDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_base_OnBeginDocument(_arg0,_arg1,_arg2); + _result = (bool )wxPrintout_base_OnBeginDocument(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4148,7 +4075,7 @@ static PyObject *_wrap_wxPrintout_base_OnEndDocument(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnEndDocument(_arg0); + wxPrintout_base_OnEndDocument(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4176,7 +4103,7 @@ static PyObject *_wrap_wxPrintout_base_OnBeginPrinting(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnBeginPrinting(_arg0); + wxPrintout_base_OnBeginPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4204,7 +4131,7 @@ static PyObject *_wrap_wxPrintout_base_OnEndPrinting(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnEndPrinting(_arg0); + wxPrintout_base_OnEndPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4232,7 +4159,7 @@ static PyObject *_wrap_wxPrintout_base_OnPreparePrinting(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnPreparePrinting(_arg0); + wxPrintout_base_OnPreparePrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4280,7 +4207,7 @@ static PyObject *_wrap_wxPrintout_base_GetPageInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_GetPageInfo(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPrintout_base_GetPageInfo(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4330,7 +4257,7 @@ static PyObject *_wrap_wxPrintout_base_HasPage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_base_HasPage(_arg0,_arg1); + _result = (bool )wxPrintout_base_HasPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4367,7 +4294,7 @@ static PyObject *_wrap_new_wxPrinter(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrinter *)new_wxPrinter(_arg0); + _result = (wxPrinter *)new_wxPrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4400,7 +4327,7 @@ static PyObject *_wrap_delete_wxPrinter(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrinter(_arg0); + delete_wxPrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4446,7 +4373,7 @@ static PyObject *_wrap_wxPrinter_CreateAbortWindow(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrinter_CreateAbortWindow(_arg0,_arg1,_arg2); + wxPrinter_CreateAbortWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4476,7 +4403,7 @@ static PyObject *_wrap_wxPrinter_GetPrintDialogData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrinter_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrinter_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4530,7 +4457,7 @@ static PyObject *_wrap_wxPrinter_Print(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrinter_Print(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxPrinter_Print(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4567,7 +4494,7 @@ static PyObject *_wrap_wxPrinter_PrintDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); + _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4613,7 +4540,7 @@ static PyObject *_wrap_wxPrinter_ReportError(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrinter_ReportError(_arg0,_arg1,_arg2,_arg3); + wxPrinter_ReportError(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4651,7 +4578,7 @@ static PyObject *_wrap_wxPrinter_Setup(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrinter_Setup(_arg0,_arg1); + _result = (bool )wxPrinter_Setup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4706,7 +4633,7 @@ static PyObject *_wrap_new_wxPrintPreview(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintPreview *)new_wxPrintPreview(_arg0,_arg1,_arg2); + _result = (wxPrintPreview *)new_wxPrintPreview(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4740,7 +4667,7 @@ static PyObject *_wrap_wxPrintPreview_GetCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); + _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4768,7 +4695,7 @@ static PyObject *_wrap_wxPrintPreview_GetCurrentPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetCurrentPage(_arg0); + _result = (int )wxPrintPreview_GetCurrentPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4796,7 +4723,7 @@ static PyObject *_wrap_wxPrintPreview_GetFrame(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); + _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4824,7 +4751,7 @@ static PyObject *_wrap_wxPrintPreview_GetMaxPage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetMaxPage(_arg0); + _result = (int )wxPrintPreview_GetMaxPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4852,7 +4779,7 @@ static PyObject *_wrap_wxPrintPreview_GetMinPage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetMinPage(_arg0); + _result = (int )wxPrintPreview_GetMinPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4881,7 +4808,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintDialogData(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrintPreview_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrintPreview_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4916,7 +4843,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintout(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); + _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4944,7 +4871,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintoutForPrinting(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); + _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4972,7 +4899,7 @@ static PyObject *_wrap_wxPrintPreview_GetZoom(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetZoom(_arg0); + _result = (int )wxPrintPreview_GetZoom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5000,7 +4927,7 @@ static PyObject *_wrap_wxPrintPreview_Ok(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintPreview_Ok(_arg0); + _result = (bool )wxPrintPreview_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5031,7 +4958,7 @@ static PyObject *_wrap_wxPrintPreview_Print(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintPreview_Print(_arg0,_arg1); + _result = (bool )wxPrintPreview_Print(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5067,7 +4994,7 @@ static PyObject *_wrap_wxPrintPreview_SetCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetCanvas(_arg0,_arg1); + wxPrintPreview_SetCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5096,7 +5023,7 @@ static PyObject *_wrap_wxPrintPreview_SetCurrentPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetCurrentPage(_arg0,_arg1); + wxPrintPreview_SetCurrentPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5133,7 +5060,7 @@ static PyObject *_wrap_wxPrintPreview_SetFrame(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetFrame(_arg0,_arg1); + wxPrintPreview_SetFrame(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5170,7 +5097,7 @@ static PyObject *_wrap_wxPrintPreview_SetPrintout(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetPrintout(_arg0,_arg1); + wxPrintPreview_SetPrintout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5199,7 +5126,7 @@ static PyObject *_wrap_wxPrintPreview_SetZoom(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetZoom(_arg0,_arg1); + wxPrintPreview_SetZoom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5287,22 +5214,9 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -5318,7 +5232,7 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPreviewFrame *)new_wxPreviewFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxPreviewFrame *)new_wxPreviewFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5355,7 +5269,7 @@ static PyObject *_wrap_wxPreviewFrame_Initialize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPreviewFrame_Initialize(_arg0); + wxPreviewFrame_Initialize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/sizers.cpp b/wxPython/src/gtk/sizers.cpp index 4fdb322555..95e66e5394 100644 --- a/wxPython/src/gtk/sizers.cpp +++ b/wxPython/src/gtk/sizers.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPySizer : public wxSizer { DECLARE_DYNAMIC_CLASS(wxPySizer); public: @@ -137,7 +131,7 @@ static PyObject *_wrap_wxSizerItem_DeleteWindows(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_DeleteWindows(_arg0); + wxSizerItem_DeleteWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -167,7 +161,7 @@ static PyObject *_wrap_wxSizerItem_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); + _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -197,7 +191,7 @@ static PyObject *_wrap_wxSizerItem_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizerItem_GetSize(_arg0)); + _result = new wxSize (wxSizerItem_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -227,7 +221,7 @@ static PyObject *_wrap_wxSizerItem_CalcMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizerItem_CalcMin(_arg0)); + _result = new wxSize (wxSizerItem_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -271,7 +265,7 @@ static PyObject *_wrap_wxSizerItem_SetDimension(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetDimension(_arg0,*_arg1,*_arg2); + wxSizerItem_SetDimension(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -301,7 +295,7 @@ static PyObject *_wrap_wxSizerItem_SetRatioWH(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetRatioWH(_arg0,_arg1,_arg2); + wxSizerItem_SetRatioWH(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -337,7 +331,7 @@ static PyObject *_wrap_wxSizerItem_SetRatioSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetRatioSize(_arg0,*_arg1); + wxSizerItem_SetRatioSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -366,7 +360,7 @@ static PyObject *_wrap_wxSizerItem_SetRatio(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetRatio(_arg0,_arg1); + wxSizerItem_SetRatio(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -395,7 +389,7 @@ static PyObject *_wrap_wxSizerItem_GetRatio(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (float )wxSizerItem_GetRatio(_arg0); + _result = (float )wxSizerItem_GetRatio(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -423,7 +417,7 @@ static PyObject *_wrap_wxSizerItem_IsWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizerItem_IsWindow(_arg0); + _result = (bool )wxSizerItem_IsWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -451,7 +445,7 @@ static PyObject *_wrap_wxSizerItem_IsSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizerItem_IsSizer(_arg0); + _result = (bool )wxSizerItem_IsSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,7 +473,7 @@ static PyObject *_wrap_wxSizerItem_IsSpacer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizerItem_IsSpacer(_arg0); + _result = (bool )wxSizerItem_IsSpacer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -507,7 +501,7 @@ static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); + _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -543,7 +537,7 @@ static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetWindow(_arg0,_arg1); + wxSizerItem_SetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -572,7 +566,7 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); + _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -608,7 +602,7 @@ static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetSizer(_arg0,_arg1); + wxSizerItem_SetSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -637,7 +631,7 @@ static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetOption(_arg0); + _result = (int )wxSizerItem_GetOption(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -665,7 +659,7 @@ static PyObject *_wrap_wxSizerItem_GetFlag(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetFlag(_arg0); + _result = (int )wxSizerItem_GetFlag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -693,7 +687,7 @@ static PyObject *_wrap_wxSizerItem_GetBorder(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetBorder(_arg0); + _result = (int )wxSizerItem_GetBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -722,7 +716,7 @@ static PyObject *_wrap_wxSizerItem_SetInitSize(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetInitSize(_arg0,_arg1,_arg2); + wxSizerItem_SetInitSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -751,7 +745,7 @@ static PyObject *_wrap_wxSizerItem_SetOption(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetOption(_arg0,_arg1); + wxSizerItem_SetOption(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -780,7 +774,7 @@ static PyObject *_wrap_wxSizerItem_SetFlag(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetFlag(_arg0,_arg1); + wxSizerItem_SetFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -809,7 +803,7 @@ static PyObject *_wrap_wxSizerItem_SetBorder(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetBorder(_arg0,_arg1); + wxSizerItem_SetBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -847,7 +841,7 @@ static PyObject *_wrap_wxSizerItem_GetUserData(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSizerItem_GetUserData(_arg0); + _result = (PyObject *)wxSizerItem_GetUserData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -891,7 +885,7 @@ static PyObject *_wrap_wxSizer__setOORInfo(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer__setOORInfo(_arg0,_arg1); + wxSizer__setOORInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -919,7 +913,7 @@ static PyObject *_wrap_wxSizer_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Destroy(_arg0); + wxSizer_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -969,7 +963,7 @@ static PyObject *_wrap_wxSizer_AddWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_AddWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_AddWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1019,7 +1013,7 @@ static PyObject *_wrap_wxSizer_AddSizer(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_AddSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_AddSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1062,7 +1056,7 @@ static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_AddSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_AddSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1113,7 +1107,7 @@ static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_InsertWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_InsertWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1164,7 +1158,7 @@ static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_InsertSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_InsertSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1208,7 +1202,7 @@ static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_InsertSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxSizer_InsertSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1258,7 +1252,7 @@ static PyObject *_wrap_wxSizer_PrependWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_PrependWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_PrependWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1308,7 +1302,7 @@ static PyObject *_wrap_wxSizer_PrependSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_PrependSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_PrependSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1351,7 +1345,7 @@ static PyObject *_wrap_wxSizer_PrependSpacer(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_PrependSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_PrependSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1389,7 +1383,7 @@ static PyObject *_wrap_wxSizer_RemoveWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizer_RemoveWindow(_arg0,_arg1); + _result = (bool )wxSizer_RemoveWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1426,7 +1420,7 @@ static PyObject *_wrap_wxSizer_RemoveSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizer_RemoveSizer(_arg0,_arg1); + _result = (bool )wxSizer_RemoveSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1455,7 +1449,7 @@ static PyObject *_wrap_wxSizer_RemovePos(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizer_RemovePos(_arg0,_arg1); + _result = (bool )wxSizer_RemovePos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1486,7 +1480,7 @@ static PyObject *_wrap_wxSizer_SetDimension(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetDimension(_arg0,_arg1,_arg2,_arg3,_arg4); + wxSizer_SetDimension(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1522,7 +1516,7 @@ static PyObject *_wrap_wxSizer_SetMinSize(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetMinSize(_arg0,*_arg1); + wxSizer_SetMinSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1561,7 +1555,7 @@ static PyObject *_wrap_wxSizer_SetItemMinSizeWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); + wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1600,7 +1594,7 @@ static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); + wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1631,7 +1625,7 @@ static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); + wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1661,7 +1655,7 @@ static PyObject *_wrap_wxSizer_GetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizer_GetSize(_arg0)); + _result = new wxSize (wxSizer_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1691,7 +1685,7 @@ static PyObject *_wrap_wxSizer_GetPosition(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxSizer_GetPosition(_arg0)); + _result = new wxPoint (wxSizer_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1721,7 +1715,7 @@ static PyObject *_wrap_wxSizer_GetMinSize(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizer_GetMinSize(_arg0)); + _result = new wxSize (wxSizer_GetMinSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1749,7 +1743,7 @@ static PyObject *_wrap_wxSizer_Layout(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Layout(_arg0); + wxSizer_Layout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1786,7 +1780,7 @@ static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Fit(_arg0,_arg1); + wxSizer_Fit(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1823,7 +1817,7 @@ static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetSizeHints(_arg0,_arg1); + wxSizer_SetSizeHints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1854,7 +1848,7 @@ static PyObject *_wrap_wxSizer_Clear(PyObject *self, PyObject *args, PyObject *k _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Clear(_arg0,_arg1); + wxSizer_Clear(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1882,7 +1876,7 @@ static PyObject *_wrap_wxSizer_DeleteWindows(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_DeleteWindows(_arg0); + wxSizer_DeleteWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1914,7 +1908,7 @@ static PyObject *_wrap_wxSizer_GetChildren(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSizer_GetChildren(_arg0); + _result = (PyObject *)wxSizer_GetChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1952,7 +1946,7 @@ static PyObject *_wrap_new_wxPySizer(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPySizer *)new_wxPySizer(); + _result = (wxPySizer *)new_wxPySizer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1995,7 +1989,7 @@ static PyObject *_wrap_wxPySizer__setCallbackInfo(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPySizer__setCallbackInfo(_arg0,_arg1,_arg2); + wxPySizer__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2033,7 +2027,7 @@ static PyObject *_wrap_new_wxBoxSizer(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBoxSizer *)new_wxBoxSizer(_arg0); + _result = (wxBoxSizer *)new_wxBoxSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2067,7 +2061,7 @@ static PyObject *_wrap_wxBoxSizer_GetOrientation(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBoxSizer_GetOrientation(_arg0); + _result = (int )wxBoxSizer_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2094,7 +2088,7 @@ static PyObject *_wrap_wxBoxSizer_RecalcSizes(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBoxSizer_RecalcSizes(_arg0); + wxBoxSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2124,7 +2118,7 @@ static PyObject *_wrap_wxBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxBoxSizer_CalcMin(_arg0)); + _result = new wxSize (wxBoxSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2179,7 +2173,7 @@ static PyObject *_wrap_new_wxStaticBoxSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBoxSizer *)new_wxStaticBoxSizer(_arg0,_arg1); + _result = (wxStaticBoxSizer *)new_wxStaticBoxSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2213,7 +2207,7 @@ static PyObject *_wrap_wxStaticBoxSizer_GetStaticBox(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)wxStaticBoxSizer_GetStaticBox(_arg0); + _result = (wxStaticBox *)wxStaticBoxSizer_GetStaticBox(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2240,7 +2234,7 @@ static PyObject *_wrap_wxStaticBoxSizer_RecalcSizes(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBoxSizer_RecalcSizes(_arg0); + wxStaticBoxSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2270,7 +2264,7 @@ static PyObject *_wrap_wxStaticBoxSizer_CalcMin(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxStaticBoxSizer_CalcMin(_arg0)); + _result = new wxSize (wxStaticBoxSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2316,7 +2310,7 @@ static PyObject *_wrap_new_wxNotebookSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebookSizer *)new_wxNotebookSizer(_arg0); + _result = (wxNotebookSizer *)new_wxNotebookSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2349,7 +2343,7 @@ static PyObject *_wrap_wxNotebookSizer_RecalcSizes(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookSizer_RecalcSizes(_arg0); + wxNotebookSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2379,7 +2373,7 @@ static PyObject *_wrap_wxNotebookSizer_CalcMin(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxNotebookSizer_CalcMin(_arg0)); + _result = new wxSize (wxNotebookSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2408,7 +2402,7 @@ static PyObject *_wrap_wxNotebookSizer_GetNotebook(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); + _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2448,7 +2442,7 @@ static PyObject *_wrap_new_wxGridSizer(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridSizer *)new_wxGridSizer(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridSizer *)new_wxGridSizer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2481,7 +2475,7 @@ static PyObject *_wrap_wxGridSizer_RecalcSizes(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_RecalcSizes(_arg0); + wxGridSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2511,7 +2505,7 @@ static PyObject *_wrap_wxGridSizer_CalcMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGridSizer_CalcMin(_arg0)); + _result = new wxSize (wxGridSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2540,7 +2534,7 @@ static PyObject *_wrap_wxGridSizer_SetCols(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetCols(_arg0,_arg1); + wxGridSizer_SetCols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2569,7 +2563,7 @@ static PyObject *_wrap_wxGridSizer_SetRows(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetRows(_arg0,_arg1); + wxGridSizer_SetRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2598,7 +2592,7 @@ static PyObject *_wrap_wxGridSizer_SetVGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetVGap(_arg0,_arg1); + wxGridSizer_SetVGap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2627,7 +2621,7 @@ static PyObject *_wrap_wxGridSizer_SetHGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetHGap(_arg0,_arg1); + wxGridSizer_SetHGap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2656,7 +2650,7 @@ static PyObject *_wrap_wxGridSizer_GetCols(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetCols(_arg0); + _result = (int )wxGridSizer_GetCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2684,7 +2678,7 @@ static PyObject *_wrap_wxGridSizer_GetRows(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetRows(_arg0); + _result = (int )wxGridSizer_GetRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2712,7 +2706,7 @@ static PyObject *_wrap_wxGridSizer_GetVGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetVGap(_arg0); + _result = (int )wxGridSizer_GetVGap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2740,7 +2734,7 @@ static PyObject *_wrap_wxGridSizer_GetHGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetHGap(_arg0); + _result = (int )wxGridSizer_GetHGap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2788,7 +2782,7 @@ static PyObject *_wrap_new_wxFlexGridSizer(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFlexGridSizer *)new_wxFlexGridSizer(_arg0,_arg1,_arg2,_arg3); + _result = (wxFlexGridSizer *)new_wxFlexGridSizer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2821,7 +2815,7 @@ static PyObject *_wrap_wxFlexGridSizer_RecalcSizes(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_RecalcSizes(_arg0); + wxFlexGridSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2851,7 +2845,7 @@ static PyObject *_wrap_wxFlexGridSizer_CalcMin(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxFlexGridSizer_CalcMin(_arg0)); + _result = new wxSize (wxFlexGridSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2880,7 +2874,7 @@ static PyObject *_wrap_wxFlexGridSizer_AddGrowableRow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); + wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +2903,7 @@ static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableRow(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_RemoveGrowableRow(_arg0,_arg1); + wxFlexGridSizer_RemoveGrowableRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2938,7 +2932,7 @@ static PyObject *_wrap_wxFlexGridSizer_AddGrowableCol(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); + wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2967,7 +2961,7 @@ static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableCol(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_RemoveGrowableCol(_arg0,_arg1); + wxFlexGridSizer_RemoveGrowableCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index 980d797c28..ccd50404fa 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -142,7 +136,7 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)new_wxStatusBar(_arg0,_arg1,_arg2,_arg3); + _result = (wxStatusBar *)new_wxStatusBar(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -168,7 +162,7 @@ static PyObject *_wrap_new_wxPreStatusBar(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)new_wxPreStatusBar(); + _result = (wxStatusBar *)new_wxPreStatusBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -214,7 +208,7 @@ static PyObject *_wrap_wxStatusBar_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStatusBar_Create(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxStatusBar_Create(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -248,7 +242,7 @@ static PyObject *_wrap_wxStatusBar_GetFieldRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)wxStatusBar_GetFieldRect(_arg0,_arg1); + _result = (wxRect *)wxStatusBar_GetFieldRect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -282,7 +276,7 @@ static PyObject *_wrap_wxStatusBar_GetFieldsCount(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStatusBar_GetFieldsCount(_arg0); + _result = (int )wxStatusBar_GetFieldsCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -311,12 +305,16 @@ static PyObject *_wrap_wxStatusBar_GetStatusText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStatusBar_GetStatusText(_arg0,_arg1)); + _result = new wxString (wxStatusBar_GetStatusText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -344,7 +342,7 @@ static PyObject *_wrap_wxStatusBar_GetBorderX(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStatusBar_GetBorderX(_arg0); + _result = (int )wxStatusBar_GetBorderX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -372,7 +370,7 @@ static PyObject *_wrap_wxStatusBar_GetBorderY(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStatusBar_GetBorderY(_arg0); + _result = (int )wxStatusBar_GetBorderY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -400,7 +398,7 @@ static PyObject *_wrap_wxStatusBar_SetFieldsCount(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetFieldsCount(_arg0,_arg1); + wxStatusBar_SetFieldsCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -430,26 +428,13 @@ static PyObject *_wrap_wxStatusBar_SetStatusText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetStatusText(_arg0,*_arg1,_arg2); + wxStatusBar_SetStatusText(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -499,7 +484,7 @@ static PyObject *_wrap_wxStatusBar_SetStatusWidths(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetStatusWidths(_arg0,_arg1,_arg2); + wxStatusBar_SetStatusWidths(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,7 +516,7 @@ static PyObject *_wrap_wxStatusBar_SetMinHeight(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetMinHeight(_arg0,_arg1); + wxStatusBar_SetMinHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -567,7 +552,7 @@ static PyObject *_wrap_wxToolBarToolBase_Destroy(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Destroy(_arg0); + wxToolBarToolBase_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -596,7 +581,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetId(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_GetId(_arg0); + _result = (int )wxToolBarToolBase_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -624,7 +609,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetControl(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)wxToolBarToolBase_GetControl(_arg0); + _result = (wxControl *)wxToolBarToolBase_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -652,7 +637,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetToolBar(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarBase *)wxToolBarToolBase_GetToolBar(_arg0); + _result = (wxToolBarBase *)wxToolBarToolBase_GetToolBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -680,7 +665,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsButton(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_IsButton(_arg0); + _result = (int )wxToolBarToolBase_IsButton(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -708,7 +693,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_IsControl(_arg0); + _result = (int )wxToolBarToolBase_IsControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -736,7 +721,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsSeparator(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_IsSeparator(_arg0); + _result = (int )wxToolBarToolBase_IsSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -764,7 +749,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_GetStyle(_arg0); + _result = (int )wxToolBarToolBase_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -792,7 +777,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsEnabled(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_IsEnabled(_arg0); + _result = (bool )wxToolBarToolBase_IsEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -820,7 +805,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsToggled(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_IsToggled(_arg0); + _result = (bool )wxToolBarToolBase_IsToggled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -848,7 +833,7 @@ static PyObject *_wrap_wxToolBarToolBase_CanBeToggled(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_CanBeToggled(_arg0); + _result = (bool )wxToolBarToolBase_CanBeToggled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -877,7 +862,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetNormalBitmap(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxBitmap & _result_ref = wxToolBarToolBase_GetNormalBitmap(_arg0); + const wxBitmap & _result_ref = wxToolBarToolBase_GetNormalBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -913,7 +898,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetDisabledBitmap(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxBitmap & _result_ref = wxToolBarToolBase_GetDisabledBitmap(_arg0); + const wxBitmap & _result_ref = wxToolBarToolBase_GetDisabledBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -949,7 +934,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxToolBarToolBase_GetBitmap(_arg0)); + _result = new wxBitmap (wxToolBarToolBase_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -978,12 +963,16 @@ static PyObject *_wrap_wxToolBarToolBase_GetLabel(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarToolBase_GetLabel(_arg0)); + _result = new wxString (wxToolBarToolBase_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1011,12 +1000,16 @@ static PyObject *_wrap_wxToolBarToolBase_GetShortHelp(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarToolBase_GetShortHelp(_arg0)); + _result = new wxString (wxToolBarToolBase_GetShortHelp(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1044,12 +1037,16 @@ static PyObject *_wrap_wxToolBarToolBase_GetLongHelp(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarToolBase_GetLongHelp(_arg0)); + _result = new wxString (wxToolBarToolBase_GetLongHelp(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1080,7 +1077,7 @@ static PyObject *_wrap_wxToolBarToolBase_Enable(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_Enable(_arg0,_arg1); + _result = (bool )wxToolBarToolBase_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1107,7 +1104,7 @@ static PyObject *_wrap_wxToolBarToolBase_Toggle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Toggle(_arg0); + wxToolBarToolBase_Toggle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1139,7 +1136,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetToggle(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_SetToggle(_arg0,_arg1); + _result = (bool )wxToolBarToolBase_SetToggle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1168,26 +1165,13 @@ static PyObject *_wrap_wxToolBarToolBase_SetShortHelp(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_SetShortHelp(_arg0,*_arg1); + _result = (bool )wxToolBarToolBase_SetShortHelp(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1220,26 +1204,13 @@ static PyObject *_wrap_wxToolBarToolBase_SetLongHelp(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_SetLongHelp(_arg0,*_arg1); + _result = (bool )wxToolBarToolBase_SetLongHelp(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1279,7 +1250,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetNormalBitmap(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetNormalBitmap(_arg0,*_arg1); + wxToolBarToolBase_SetNormalBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1316,7 +1287,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetDisabledBitmap(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetDisabledBitmap(_arg0,*_arg1); + wxToolBarToolBase_SetDisabledBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1345,26 +1316,13 @@ static PyObject *_wrap_wxToolBarToolBase_SetLabel(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetLabel(_arg0,*_arg1); + wxToolBarToolBase_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1396,7 +1354,7 @@ static PyObject *_wrap_wxToolBarToolBase_Detach(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Detach(_arg0); + wxToolBarToolBase_Detach(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1433,7 +1391,7 @@ static PyObject *_wrap_wxToolBarToolBase_Attach(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Attach(_arg0,_arg1); + wxToolBarToolBase_Attach(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1471,7 +1429,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxToolBarToolBase_GetClientData(_arg0); + _result = (PyObject *)wxToolBarToolBase_GetClientData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1507,7 +1465,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetClientData(_arg0,_arg1); + wxToolBarToolBase_SetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1604,45 +1562,19 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO } if (_obj6) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg6 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); -#endif } if (_obj7) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg7 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) return NULL; - } - _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddTool(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,*_arg6,*_arg7); + _result = (wxToolBarToolBase *)wxToolBarBase_AddTool(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1696,45 +1628,19 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg4 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) return NULL; - } - _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddSimpleTool(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5); + _result = (wxToolBarToolBase *)wxToolBarBase_AddSimpleTool(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1807,45 +1713,19 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, } if (_obj7) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg7 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) return NULL; - } - _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); -#endif } if (_obj8) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg8 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj8)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) return NULL; - } - _arg8 = new wxString(PyString_AS_STRING(_obj8), PyString_GET_SIZE(_obj8)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,*_arg7,*_arg8); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1900,45 +1780,19 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * } if (_obj4) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg4 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) return NULL; - } - _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); -#endif } if (_obj5) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj5) && !PyUnicode_Check(_obj5)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj5, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg5 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj5)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) return NULL; - } - _arg5 = new wxString(PyString_AS_STRING(_obj5), PyString_GET_SIZE(_obj5)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertSimpleTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertSimpleTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1983,7 +1837,7 @@ static PyObject *_wrap_wxToolBarBase_AddControl(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddControl(_arg0,_arg1); + _result = (wxToolBarToolBase *)wxToolBarBase_AddControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2021,7 +1875,7 @@ static PyObject *_wrap_wxToolBarBase_InsertControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertControl(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertControl(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2049,7 +1903,7 @@ static PyObject *_wrap_wxToolBarBase_AddSeparator(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddSeparator(_arg0); + _result = (wxToolBarToolBase *)wxToolBarBase_AddSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2078,7 +1932,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSeparator(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertSeparator(_arg0,_arg1); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertSeparator(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2107,7 +1961,7 @@ static PyObject *_wrap_wxToolBarBase_RemoveTool(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_RemoveTool(_arg0,_arg1); + _result = (wxToolBarToolBase *)wxToolBarBase_RemoveTool(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2136,7 +1990,7 @@ static PyObject *_wrap_wxToolBarBase_DeleteToolByPos(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_DeleteToolByPos(_arg0,_arg1); + _result = (bool )wxToolBarBase_DeleteToolByPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2165,7 +2019,7 @@ static PyObject *_wrap_wxToolBarBase_DeleteTool(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_DeleteTool(_arg0,_arg1); + _result = (bool )wxToolBarBase_DeleteTool(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2192,7 +2046,7 @@ static PyObject *_wrap_wxToolBarBase_ClearTools(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_ClearTools(_arg0); + wxToolBarBase_ClearTools(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2221,7 +2075,7 @@ static PyObject *_wrap_wxToolBarBase_Realize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_Realize(_arg0); + _result = (bool )wxToolBarBase_Realize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2252,7 +2106,7 @@ static PyObject *_wrap_wxToolBarBase_EnableTool(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_EnableTool(_arg0,_arg1,_arg2); + wxToolBarBase_EnableTool(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2284,7 +2138,7 @@ static PyObject *_wrap_wxToolBarBase_ToggleTool(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_ToggleTool(_arg0,_arg1,_arg2); + wxToolBarBase_ToggleTool(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2316,7 +2170,7 @@ static PyObject *_wrap_wxToolBarBase_SetToggle(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToggle(_arg0,_arg1,_arg2); + wxToolBarBase_SetToggle(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +2209,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxToolBarBase_GetToolClientData(_arg0,_arg1); + _result = (PyObject *)wxToolBarBase_GetToolClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2392,7 +2246,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolClientData(_arg0,_arg1,_arg2); + wxToolBarBase_SetToolClientData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2422,7 +2276,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolState(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_GetToolState(_arg0,_arg1); + _result = (bool )wxToolBarBase_GetToolState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2451,7 +2305,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolEnabled(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_GetToolEnabled(_arg0,_arg1); + _result = (bool )wxToolBarBase_GetToolEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2480,26 +2334,13 @@ static PyObject *_wrap_wxToolBarBase_SetToolShortHelp(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolShortHelp(_arg0,_arg1,*_arg2); + wxToolBarBase_SetToolShortHelp(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2533,12 +2374,16 @@ static PyObject *_wrap_wxToolBarBase_GetToolShortHelp(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarBase_GetToolShortHelp(_arg0,_arg1)); + _result = new wxString (wxToolBarBase_GetToolShortHelp(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2567,26 +2412,13 @@ static PyObject *_wrap_wxToolBarBase_SetToolLongHelp(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolLongHelp(_arg0,_arg1,*_arg2); + wxToolBarBase_SetToolLongHelp(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2620,12 +2452,16 @@ static PyObject *_wrap_wxToolBarBase_GetToolLongHelp(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarBase_GetToolLongHelp(_arg0,_arg1)); + _result = new wxString (wxToolBarBase_GetToolLongHelp(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2654,7 +2490,7 @@ static PyObject *_wrap_wxToolBarBase_SetMarginsXY(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetMarginsXY(_arg0,_arg1,_arg2); + wxToolBarBase_SetMarginsXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2690,7 +2526,7 @@ static PyObject *_wrap_wxToolBarBase_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetMargins(_arg0,*_arg1); + wxToolBarBase_SetMargins(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2719,7 +2555,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolPacking(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolPacking(_arg0,_arg1); + wxToolBarBase_SetToolPacking(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2748,7 +2584,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolSeparation(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolSeparation(_arg0,_arg1); + wxToolBarBase_SetToolSeparation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2778,7 +2614,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolMargins(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetToolMargins(_arg0)); + _result = new wxSize (wxToolBarBase_GetToolMargins(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2808,7 +2644,7 @@ static PyObject *_wrap_wxToolBarBase_GetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetMargins(_arg0)); + _result = new wxSize (wxToolBarBase_GetMargins(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2837,7 +2673,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolPacking(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetToolPacking(_arg0); + _result = (int )wxToolBarBase_GetToolPacking(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2865,7 +2701,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolSeparation(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetToolSeparation(_arg0); + _result = (int )wxToolBarBase_GetToolSeparation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2893,7 +2729,7 @@ static PyObject *_wrap_wxToolBarBase_SetRows(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetRows(_arg0,_arg1); + wxToolBarBase_SetRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2923,7 +2759,7 @@ static PyObject *_wrap_wxToolBarBase_SetMaxRowsCols(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetMaxRowsCols(_arg0,_arg1,_arg2); + wxToolBarBase_SetMaxRowsCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2952,7 +2788,7 @@ static PyObject *_wrap_wxToolBarBase_GetMaxRows(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetMaxRows(_arg0); + _result = (int )wxToolBarBase_GetMaxRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2980,7 +2816,7 @@ static PyObject *_wrap_wxToolBarBase_GetMaxCols(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetMaxCols(_arg0); + _result = (int )wxToolBarBase_GetMaxCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3015,7 +2851,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolBitmapSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolBitmapSize(_arg0,*_arg1); + wxToolBarBase_SetToolBitmapSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3045,7 +2881,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolBitmapSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetToolBitmapSize(_arg0)); + _result = new wxSize (wxToolBarBase_GetToolBitmapSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3075,7 +2911,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetToolSize(_arg0)); + _result = new wxSize (wxToolBarBase_GetToolSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3106,7 +2942,7 @@ static PyObject *_wrap_wxToolBarBase_FindToolForPosition(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_FindToolForPosition(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBarBase_FindToolForPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3134,7 +2970,7 @@ static PyObject *_wrap_wxToolBarBase_IsVertical(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_IsVertical(_arg0); + _result = (bool )wxToolBarBase_IsVertical(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3224,7 +3060,7 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)new_wxToolBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxToolBar *)new_wxToolBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3250,7 +3086,7 @@ static PyObject *_wrap_new_wxPreToolBar(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)new_wxPreToolBar(); + _result = (wxToolBar *)new_wxPreToolBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3314,7 +3150,7 @@ static PyObject *_wrap_wxToolBar_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxToolBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3344,7 +3180,7 @@ static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBar_FindToolForPosition(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBar_FindToolForPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3434,7 +3270,7 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarSimple *)new_wxToolBarSimple(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxToolBarSimple *)new_wxToolBarSimple(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3460,7 +3296,7 @@ static PyObject *_wrap_new_wxPreToolBarSimple(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarSimple *)new_wxPreToolBarSimple(); + _result = (wxToolBarSimple *)new_wxPreToolBarSimple(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3524,7 +3360,7 @@ static PyObject *_wrap_wxToolBarSimple_Create(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarSimple_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxToolBarSimple_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3554,7 +3390,7 @@ static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarSimple_FindToolForPosition(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBarSimple_FindToolForPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/streams.cpp b/wxPython/src/gtk/streams.cpp index 2822bd02f3..572ae04e3c 100644 --- a/wxPython/src/gtk/streams.cpp +++ b/wxPython/src/gtk/streams.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -119,7 +113,7 @@ static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); + _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -152,7 +146,7 @@ static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInputStream_close(_arg0); + wxInputStream_close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -180,7 +174,7 @@ static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInputStream_flush(_arg0); + wxInputStream_flush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -209,7 +203,7 @@ static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxInputStream_eof(_arg0); + _result = (bool )wxInputStream_eof(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -238,12 +232,16 @@ static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxInputStream_read(_arg0,_arg1); + _result = (wxString *)wxInputStream_read(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -269,12 +267,16 @@ static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxInputStream_readline(_arg0,_arg1); + _result = (wxString *)wxInputStream_readline(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -300,7 +302,7 @@ static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); + _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -310,7 +312,11 @@ static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, P wxStringPtrList::Node *node = _result->GetFirst(); for (int i=0; node; i++) { wxString *s = node->GetData(); +#if wxUSE_UNICODE + PyList_SetItem(_resultobj, i, PyUnicode_FromUnicode(s->c_str(), s->Len())); +#else PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len())); +#endif node = node->GetNext(); delete s; } @@ -343,7 +349,7 @@ static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInputStream_seek(_arg0,_arg1,_arg2); + wxInputStream_seek(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -372,7 +378,7 @@ static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxInputStream_tell(_arg0); + _result = (int )wxInputStream_tell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -402,26 +408,13 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxOutputStream_write(_arg0,*_arg1); + wxOutputStream_write(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index 12a881d889..ad534862e2 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/utils.cpp @@ -87,17 +87,15 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { PyObject* ret = PyTuple_New(3); if (ret) { PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); - PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); +#if wxUSE_UNICODE + PyTuple_SET_ITEM(ret, 1, PyUnicode_FromUnicode(str.c_str(), str.Len())); +#else + PyTuple_SET_ITEM(ret, 1, PyString_FromStringAndSize(str.c_str(), str.Len())); +#endif PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); } return ret; @@ -117,7 +115,7 @@ static PyObject *_wrap_wxGetLocalTime(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetLocalTime(); + _result = (long )wxGetLocalTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -135,7 +133,7 @@ static PyObject *_wrap_wxGetUTCTime(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetUTCTime(); + _result = (long )wxGetUTCTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -153,7 +151,7 @@ static PyObject *_wrap_wxGetCurrentTime(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetCurrentTime(); + _result = (long )wxGetCurrentTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -171,7 +169,7 @@ static PyObject *_wrap_wxGetLocalTimeMillis(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxLongLong (wxGetLocalTimeMillis()); + _result = new wxLongLong (wxGetLocalTimeMillis()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -209,7 +207,7 @@ static PyObject *_wrap_delete_wxConfigBase(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxConfigBase(_arg0); + delete_wxConfigBase(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -238,7 +236,7 @@ static PyObject *_wrap_wxConfigBase_Set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase *)wxConfigBase::Set(_arg0); + _result = (wxConfigBase *)wxConfigBase::Set(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -266,7 +264,7 @@ static PyObject *_wrap_wxConfigBase_Get(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase *)wxConfigBase::Get(_arg0); + _result = (wxConfigBase *)wxConfigBase::Get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -291,7 +289,7 @@ static PyObject *_wrap_wxConfigBase_Create(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase *)wxConfigBase::Create(); + _result = (wxConfigBase *)wxConfigBase::Create(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -314,7 +312,7 @@ static PyObject *_wrap_wxConfigBase_DontCreateOnDemand(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase::DontCreateOnDemand(); + wxConfigBase::DontCreateOnDemand(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -343,7 +341,7 @@ static PyObject *_wrap_wxConfigBase_DeleteAll(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_DeleteAll(_arg0); + _result = (bool )wxConfigBase_DeleteAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -374,27 +372,14 @@ static PyObject *_wrap_wxConfigBase_DeleteEntry(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_DeleteEntry(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_DeleteEntry(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -427,26 +412,13 @@ static PyObject *_wrap_wxConfigBase_DeleteGroup(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_DeleteGroup(_arg0,*_arg1); + _result = (bool )wxConfigBase_DeleteGroup(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,26 +451,13 @@ static PyObject *_wrap_wxConfigBase_Exists(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_Exists(_arg0,*_arg1); + _result = (bool )wxConfigBase_Exists(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -533,7 +492,7 @@ static PyObject *_wrap_wxConfigBase_Flush(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_Flush(_arg0,_arg1); + _result = (bool )wxConfigBase_Flush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -561,12 +520,16 @@ static PyObject *_wrap_wxConfigBase_GetAppName(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_GetAppName(_arg0)); + _result = new wxString (wxConfigBase_GetAppName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -601,7 +564,7 @@ static PyObject *_wrap_wxConfigBase_GetFirstGroup(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetFirstGroup(_arg0); + _result = (PyObject *)wxConfigBase_GetFirstGroup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -638,7 +601,7 @@ static PyObject *_wrap_wxConfigBase_GetFirstEntry(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetFirstEntry(_arg0); + _result = (PyObject *)wxConfigBase_GetFirstEntry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -675,7 +638,7 @@ static PyObject *_wrap_wxConfigBase_GetNextGroup(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetNextGroup(_arg0,_arg1); + _result = (PyObject *)wxConfigBase_GetNextGroup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -712,7 +675,7 @@ static PyObject *_wrap_wxConfigBase_GetNextEntry(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetNextEntry(_arg0,_arg1); + _result = (PyObject *)wxConfigBase_GetNextEntry(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -745,7 +708,7 @@ static PyObject *_wrap_wxConfigBase_GetNumberOfEntries(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxConfigBase_GetNumberOfEntries(_arg0,_arg1); + _result = (int )wxConfigBase_GetNumberOfEntries(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -776,7 +739,7 @@ static PyObject *_wrap_wxConfigBase_GetNumberOfGroups(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxConfigBase_GetNumberOfGroups(_arg0,_arg1); + _result = (int )wxConfigBase_GetNumberOfGroups(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -804,12 +767,16 @@ static PyObject *_wrap_wxConfigBase_GetPath(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_GetPath(_arg0)); + _result = new wxString (wxConfigBase_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -837,12 +804,16 @@ static PyObject *_wrap_wxConfigBase_GetVendorName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_GetVendorName(_arg0)); + _result = new wxString (wxConfigBase_GetVendorName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -871,26 +842,13 @@ static PyObject *_wrap_wxConfigBase_HasEntry(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_HasEntry(_arg0,*_arg1); + _result = (bool )wxConfigBase_HasEntry(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -923,26 +881,13 @@ static PyObject *_wrap_wxConfigBase_HasGroup(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_HasGroup(_arg0,*_arg1); + _result = (bool )wxConfigBase_HasGroup(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -974,7 +919,7 @@ static PyObject *_wrap_wxConfigBase_IsExpandingEnvVars(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_IsExpandingEnvVars(_arg0); + _result = (bool )wxConfigBase_IsExpandingEnvVars(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1002,7 +947,7 @@ static PyObject *_wrap_wxConfigBase_IsRecordingDefaults(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_IsRecordingDefaults(_arg0); + _result = (bool )wxConfigBase_IsRecordingDefaults(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1033,50 +978,28 @@ static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_Read(_arg0,*_arg1,*_arg2)); + _result = new wxString (wxConfigBase_Read(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1118,26 +1041,13 @@ static PyObject *_wrap_wxConfigBase_ReadInt(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxConfigBase_ReadInt(_arg0,*_arg1,_arg2); + _result = (long )wxConfigBase_ReadInt(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1175,26 +1085,13 @@ static PyObject *_wrap_wxConfigBase_ReadFloat(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxConfigBase_ReadFloat(_arg0,*_arg1,_arg2); + _result = (double )wxConfigBase_ReadFloat(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1233,27 +1130,14 @@ static PyObject *_wrap_wxConfigBase_ReadBool(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_ReadBool(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_ReadBool(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,7 +1171,7 @@ static PyObject *_wrap_wxConfigBase_SetExpandEnvVars(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetExpandEnvVars(_arg0,_arg1); + wxConfigBase_SetExpandEnvVars(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1316,26 +1200,13 @@ static PyObject *_wrap_wxConfigBase_SetPath(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetPath(_arg0,*_arg1); + wxConfigBase_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1241,7 @@ static PyObject *_wrap_wxConfigBase_SetRecordDefaults(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetRecordDefaults(_arg0,_arg1); + wxConfigBase_SetRecordDefaults(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1399,26 +1270,13 @@ static PyObject *_wrap_wxConfigBase_SetAppName(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetAppName(_arg0,*_arg1); + wxConfigBase_SetAppName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1451,26 +1309,13 @@ static PyObject *_wrap_wxConfigBase_SetVendorName(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetVendorName(_arg0,*_arg1); + wxConfigBase_SetVendorName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1503,7 +1348,7 @@ static PyObject *_wrap_wxConfigBase_SetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetStyle(_arg0,_arg1); + wxConfigBase_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1532,7 +1377,7 @@ static PyObject *_wrap_wxConfigBase_GetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxConfigBase_GetStyle(_arg0); + _result = (long )wxConfigBase_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1563,44 +1408,18 @@ static PyObject *_wrap_wxConfigBase_Write(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_Write(_arg0,*_arg1,*_arg2); + _result = (bool )wxConfigBase_Write(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1638,26 +1457,13 @@ static PyObject *_wrap_wxConfigBase_WriteInt(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_WriteInt(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_WriteInt(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1691,26 +1497,13 @@ static PyObject *_wrap_wxConfigBase_WriteFloat(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_WriteFloat(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_WriteFloat(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,27 +1538,14 @@ static PyObject *_wrap_wxConfigBase_WriteBool(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_WriteBool(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_WriteBool(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1798,26 +1578,13 @@ static PyObject *_wrap_wxConfigBase_GetEntryType(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase::EntryType )wxConfigBase_GetEntryType(_arg0,*_arg1); + _result = (wxConfigBase::EntryType )wxConfigBase_GetEntryType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1852,44 +1619,18 @@ static PyObject *_wrap_wxConfigBase_RenameEntry(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_RenameEntry(_arg0,*_arg1,*_arg2); + _result = (bool )wxConfigBase_RenameEntry(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1928,44 +1669,18 @@ static PyObject *_wrap_wxConfigBase_RenameGroup(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_RenameGroup(_arg0,*_arg1,*_arg2); + _result = (bool )wxConfigBase_RenameGroup(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2002,31 +1717,22 @@ static PyObject *_wrap_wxConfigBase_ExpandEnvVars(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_ExpandEnvVars(_arg0,*_arg1)); + _result = new wxString (wxConfigBase_ExpandEnvVars(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -2067,83 +1773,31 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kw return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2192,7 +1846,7 @@ static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxConfig(_arg0); + delete_wxConfig(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2230,83 +1884,31 @@ static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileConfig *)new_wxFileConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + _result = (wxFileConfig *)new_wxFileConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +1957,7 @@ static PyObject *_wrap_delete_wxFileConfig(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFileConfig(_arg0); + delete_wxFileConfig(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2374,7 +1976,7 @@ static PyObject *_wrap_wxDateTime_SetCountry(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime::SetCountry(_arg0); + wxDateTime::SetCountry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2393,7 +1995,7 @@ static PyObject *_wrap_wxDateTime_GetCountry(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::Country )wxDateTime::GetCountry(); + _result = (wxDateTime::Country )wxDateTime::GetCountry(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2412,7 +2014,7 @@ static PyObject *_wrap_wxDateTime_IsWestEuropeanCountry(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime::IsWestEuropeanCountry(_arg0); + _result = (bool )wxDateTime::IsWestEuropeanCountry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2431,7 +2033,7 @@ static PyObject *_wrap_wxDateTime_GetCurrentYear(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime::GetCurrentYear(_arg0); + _result = (int )wxDateTime::GetCurrentYear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2450,7 +2052,7 @@ static PyObject *_wrap_wxDateTime_ConvertYearToBC(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime::ConvertYearToBC(_arg0); + _result = (int )wxDateTime::ConvertYearToBC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2469,7 +2071,7 @@ static PyObject *_wrap_wxDateTime_GetCurrentMonth(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::Month )wxDateTime::GetCurrentMonth(_arg0); + _result = (wxDateTime::Month )wxDateTime::GetCurrentMonth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2489,7 +2091,7 @@ static PyObject *_wrap_wxDateTime_IsLeapYear(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime::IsLeapYear(_arg0,_arg1); + _result = (bool )wxDateTime::IsLeapYear(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2508,7 +2110,7 @@ static PyObject *_wrap_wxDateTime_GetCentury(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime::GetCentury(_arg0); + _result = (int )wxDateTime::GetCentury(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2528,7 +2130,7 @@ static PyObject *_wrap_wxDateTime_GetNumberOfDaysinYear(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2549,7 +2151,7 @@ static PyObject *_wrap_wxDateTime_GetNumberOfDaysInMonth(PyObject *self, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1,_arg2); + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2569,12 +2171,16 @@ static PyObject *_wrap_wxDateTime_GetMonthName(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime::GetMonthName(_arg0,_arg1)); + _result = new wxString (wxDateTime::GetMonthName(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2594,12 +2200,16 @@ static PyObject *_wrap_wxDateTime_GetWeekDayName(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime::GetWeekDayName(_arg0,_arg1)); + _result = new wxString (wxDateTime::GetWeekDayName(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2619,44 +2229,18 @@ static PyObject *_wrap_wxDateTime_GetAmPmStrings(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_GetAmPmStrings",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime::GetAmPmStrings(_arg0,_arg1); + wxDateTime::GetAmPmStrings(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2685,7 +2269,7 @@ static PyObject *_wrap_wxDateTime_IsDSTApplicable(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime::IsDSTApplicable(_arg0,_arg1); + _result = (bool )wxDateTime::IsDSTApplicable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2706,7 +2290,7 @@ static PyObject *_wrap_wxDateTime_GetBeginDST(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::GetBeginDST(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime::GetBeginDST(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2728,7 +2312,7 @@ static PyObject *_wrap_wxDateTime_GetEndDST(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::GetEndDST(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime::GetEndDST(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2748,7 +2332,7 @@ static PyObject *_wrap_wxDateTime_Now(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::Now()); + _result = new wxDateTime (wxDateTime::Now()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2768,7 +2352,7 @@ static PyObject *_wrap_wxDateTime_Today(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::Today()); + _result = new wxDateTime (wxDateTime::Today()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2789,7 +2373,7 @@ static PyObject *_wrap_new_wxDateTime(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTime(); + _result = (wxDateTime *)new_wxDateTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2816,7 +2400,7 @@ static PyObject *_wrap_new_wxDateTimeFromTimeT(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); + _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2843,7 +2427,7 @@ static PyObject *_wrap_new_wxDateTimeFromJDN(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromJDN(_arg0); + _result = (wxDateTime *)new_wxDateTimeFromJDN(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2873,7 +2457,7 @@ static PyObject *_wrap_new_wxDateTimeFromHMS(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromHMS(_arg0,_arg1,_arg2,_arg3); + _result = (wxDateTime *)new_wxDateTimeFromHMS(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2906,7 +2490,7 @@ static PyObject *_wrap_new_wxDateTimeFromDMY(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromDMY(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxDateTime *)new_wxDateTimeFromDMY(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2939,7 +2523,7 @@ static PyObject *_wrap_delete_wxDateTime(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDateTime(_arg0); + delete_wxDateTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2969,7 +2553,7 @@ static PyObject *_wrap_wxDateTime_SetToCurrent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToCurrent(_arg0); + wxDateTime & _result_ref = wxDateTime_SetToCurrent(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3006,7 +2590,7 @@ static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3043,7 +2627,7 @@ static PyObject *_wrap_wxDateTime_SetJDN(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetJDN(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetJDN(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3083,7 +2667,7 @@ static PyObject *_wrap_wxDateTime_SetHMS(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetHMS(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDateTime & _result_ref = wxDateTime_SetHMS(_arg0,_arg1,_arg2,_arg3,_arg4); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3126,7 +2710,7 @@ static PyObject *_wrap_wxDateTime_Set(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxDateTime & _result_ref = wxDateTime_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3162,7 +2746,7 @@ static PyObject *_wrap_wxDateTime_ResetTime(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_ResetTime(_arg0); + wxDateTime & _result_ref = wxDateTime_ResetTime(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3199,7 +2783,7 @@ static PyObject *_wrap_wxDateTime_SetYear(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetYear(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetYear(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3236,7 +2820,7 @@ static PyObject *_wrap_wxDateTime_SetMonth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetMonth(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetMonth(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3273,7 +2857,7 @@ static PyObject *_wrap_wxDateTime_SetDay(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3310,7 +2894,7 @@ static PyObject *_wrap_wxDateTime_SetHour(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetHour(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetHour(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3347,7 +2931,7 @@ static PyObject *_wrap_wxDateTime_SetMinute(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetMinute(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetMinute(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3384,7 +2968,7 @@ static PyObject *_wrap_wxDateTime_SetSecond(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetSecond(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetSecond(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3421,7 +3005,7 @@ static PyObject *_wrap_wxDateTime_SetMillisecond(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetMillisecond(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetMillisecond(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3458,7 +3042,7 @@ static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3495,7 +3079,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3526,7 +3110,7 @@ static PyObject *_wrap_wxDateTime_SetToNextWeekDay(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToNextWeekDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToNextWeekDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3563,7 +3147,7 @@ static PyObject *_wrap_wxDateTime_GetNextWeekDay(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetNextWeekDay(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetNextWeekDay(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3594,7 +3178,7 @@ static PyObject *_wrap_wxDateTime_SetToPrevWeekDay(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToPrevWeekDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToPrevWeekDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3631,7 +3215,7 @@ static PyObject *_wrap_wxDateTime_GetPrevWeekDay(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetPrevWeekDay(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetPrevWeekDay(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3664,7 +3248,7 @@ static PyObject *_wrap_wxDateTime_SetToWeekDay(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxDateTime_SetToWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3695,7 +3279,7 @@ static PyObject *_wrap_wxDateTime_SetToLastWeekDay(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToLastWeekDay(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxDateTime_SetToLastWeekDay(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3727,7 +3311,7 @@ static PyObject *_wrap_wxDateTime_GetLastWeekDay(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetLastWeekDay(_arg0,_arg1,_arg2,_arg3)); + _result = new wxDateTime (wxDateTime_GetLastWeekDay(_arg0,_arg1,_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3758,7 +3342,7 @@ static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); + _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3789,7 +3373,7 @@ static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3821,7 +3405,7 @@ static PyObject *_wrap_wxDateTime_SetToLastMonthDay(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToLastMonthDay(_arg0,_arg1,_arg2); + wxDateTime & _result_ref = wxDateTime_SetToLastMonthDay(_arg0,_arg1,_arg2); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3859,7 +3443,7 @@ static PyObject *_wrap_wxDateTime_GetLastMonthDay(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetLastMonthDay(_arg0,_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_GetLastMonthDay(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3890,7 +3474,7 @@ static PyObject *_wrap_wxDateTime_SetToYearDay(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToYearDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToYearDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3927,7 +3511,7 @@ static PyObject *_wrap_wxDateTime_GetYearDay(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetYearDay(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetYearDay(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3956,7 +3540,7 @@ static PyObject *_wrap_wxDateTime_GetJulianDayNumber(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetJulianDayNumber(_arg0); + _result = (double )wxDateTime_GetJulianDayNumber(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3984,7 +3568,7 @@ static PyObject *_wrap_wxDateTime_GetJDN(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetJDN(_arg0); + _result = (double )wxDateTime_GetJDN(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4012,7 +3596,7 @@ static PyObject *_wrap_wxDateTime_GetModifiedJulianDayNumber(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetModifiedJulianDayNumber(_arg0); + _result = (double )wxDateTime_GetModifiedJulianDayNumber(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4040,7 +3624,7 @@ static PyObject *_wrap_wxDateTime_GetMJD(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetMJD(_arg0); + _result = (double )wxDateTime_GetMJD(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4068,7 +3652,7 @@ static PyObject *_wrap_wxDateTime_GetRataDie(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetRataDie(_arg0); + _result = (double )wxDateTime_GetRataDie(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4105,7 +3689,7 @@ static PyObject *_wrap_wxDateTime_ToTimezone(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_ToTimezone(_arg0,*_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_ToTimezone(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4146,7 +3730,7 @@ static PyObject *_wrap_wxDateTime_MakeTimezone(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_MakeTimezone(_arg0,*_arg1,_arg2); + wxDateTime & _result_ref = wxDateTime_MakeTimezone(_arg0,*_arg1,_arg2); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4188,7 +3772,7 @@ static PyObject *_wrap_wxDateTime_ToGMT(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_ToGMT(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_ToGMT(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4221,7 +3805,7 @@ static PyObject *_wrap_wxDateTime_MakeGMT(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_MakeGMT(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_MakeGMT(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4257,7 +3841,7 @@ static PyObject *_wrap_wxDateTime_IsDST(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime_IsDST(_arg0,_arg1); + _result = (int )wxDateTime_IsDST(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4285,7 +3869,7 @@ static PyObject *_wrap_wxDateTime_IsValid(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsValid(_arg0); + _result = (bool )wxDateTime_IsValid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4313,7 +3897,7 @@ static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (time_t )wxDateTime_GetTicks(_arg0); + _result = (time_t )wxDateTime_GetTicks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4347,7 +3931,7 @@ static PyObject *_wrap_wxDateTime_GetYear(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime_GetYear(_arg0,*_arg1); + _result = (int )wxDateTime_GetYear(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4384,7 +3968,7 @@ static PyObject *_wrap_wxDateTime_GetMonth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::Month )wxDateTime_GetMonth(_arg0,*_arg1); + _result = (wxDateTime::Month )wxDateTime_GetMonth(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4421,7 +4005,7 @@ static PyObject *_wrap_wxDateTime_GetDay(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDay(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDay(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4458,7 +4042,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDay(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::WeekDay )wxDateTime_GetWeekDay(_arg0,*_arg1); + _result = (wxDateTime::WeekDay )wxDateTime_GetWeekDay(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4495,7 +4079,7 @@ static PyObject *_wrap_wxDateTime_GetHour(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetHour(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetHour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4532,7 +4116,7 @@ static PyObject *_wrap_wxDateTime_GetMinute(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMinute(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMinute(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4569,7 +4153,7 @@ static PyObject *_wrap_wxDateTime_GetSecond(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetSecond(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetSecond(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4606,7 +4190,7 @@ static PyObject *_wrap_wxDateTime_GetMillisecond(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMillisecond(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMillisecond(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4643,7 +4227,7 @@ static PyObject *_wrap_wxDateTime_GetDayOfYear(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDayOfYear(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDayOfYear(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4681,7 +4265,7 @@ static PyObject *_wrap_wxDateTime_GetWeekOfYear(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfYear(_arg0,_arg1,*_arg2); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfYear(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4719,7 +4303,7 @@ static PyObject *_wrap_wxDateTime_GetWeekOfMonth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfMonth(_arg0,_arg1,*_arg2); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfMonth(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4751,7 +4335,7 @@ static PyObject *_wrap_wxDateTime_IsWorkDay(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsWorkDay(_arg0,_arg1); + _result = (bool )wxDateTime_IsWorkDay(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4788,7 +4372,7 @@ static PyObject *_wrap_wxDateTime_IsEqualTo(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsEqualTo(_arg0,*_arg1); + _result = (bool )wxDateTime_IsEqualTo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4825,7 +4409,7 @@ static PyObject *_wrap_wxDateTime_IsEarlierThan(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsEarlierThan(_arg0,*_arg1); + _result = (bool )wxDateTime_IsEarlierThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4862,7 +4446,7 @@ static PyObject *_wrap_wxDateTime_IsLaterThan(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsLaterThan(_arg0,*_arg1); + _result = (bool )wxDateTime_IsLaterThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4908,7 +4492,7 @@ static PyObject *_wrap_wxDateTime_IsStrictlyBetween(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsStrictlyBetween(_arg0,*_arg1,*_arg2); + _result = (bool )wxDateTime_IsStrictlyBetween(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4954,7 +4538,7 @@ static PyObject *_wrap_wxDateTime_IsBetween(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsBetween(_arg0,*_arg1,*_arg2); + _result = (bool )wxDateTime_IsBetween(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4991,7 +4575,7 @@ static PyObject *_wrap_wxDateTime_IsSameDate(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsSameDate(_arg0,*_arg1); + _result = (bool )wxDateTime_IsSameDate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5028,7 +4612,7 @@ static PyObject *_wrap_wxDateTime_IsSameTime(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsSameTime(_arg0,*_arg1); + _result = (bool )wxDateTime_IsSameTime(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5074,7 +4658,7 @@ static PyObject *_wrap_wxDateTime_IsEqualUpTo(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsEqualUpTo(_arg0,*_arg1,*_arg2); + _result = (bool )wxDateTime_IsEqualUpTo(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5112,7 +4696,7 @@ static PyObject *_wrap_wxDateTime_AddTS(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_AddTS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_AddTS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5157,7 +4741,7 @@ static PyObject *_wrap_wxDateTime_AddDS(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_AddDS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_AddDS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5202,7 +4786,7 @@ static PyObject *_wrap_wxDateTime_SubtractTS(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SubtractTS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_SubtractTS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5247,7 +4831,7 @@ static PyObject *_wrap_wxDateTime_SubtractDS(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SubtractDS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_SubtractDS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5292,7 +4876,7 @@ static PyObject *_wrap_wxDateTime_Subtract(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxDateTime_Subtract(_arg0,*_arg1)); + _result = new wxTimeSpan (wxDateTime_Subtract(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5331,7 +4915,7 @@ static PyObject *_wrap_wxDateTime___add__TS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___add__TS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___add__TS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5370,7 +4954,7 @@ static PyObject *_wrap_wxDateTime___add__DS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___add__DS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___add__DS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5409,7 +4993,7 @@ static PyObject *_wrap_wxDateTime___sub__DT(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxDateTime___sub__DT(_arg0,*_arg1)); + _result = new wxTimeSpan (wxDateTime___sub__DT(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5448,7 +5032,7 @@ static PyObject *_wrap_wxDateTime___sub__TS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___sub__TS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___sub__TS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5487,7 +5071,7 @@ static PyObject *_wrap_wxDateTime___sub__DS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___sub__DS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___sub__DS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5529,7 +5113,7 @@ static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime___cmp__(_arg0,*_arg1); + _result = (int )wxDateTime___cmp__(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5542,7 +5126,7 @@ static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","date", NULL }; @@ -5558,7 +5142,7 @@ static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseRfc822Date(_arg0,_arg1); + _result = (char *)wxDateTime_ParseRfc822Date(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5571,8 +5155,8 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; - char * _arg2 = (char *) "%c"; + wxChar * _arg1; + wxChar * _arg2 = (wxChar *) "%c"; wxDateTime * _arg3 = (wxDateTime *) &wxDefaultDateTime; PyObject * _argo0 = 0; PyObject * _argo3 = 0; @@ -5597,7 +5181,7 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseFormat(_arg0,_arg1,_arg2,*_arg3); + _result = (char *)wxDateTime_ParseFormat(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5610,7 +5194,7 @@ static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","datetime", NULL }; @@ -5626,7 +5210,7 @@ static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseDateTime(_arg0,_arg1); + _result = (char *)wxDateTime_ParseDateTime(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5639,7 +5223,7 @@ static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyOb PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","date", NULL }; @@ -5655,7 +5239,7 @@ static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseDate(_arg0,_arg1); + _result = (char *)wxDateTime_ParseDate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5668,7 +5252,7 @@ static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyOb PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","time", NULL }; @@ -5684,7 +5268,7 @@ static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseTime(_arg0,_arg1); + _result = (char *)wxDateTime_ParseTime(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5697,7 +5281,7 @@ static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; wxString * _result; wxDateTime * _arg0; - char * _arg1 = (char *) "%c"; + wxChar * _arg1 = (wxChar *) "%c"; wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -5719,12 +5303,16 @@ static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_Format(_arg0,_arg1,*_arg2)); + _result = new wxString (wxDateTime_Format(_arg0,_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_arg2) delete _arg2; @@ -5755,12 +5343,16 @@ static PyObject *_wrap_wxDateTime_FormatDate(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatDate(_arg0)); + _result = new wxString (wxDateTime_FormatDate(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5788,12 +5380,16 @@ static PyObject *_wrap_wxDateTime_FormatTime(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatTime(_arg0)); + _result = new wxString (wxDateTime_FormatTime(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5821,12 +5417,16 @@ static PyObject *_wrap_wxDateTime_FormatISODate(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatISODate(_arg0)); + _result = new wxString (wxDateTime_FormatISODate(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5854,12 +5454,16 @@ static PyObject *_wrap_wxDateTime_FormatISOTime(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatISOTime(_arg0)); + _result = new wxString (wxDateTime_FormatISOTime(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5879,7 +5483,7 @@ static PyObject *_wrap_wxTimeSpan_Seconds(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Seconds(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Seconds(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5899,7 +5503,7 @@ static PyObject *_wrap_wxTimeSpan_Second(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Second()); + _result = new wxTimeSpan (wxTimeSpan::Second()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5920,7 +5524,7 @@ static PyObject *_wrap_wxTimeSpan_Minutes(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Minutes(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Minutes(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5940,7 +5544,7 @@ static PyObject *_wrap_wxTimeSpan_Minute(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Minute()); + _result = new wxTimeSpan (wxTimeSpan::Minute()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5961,7 +5565,7 @@ static PyObject *_wrap_wxTimeSpan_Hours(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Hours(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Hours(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5981,7 +5585,7 @@ static PyObject *_wrap_wxTimeSpan_Hour(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Hour()); + _result = new wxTimeSpan (wxTimeSpan::Hour()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6002,7 +5606,7 @@ static PyObject *_wrap_wxTimeSpan_Days(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Days(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Days(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6022,7 +5626,7 @@ static PyObject *_wrap_wxTimeSpan_Day(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Day()); + _result = new wxTimeSpan (wxTimeSpan::Day()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6043,7 +5647,7 @@ static PyObject *_wrap_wxTimeSpan_Weeks(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Weeks(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Weeks(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6063,7 +5667,7 @@ static PyObject *_wrap_wxTimeSpan_Week(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Week()); + _result = new wxTimeSpan (wxTimeSpan::Week()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6088,7 +5692,7 @@ static PyObject *_wrap_new_wxTimeSpan(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTimeSpan *)new_wxTimeSpan(_arg0,_arg1,_arg2,_arg3); + _result = (wxTimeSpan *)new_wxTimeSpan(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6121,7 +5725,7 @@ static PyObject *_wrap_delete_wxTimeSpan(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTimeSpan(_arg0); + delete_wxTimeSpan(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6160,7 +5764,7 @@ static PyObject *_wrap_wxTimeSpan_Add(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Add(_arg0,*_arg1); + wxTimeSpan & _result_ref = wxTimeSpan_Add(_arg0,*_arg1); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6205,7 +5809,7 @@ static PyObject *_wrap_wxTimeSpan_Subtract(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Subtract(_arg0,*_arg1); + wxTimeSpan & _result_ref = wxTimeSpan_Subtract(_arg0,*_arg1); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6242,7 +5846,7 @@ static PyObject *_wrap_wxTimeSpan_Multiply(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Multiply(_arg0,_arg1); + wxTimeSpan & _result_ref = wxTimeSpan_Multiply(_arg0,_arg1); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6278,7 +5882,7 @@ static PyObject *_wrap_wxTimeSpan_Neg(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Neg(_arg0); + wxTimeSpan & _result_ref = wxTimeSpan_Neg(_arg0); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6314,7 +5918,7 @@ static PyObject *_wrap_wxTimeSpan_Abs(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan_Abs(_arg0)); + _result = new wxTimeSpan (wxTimeSpan_Abs(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6353,7 +5957,7 @@ static PyObject *_wrap_wxTimeSpan___add__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___add__(_arg0,*_arg1)); + _result = new wxTimeSpan (wxTimeSpan___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6392,7 +5996,7 @@ static PyObject *_wrap_wxTimeSpan___sub__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___sub__(_arg0,*_arg1)); + _result = new wxTimeSpan (wxTimeSpan___sub__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6423,7 +6027,7 @@ static PyObject *_wrap_wxTimeSpan___mul__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___mul__(_arg0,_arg1)); + _result = new wxTimeSpan (wxTimeSpan___mul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6454,7 +6058,7 @@ static PyObject *_wrap_wxTimeSpan___rmul__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___rmul__(_arg0,_arg1)); + _result = new wxTimeSpan (wxTimeSpan___rmul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6484,7 +6088,7 @@ static PyObject *_wrap_wxTimeSpan___neg__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___neg__(_arg0)); + _result = new wxTimeSpan (wxTimeSpan___neg__(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6526,7 +6130,7 @@ static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); + _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6554,7 +6158,7 @@ static PyObject *_wrap_wxTimeSpan_IsNull(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsNull(_arg0); + _result = (bool )wxTimeSpan_IsNull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6582,7 +6186,7 @@ static PyObject *_wrap_wxTimeSpan_IsPositive(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsPositive(_arg0); + _result = (bool )wxTimeSpan_IsPositive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6610,7 +6214,7 @@ static PyObject *_wrap_wxTimeSpan_IsNegative(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsNegative(_arg0); + _result = (bool )wxTimeSpan_IsNegative(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6647,7 +6251,7 @@ static PyObject *_wrap_wxTimeSpan_IsEqualTo(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsEqualTo(_arg0,*_arg1); + _result = (bool )wxTimeSpan_IsEqualTo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6684,7 +6288,7 @@ static PyObject *_wrap_wxTimeSpan_IsLongerThan(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsLongerThan(_arg0,*_arg1); + _result = (bool )wxTimeSpan_IsLongerThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6721,7 +6325,7 @@ static PyObject *_wrap_wxTimeSpan_IsShorterThan(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsShorterThan(_arg0,*_arg1); + _result = (bool )wxTimeSpan_IsShorterThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6749,7 +6353,7 @@ static PyObject *_wrap_wxTimeSpan_GetWeeks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetWeeks(_arg0); + _result = (int )wxTimeSpan_GetWeeks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6777,7 +6381,7 @@ static PyObject *_wrap_wxTimeSpan_GetDays(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetDays(_arg0); + _result = (int )wxTimeSpan_GetDays(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6805,7 +6409,7 @@ static PyObject *_wrap_wxTimeSpan_GetHours(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetHours(_arg0); + _result = (int )wxTimeSpan_GetHours(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6833,7 +6437,7 @@ static PyObject *_wrap_wxTimeSpan_GetMinutes(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetMinutes(_arg0); + _result = (int )wxTimeSpan_GetMinutes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6861,7 +6465,7 @@ static PyObject *_wrap_wxTimeSpan_GetSeconds(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxLongLong (wxTimeSpan_GetSeconds(_arg0)); + _result = new wxLongLong (wxTimeSpan_GetSeconds(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6900,7 +6504,7 @@ static PyObject *_wrap_wxTimeSpan_GetMilliseconds(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxLongLong (wxTimeSpan_GetMilliseconds(_arg0)); + _result = new wxLongLong (wxTimeSpan_GetMilliseconds(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6924,7 +6528,7 @@ static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; wxString * _result; wxTimeSpan * _arg0; - char * _arg1 = (char *) "%c"; + wxChar * _arg1 = (wxChar *) "%c"; PyObject * _argo0 = 0; char *_kwnames[] = { "self","format", NULL }; @@ -6940,12 +6544,16 @@ static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTimeSpan_Format(_arg0,_arg1)); + _result = new wxString (wxTimeSpan_Format(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6969,7 +6577,7 @@ static PyObject *_wrap_new_wxDateSpan(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateSpan *)new_wxDateSpan(_arg0,_arg1,_arg2,_arg3); + _result = (wxDateSpan *)new_wxDateSpan(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7002,7 +6610,7 @@ static PyObject *_wrap_delete_wxDateSpan(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDateSpan(_arg0); + delete_wxDateSpan(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7023,7 +6631,7 @@ static PyObject *_wrap_wxDateSpan_Days(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Days(_arg0)); + _result = new wxDateSpan (wxDateSpan::Days(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7043,7 +6651,7 @@ static PyObject *_wrap_wxDateSpan_Day(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Day()); + _result = new wxDateSpan (wxDateSpan::Day()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7064,7 +6672,7 @@ static PyObject *_wrap_wxDateSpan_Weeks(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Weeks(_arg0)); + _result = new wxDateSpan (wxDateSpan::Weeks(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7084,7 +6692,7 @@ static PyObject *_wrap_wxDateSpan_Week(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Week()); + _result = new wxDateSpan (wxDateSpan::Week()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7105,7 +6713,7 @@ static PyObject *_wrap_wxDateSpan_Months(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Months(_arg0)); + _result = new wxDateSpan (wxDateSpan::Months(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7125,7 +6733,7 @@ static PyObject *_wrap_wxDateSpan_Month(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Month()); + _result = new wxDateSpan (wxDateSpan::Month()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7146,7 +6754,7 @@ static PyObject *_wrap_wxDateSpan_Years(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Years(_arg0)); + _result = new wxDateSpan (wxDateSpan::Years(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7166,7 +6774,7 @@ static PyObject *_wrap_wxDateSpan_Year(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Year()); + _result = new wxDateSpan (wxDateSpan::Year()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7197,7 +6805,7 @@ static PyObject *_wrap_wxDateSpan_SetYears(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetYears(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetYears(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7234,7 +6842,7 @@ static PyObject *_wrap_wxDateSpan_SetMonths(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetMonths(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetMonths(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7271,7 +6879,7 @@ static PyObject *_wrap_wxDateSpan_SetWeeks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetWeeks(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetWeeks(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7308,7 +6916,7 @@ static PyObject *_wrap_wxDateSpan_SetDays(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetDays(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetDays(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7343,7 +6951,7 @@ static PyObject *_wrap_wxDateSpan_GetYears(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetYears(_arg0); + _result = (int )wxDateSpan_GetYears(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7371,7 +6979,7 @@ static PyObject *_wrap_wxDateSpan_GetMonths(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetMonths(_arg0); + _result = (int )wxDateSpan_GetMonths(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7399,7 +7007,7 @@ static PyObject *_wrap_wxDateSpan_GetWeeks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetWeeks(_arg0); + _result = (int )wxDateSpan_GetWeeks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7427,7 +7035,7 @@ static PyObject *_wrap_wxDateSpan_GetDays(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetDays(_arg0); + _result = (int )wxDateSpan_GetDays(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7455,7 +7063,7 @@ static PyObject *_wrap_wxDateSpan_GetTotalDays(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetTotalDays(_arg0); + _result = (int )wxDateSpan_GetTotalDays(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7493,7 +7101,7 @@ static PyObject *_wrap_wxDateSpan_Add(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Add(_arg0,*_arg1); + wxDateSpan & _result_ref = wxDateSpan_Add(_arg0,*_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7538,7 +7146,7 @@ static PyObject *_wrap_wxDateSpan_Subtract(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Subtract(_arg0,*_arg1); + wxDateSpan & _result_ref = wxDateSpan_Subtract(_arg0,*_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7574,7 +7182,7 @@ static PyObject *_wrap_wxDateSpan_Neg(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Neg(_arg0); + wxDateSpan & _result_ref = wxDateSpan_Neg(_arg0); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7611,7 +7219,7 @@ static PyObject *_wrap_wxDateSpan_Multiply(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Multiply(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_Multiply(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7656,7 +7264,7 @@ static PyObject *_wrap_wxDateSpan___add__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___add__(_arg0,*_arg1)); + _result = new wxDateSpan (wxDateSpan___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7695,7 +7303,7 @@ static PyObject *_wrap_wxDateSpan___sub__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___sub__(_arg0,*_arg1)); + _result = new wxDateSpan (wxDateSpan___sub__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7726,7 +7334,7 @@ static PyObject *_wrap_wxDateSpan___mul__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___mul__(_arg0,_arg1)); + _result = new wxDateSpan (wxDateSpan___mul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7757,7 +7365,7 @@ static PyObject *_wrap_wxDateSpan___rmul__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___rmul__(_arg0,_arg1)); + _result = new wxDateSpan (wxDateSpan___rmul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7787,7 +7395,7 @@ static PyObject *_wrap_wxDateSpan___neg__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___neg__(_arg0)); + _result = new wxDateSpan (wxDateSpan___neg__(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index ed84dcd2a1..fc0c77339b 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPyValidator : public wxValidator { DECLARE_DYNAMIC_CLASS(wxPyValidator); public: @@ -161,7 +155,7 @@ static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)new_wxEvtHandler(); + _result = (wxEvtHandler *)new_wxEvtHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -204,7 +198,7 @@ static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvtHandler_ProcessEvent(_arg0,*_arg1); + _result = (bool )wxEvtHandler_ProcessEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -240,7 +234,7 @@ static PyObject *_wrap_wxEvtHandler_AddPendingEvent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_AddPendingEvent(_arg0,*_arg1); + wxEvtHandler_AddPendingEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -269,7 +263,7 @@ static PyObject *_wrap_wxEvtHandler_GetEvtHandlerEnabled(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvtHandler_GetEvtHandlerEnabled(_arg0); + _result = (bool )wxEvtHandler_GetEvtHandlerEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -299,7 +293,7 @@ static PyObject *_wrap_wxEvtHandler_SetEvtHandlerEnabled(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_SetEvtHandlerEnabled(_arg0,_arg1); + wxEvtHandler_SetEvtHandlerEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -328,7 +322,7 @@ static PyObject *_wrap_wxEvtHandler_GetNextHandler(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxEvtHandler_GetNextHandler(_arg0); + _result = (wxEvtHandler *)wxEvtHandler_GetNextHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -356,7 +350,7 @@ static PyObject *_wrap_wxEvtHandler_GetPreviousHandler(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxEvtHandler_GetPreviousHandler(_arg0); + _result = (wxEvtHandler *)wxEvtHandler_GetPreviousHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -392,7 +386,7 @@ static PyObject *_wrap_wxEvtHandler_SetNextHandler(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_SetNextHandler(_arg0,_arg1); + wxEvtHandler_SetNextHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -429,7 +423,7 @@ static PyObject *_wrap_wxEvtHandler_SetPreviousHandler(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_SetPreviousHandler(_arg0,_arg1); + wxEvtHandler_SetPreviousHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,7 +473,7 @@ static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_Connect(_arg0,_arg1,_arg2,_arg3,_arg4); + wxEvtHandler_Connect(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -515,7 +509,7 @@ static PyObject *_wrap_wxEvtHandler_Disconnect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvtHandler_Disconnect(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxEvtHandler_Disconnect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -549,7 +543,7 @@ static PyObject *_wrap_wxEvtHandler__setOORInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler__setOORInfo(_arg0,_arg1); + wxEvtHandler__setOORInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -586,7 +580,7 @@ static PyObject *_wrap_new_wxValidator(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxValidator *)new_wxValidator(); + _result = (wxValidator *)new_wxValidator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -620,7 +614,7 @@ static PyObject *_wrap_wxValidator_Clone(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxValidator *)wxValidator_Clone(_arg0); + _result = (wxValidator *)wxValidator_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -648,7 +642,7 @@ static PyObject *_wrap_wxValidator_GetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxValidator_GetWindow(_arg0); + _result = (wxWindow *)wxValidator_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -684,7 +678,7 @@ static PyObject *_wrap_wxValidator_SetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxValidator_SetWindow(_arg0,_arg1); + wxValidator_SetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -703,7 +697,7 @@ static PyObject *_wrap_wxValidator_IsSilent(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxValidator::IsSilent(); + _result = (bool )wxValidator::IsSilent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -721,7 +715,7 @@ static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxValidator::SetBellOnError(_arg0); + wxValidator::SetBellOnError(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -766,7 +760,7 @@ static PyObject *_wrap_new_wxPyValidator(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyValidator *)new_wxPyValidator(); + _result = (wxPyValidator *)new_wxPyValidator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -810,7 +804,7 @@ static PyObject *_wrap_wxPyValidator__setCallbackInfo(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyValidator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); + wxPyValidator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -877,7 +871,7 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)new_wxWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxWindow *)new_wxWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -903,7 +897,7 @@ static PyObject *_wrap_new_wxPreWindow(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)new_wxPreWindow(); + _result = (wxWindow *)new_wxPreWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -967,7 +961,7 @@ static PyObject *_wrap_wxWindow_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -994,7 +988,7 @@ static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CaptureMouse(_arg0); + wxWindow_CaptureMouse(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1023,7 +1017,7 @@ static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Center(_arg0,_arg1); + wxWindow_Center(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1052,7 +1046,7 @@ static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Centre(_arg0,_arg1); + wxWindow_Centre(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1081,7 +1075,7 @@ static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CentreOnParent(_arg0,_arg1); + wxWindow_CentreOnParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1110,7 +1104,7 @@ static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CenterOnParent(_arg0,_arg1); + wxWindow_CenterOnParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1139,7 +1133,7 @@ static PyObject *_wrap_wxWindow_CentreOnScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CentreOnScreen(_arg0,_arg1); + wxWindow_CentreOnScreen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1168,7 +1162,7 @@ static PyObject *_wrap_wxWindow_CenterOnScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CenterOnScreen(_arg0,_arg1); + wxWindow_CenterOnScreen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1196,7 +1190,7 @@ static PyObject *_wrap_wxWindow_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Clear(_arg0); + wxWindow_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1238,7 +1232,7 @@ static PyObject *_wrap_wxWindow_ClientToScreenXY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ClientToScreenXY(_arg0,_arg1,_arg2); + wxWindow_ClientToScreenXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1286,7 +1280,7 @@ static PyObject *_wrap_wxWindow_ClientToScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ClientToScreen(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ClientToScreen(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1316,7 +1310,7 @@ static PyObject *_wrap_wxWindow_Close(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Close(_arg0,_arg1); + _result = (bool )wxWindow_Close(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1344,7 +1338,7 @@ static PyObject *_wrap_wxWindow_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Destroy(_arg0); + _result = (bool )wxWindow_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1371,7 +1365,7 @@ static PyObject *_wrap_wxWindow_DestroyChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_DestroyChildren(_arg0); + wxWindow_DestroyChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1400,7 +1394,7 @@ static PyObject *_wrap_wxWindow_IsBeingDeleted(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsBeingDeleted(_arg0); + _result = (bool )wxWindow_IsBeingDeleted(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1430,7 +1424,7 @@ static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Enable(_arg0,_arg1); + wxWindow_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1460,7 +1454,7 @@ static PyObject *_wrap_wxWindow_FindWindowById(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_FindWindowById(_arg0,_arg1); + _result = (wxWindow *)wxWindow_FindWindowById(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1489,26 +1483,13 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); + _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1539,7 +1520,7 @@ static PyObject *_wrap_wxWindow_Fit(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Fit(_arg0); + wxWindow_Fit(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1569,7 +1550,7 @@ static PyObject *_wrap_wxWindow_GetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxWindow_GetBackgroundColour(_arg0)); + _result = new wxColour (wxWindow_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1598,7 +1579,7 @@ static PyObject *_wrap_wxWindow_GetBorder(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBorder )wxWindow_GetBorder(_arg0); + _result = (wxBorder )wxWindow_GetBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1629,7 +1610,7 @@ static PyObject *_wrap_wxWindow_GetChildren(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxWindow_GetChildren(_arg0); + _result = (PyObject *)wxWindow_GetChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1659,7 +1640,7 @@ static PyObject *_wrap_wxWindow_GetCharHeight(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetCharHeight(_arg0); + _result = (int )wxWindow_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1687,7 +1668,7 @@ static PyObject *_wrap_wxWindow_GetCharWidth(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetCharWidth(_arg0); + _result = (int )wxWindow_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1724,7 +1705,7 @@ static PyObject *_wrap_wxWindow_GetClientSizeTuple(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetClientSizeTuple(_arg0,_arg1,_arg2); + wxWindow_GetClientSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1764,7 +1745,7 @@ static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_GetClientSize(_arg0)); + _result = new wxSize (wxWindow_GetClientSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1794,7 +1775,7 @@ static PyObject *_wrap_wxWindow_GetClientAreaOrigin(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_GetClientAreaOrigin(_arg0)); + _result = new wxPoint (wxWindow_GetClientAreaOrigin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1824,7 +1805,7 @@ static PyObject *_wrap_wxWindow_GetClientRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxWindow_GetClientRect(_arg0)); + _result = new wxRect (wxWindow_GetClientRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1854,7 +1835,7 @@ static PyObject *_wrap_wxWindow_GetConstraints(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutConstraints *)wxWindow_GetConstraints(_arg0); + _result = (wxLayoutConstraints *)wxWindow_GetConstraints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1888,7 +1869,7 @@ static PyObject *_wrap_wxWindow_GetEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxWindow_GetEventHandler(_arg0); + _result = (wxEvtHandler *)wxWindow_GetEventHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1917,7 +1898,7 @@ static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxWindow_GetFont(_arg0)); + _result = new wxFont (wxWindow_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1947,7 +1928,7 @@ static PyObject *_wrap_wxWindow_GetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxWindow_GetForegroundColour(_arg0)); + _result = new wxColour (wxWindow_GetForegroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1976,7 +1957,7 @@ static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); + _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2006,7 +1987,7 @@ static PyObject *_wrap_wxWindow_GetHandle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxWindow_GetHandle(_arg0); + _result = (long )wxWindow_GetHandle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2034,7 +2015,7 @@ static PyObject *_wrap_wxWindow_GetId(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetId(_arg0); + _result = (int )wxWindow_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2062,12 +2043,16 @@ static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetLabel(_arg0)); + _result = new wxString (wxWindow_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2095,26 +2080,13 @@ static PyObject *_wrap_wxWindow_SetLabel(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetLabel(_arg0,*_arg1); + wxWindow_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2147,12 +2119,16 @@ static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetName(_arg0)); + _result = new wxString (wxWindow_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2180,7 +2156,7 @@ static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_GetParent(_arg0); + _result = (wxWindow *)wxWindow_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2217,7 +2193,7 @@ static PyObject *_wrap_wxWindow_GetPositionTuple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetPositionTuple(_arg0,_arg1,_arg2); + wxWindow_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2257,7 +2233,7 @@ static PyObject *_wrap_wxWindow_GetPosition(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_GetPosition(_arg0)); + _result = new wxPoint (wxWindow_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2287,7 +2263,7 @@ static PyObject *_wrap_wxWindow_GetRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxWindow_GetRect(_arg0)); + _result = new wxRect (wxWindow_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2317,7 +2293,7 @@ static PyObject *_wrap_wxWindow_GetScrollThumb(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetScrollThumb(_arg0,_arg1); + _result = (int )wxWindow_GetScrollThumb(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2346,7 +2322,7 @@ static PyObject *_wrap_wxWindow_GetScrollPos(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetScrollPos(_arg0,_arg1); + _result = (int )wxWindow_GetScrollPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2375,7 +2351,7 @@ static PyObject *_wrap_wxWindow_GetScrollRange(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetScrollRange(_arg0,_arg1); + _result = (int )wxWindow_GetScrollRange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2412,7 +2388,7 @@ static PyObject *_wrap_wxWindow_GetSizeTuple(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetSizeTuple(_arg0,_arg1,_arg2); + wxWindow_GetSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2452,7 +2428,7 @@ static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_GetSize(_arg0)); + _result = new wxSize (wxWindow_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2491,26 +2467,13 @@ static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); + wxWindow_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2575,22 +2538,9 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -2601,7 +2551,7 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxWindow_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2654,12 +2604,16 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetTitle(_arg0)); + _result = new wxString (wxWindow_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2688,7 +2642,7 @@ static PyObject *_wrap_wxWindow_GetUpdateRegion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRegion (wxWindow_GetUpdateRegion(_arg0)); + _result = new wxRegion (wxWindow_GetUpdateRegion(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2717,7 +2671,7 @@ static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxWindow_GetWindowStyleFlag(_arg0); + _result = (long )wxWindow_GetWindowStyleFlag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2745,7 +2699,7 @@ static PyObject *_wrap_wxWindow_SetWindowStyleFlag(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetWindowStyleFlag(_arg0,_arg1); + wxWindow_SetWindowStyleFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2774,7 +2728,7 @@ static PyObject *_wrap_wxWindow_SetWindowStyle(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetWindowStyle(_arg0,_arg1); + wxWindow_SetWindowStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2804,7 +2758,7 @@ static PyObject *_wrap_wxWindow_HasScrollbar(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_HasScrollbar(_arg0,_arg1); + _result = (bool )wxWindow_HasScrollbar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2832,7 +2786,7 @@ static PyObject *_wrap_wxWindow_Hide(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Hide(_arg0); + _result = (bool )wxWindow_Hide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2868,7 +2822,7 @@ static PyObject *_wrap_wxWindow_HitTest(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHitTest )wxWindow_HitTest(_arg0,*_arg1); + _result = (wxHitTest )wxWindow_HitTest(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2895,7 +2849,7 @@ static PyObject *_wrap_wxWindow_InitDialog(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_InitDialog(_arg0); + wxWindow_InitDialog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2924,7 +2878,7 @@ static PyObject *_wrap_wxWindow_IsEnabled(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsEnabled(_arg0); + _result = (bool )wxWindow_IsEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2956,7 +2910,7 @@ static PyObject *_wrap_wxWindow_IsExposed(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsExposed(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxWindow_IsExposed(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2992,7 +2946,7 @@ static PyObject *_wrap_wxWindow_IsExposedPoint(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsExposedPoint(_arg0,*_arg1); + _result = (bool )wxWindow_IsExposedPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3028,7 +2982,7 @@ static PyObject *_wrap_wxWindow_IsExposedRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsExposedRect(_arg0,*_arg1); + _result = (bool )wxWindow_IsExposedRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3056,7 +3010,7 @@ static PyObject *_wrap_wxWindow_IsRetained(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsRetained(_arg0); + _result = (bool )wxWindow_IsRetained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3084,7 +3038,7 @@ static PyObject *_wrap_wxWindow_IsShown(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsShown(_arg0); + _result = (bool )wxWindow_IsShown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3112,7 +3066,7 @@ static PyObject *_wrap_wxWindow_IsTopLevel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsTopLevel(_arg0); + _result = (bool )wxWindow_IsTopLevel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3139,7 +3093,7 @@ static PyObject *_wrap_wxWindow_Layout(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Layout(_arg0); + wxWindow_Layout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3180,22 +3134,9 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -3206,7 +3147,7 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); + _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3237,7 +3178,7 @@ static PyObject *_wrap_wxWindow_Lower(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Lower(_arg0); + wxWindow_Lower(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3268,7 +3209,7 @@ static PyObject *_wrap_wxWindow_MakeModal(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_MakeModal(_arg0,_arg1); + wxWindow_MakeModal(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3299,7 +3240,7 @@ static PyObject *_wrap_wxWindow_MoveXY(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_MoveXY(_arg0,_arg1,_arg2,_arg3); + wxWindow_MoveXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3336,7 +3277,7 @@ static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Move(_arg0,*_arg1,_arg2); + wxWindow_Move(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3368,7 +3309,7 @@ static PyObject *_wrap_wxWindow_PopEventHandler(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxWindow_PopEventHandler(_arg0,_arg1); + _result = (wxEvtHandler *)wxWindow_PopEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3404,7 +3345,7 @@ static PyObject *_wrap_wxWindow_PushEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_PushEventHandler(_arg0,_arg1); + wxWindow_PushEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3442,7 +3383,7 @@ static PyObject *_wrap_wxWindow_RemoveEventHandler(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1); + _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3481,7 +3422,7 @@ static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3526,7 +3467,7 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2); + _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3553,7 +3494,7 @@ static PyObject *_wrap_wxWindow_Raise(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Raise(_arg0); + wxWindow_Raise(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3593,7 +3534,7 @@ static PyObject *_wrap_wxWindow_Refresh(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Refresh(_arg0,_arg1,_arg2); + wxWindow_Refresh(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3629,7 +3570,7 @@ static PyObject *_wrap_wxWindow_RefreshRect(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_RefreshRect(_arg0,*_arg1); + wxWindow_RefreshRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3657,7 +3598,7 @@ static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ReleaseMouse(_arg0); + wxWindow_ReleaseMouse(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3694,7 +3635,7 @@ static PyObject *_wrap_wxWindow_RemoveChild(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_RemoveChild(_arg0,_arg1); + wxWindow_RemoveChild(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3732,7 +3673,7 @@ static PyObject *_wrap_wxWindow_Reparent(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Reparent(_arg0,_arg1); + _result = (bool )wxWindow_Reparent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3773,7 +3714,7 @@ static PyObject *_wrap_wxWindow_ScreenToClientXY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ScreenToClientXY(_arg0,_arg1,_arg2); + wxWindow_ScreenToClientXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3821,7 +3762,7 @@ static PyObject *_wrap_wxWindow_ScreenToClient(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ScreenToClient(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ScreenToClient(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3860,7 +3801,7 @@ static PyObject *_wrap_wxWindow_ScrollWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ScrollWindow(_arg0,_arg1,_arg2,_arg3); + wxWindow_ScrollWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3891,7 +3832,7 @@ static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetAutoLayout(_arg0,_arg1); + wxWindow_SetAutoLayout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3920,7 +3861,7 @@ static PyObject *_wrap_wxWindow_GetAutoLayout(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_GetAutoLayout(_arg0); + _result = (bool )wxWindow_GetAutoLayout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3955,7 +3896,7 @@ static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetBackgroundColour(_arg0,*_arg1); + wxWindow_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3992,7 +3933,7 @@ static PyObject *_wrap_wxWindow_SetConstraints(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetConstraints(_arg0,_arg1); + wxWindow_SetConstraints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4029,7 +3970,7 @@ static PyObject *_wrap_wxWindow_UnsetConstraints(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_UnsetConstraints(_arg0,_arg1); + wxWindow_UnsetConstraints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4057,7 +3998,7 @@ static PyObject *_wrap_wxWindow_SetFocus(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetFocus(_arg0); + wxWindow_SetFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4086,7 +4027,7 @@ static PyObject *_wrap_wxWindow_AcceptsFocus(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_AcceptsFocus(_arg0); + _result = (bool )wxWindow_AcceptsFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4122,7 +4063,7 @@ static PyObject *_wrap_wxWindow_SetFont(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetFont(_arg0,*_arg1); + wxWindow_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4158,7 +4099,7 @@ static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetForegroundColour(_arg0,*_arg1); + wxWindow_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4187,7 +4128,7 @@ static PyObject *_wrap_wxWindow_SetId(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetId(_arg0,_arg1); + wxWindow_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4216,26 +4157,13 @@ static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetName(_arg0,*_arg1); + wxWindow_SetName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4272,7 +4200,7 @@ static PyObject *_wrap_wxWindow_SetScrollbar(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxWindow_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4305,7 +4233,7 @@ static PyObject *_wrap_wxWindow_SetScrollPos(PyObject *self, PyObject *args, PyO _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetScrollPos(_arg0,_arg1,_arg2,_arg3); + wxWindow_SetScrollPos(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4338,7 +4266,7 @@ static PyObject *_wrap_wxWindow_SetDimensions(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetDimensions(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxWindow_SetDimensions(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4376,7 +4304,7 @@ static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetSize(_arg0,*_arg1); + wxWindow_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4415,7 +4343,7 @@ static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetPosition(_arg0,*_arg1,_arg2); + wxWindow_SetPosition(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4454,7 +4382,7 @@ static PyObject *_wrap_wxWindow_SetRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetRect(_arg0,*_arg1,_arg2); + wxWindow_SetRect(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4488,7 +4416,7 @@ static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxWindow_SetSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4518,7 +4446,7 @@ static PyObject *_wrap_wxWindow_SetClientSizeWH(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetClientSizeWH(_arg0,_arg1,_arg2); + wxWindow_SetClientSizeWH(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4554,7 +4482,7 @@ static PyObject *_wrap_wxWindow_SetClientSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetClientSize(_arg0,*_arg1); + wxWindow_SetClientSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4591,7 +4519,7 @@ static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetCursor(_arg0,*_arg1); + wxWindow_SetCursor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4628,7 +4556,7 @@ static PyObject *_wrap_wxWindow_SetEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetEventHandler(_arg0,_arg1); + wxWindow_SetEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4657,7 +4585,7 @@ static PyObject *_wrap_wxWindow_SetExtraStyle(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetExtraStyle(_arg0,_arg1); + wxWindow_SetExtraStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4686,26 +4614,13 @@ static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetTitle(_arg0,*_arg1); + wxWindow_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4741,7 +4656,7 @@ static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args, PyObject *k _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Show(_arg0,_arg1); + _result = (bool )wxWindow_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4769,7 +4684,7 @@ static PyObject *_wrap_wxWindow_TransferDataFromWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_TransferDataFromWindow(_arg0); + _result = (bool )wxWindow_TransferDataFromWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4797,7 +4712,7 @@ static PyObject *_wrap_wxWindow_TransferDataToWindow(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_TransferDataToWindow(_arg0); + _result = (bool )wxWindow_TransferDataToWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4824,7 +4739,7 @@ static PyObject *_wrap_wxWindow_UpdateWindowUI(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_UpdateWindowUI(_arg0); + wxWindow_UpdateWindowUI(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4853,7 +4768,7 @@ static PyObject *_wrap_wxWindow_Validate(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Validate(_arg0); + _result = (bool )wxWindow_Validate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4882,7 +4797,7 @@ static PyObject *_wrap_wxWindow_WarpPointer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_WarpPointer(_arg0,_arg1,_arg2); + wxWindow_WarpPointer(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4920,7 +4835,7 @@ static PyObject *_wrap_wxWindow_ConvertDialogPointToPixels(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ConvertDialogPointToPixels(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ConvertDialogPointToPixels(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4958,7 +4873,7 @@ static PyObject *_wrap_wxWindow_ConvertDialogSizeToPixels(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_ConvertDialogSizeToPixels(_arg0,*_arg1)); + _result = new wxSize (wxWindow_ConvertDialogSizeToPixels(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4996,7 +4911,7 @@ static PyObject *_wrap_wxWindow_ConvertPixelPointToDialog(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ConvertPixelPointToDialog(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ConvertPixelPointToDialog(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5034,7 +4949,7 @@ static PyObject *_wrap_wxWindow_ConvertPixelSizeToDialog(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_ConvertPixelSizeToDialog(_arg0,*_arg1)); + _result = new wxSize (wxWindow_ConvertPixelSizeToDialog(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5063,26 +4978,13 @@ static PyObject *_wrap_wxWindow_SetToolTipString(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetToolTipString(_arg0,*_arg1); + wxWindow_SetToolTipString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5123,7 +5025,7 @@ static PyObject *_wrap_wxWindow_SetToolTip(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetToolTip(_arg0,_arg1); + wxWindow_SetToolTip(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5152,7 +5054,7 @@ static PyObject *_wrap_wxWindow_GetToolTip(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolTip *)wxWindow_GetToolTip(_arg0); + _result = (wxToolTip *)wxWindow_GetToolTip(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5188,7 +5090,7 @@ static PyObject *_wrap_wxWindow_SetSizer(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetSizer(_arg0,_arg1); + wxWindow_SetSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5217,7 +5119,7 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxWindow_GetSizer(_arg0); + _result = (wxSizer *)wxWindow_GetSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5253,7 +5155,7 @@ static PyObject *_wrap_wxWindow_SetContainingSizer(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetContainingSizer(_arg0,_arg1); + wxWindow_SetContainingSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5282,7 +5184,7 @@ static PyObject *_wrap_wxWindow_GetContainingSizer(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxWindow_GetContainingSizer(_arg0); + _result = (wxSizer *)wxWindow_GetContainingSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5310,7 +5212,7 @@ static PyObject *_wrap_wxWindow_GetValidator(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxValidator *)wxWindow_GetValidator(_arg0); + _result = (wxValidator *)wxWindow_GetValidator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5346,7 +5248,7 @@ static PyObject *_wrap_wxWindow_SetValidator(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetValidator(_arg0,*_arg1); + wxWindow_SetValidator(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5383,7 +5285,7 @@ static PyObject *_wrap_wxWindow_SetDropTarget(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetDropTarget(_arg0,_arg1); + wxWindow_SetDropTarget(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5413,7 +5315,7 @@ static PyObject *_wrap_wxWindow_GetDropTarget(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDropTarget *)wxWindow_GetDropTarget(_arg0); + _result = (wxDropTarget *)wxWindow_GetDropTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5448,7 +5350,7 @@ static PyObject *_wrap_wxWindow_GetBestSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_GetBestSize(_arg0)); + _result = new wxSize (wxWindow_GetBestSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5485,7 +5387,7 @@ static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetCaret(_arg0,_arg1); + wxWindow_SetCaret(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5515,7 +5417,7 @@ static PyObject *_wrap_wxWindow_GetCaret(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCaret *)wxWindow_GetCaret(_arg0); + _result = (wxCaret *)wxWindow_GetCaret(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5548,7 +5450,7 @@ static PyObject *_wrap_wxWindow_Freeze(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Freeze(_arg0); + wxWindow_Freeze(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5576,7 +5478,7 @@ static PyObject *_wrap_wxWindow_Thaw(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Thaw(_arg0); + wxWindow_Thaw(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5604,7 +5506,7 @@ static PyObject *_wrap_wxWindow_Update(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Update(_arg0); + wxWindow_Update(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5633,12 +5535,16 @@ static PyObject *_wrap_wxWindow_GetHelpText(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetHelpText(_arg0)); + _result = new wxString (wxWindow_GetHelpText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5666,26 +5572,13 @@ static PyObject *_wrap_wxWindow_SetHelpText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetHelpText(_arg0,*_arg1); + wxWindow_SetHelpText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5718,26 +5611,13 @@ static PyObject *_wrap_wxWindow_SetHelpTextForId(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetHelpTextForId(_arg0,*_arg1); + wxWindow_SetHelpTextForId(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5771,7 +5651,7 @@ static PyObject *_wrap_wxWindow_ScrollLines(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_ScrollLines(_arg0,_arg1); + _result = (bool )wxWindow_ScrollLines(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5800,7 +5680,7 @@ static PyObject *_wrap_wxWindow_ScrollPages(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_ScrollPages(_arg0,_arg1); + _result = (bool )wxWindow_ScrollPages(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5828,7 +5708,7 @@ static PyObject *_wrap_wxWindow_LineUp(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LineUp(_arg0); + _result = (bool )wxWindow_LineUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5856,7 +5736,7 @@ static PyObject *_wrap_wxWindow_LineDown(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LineDown(_arg0); + _result = (bool )wxWindow_LineDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5884,7 +5764,7 @@ static PyObject *_wrap_wxWindow_PageUp(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PageUp(_arg0); + _result = (bool )wxWindow_PageUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5912,7 +5792,7 @@ static PyObject *_wrap_wxWindow_PageDown(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PageDown(_arg0); + _result = (bool )wxWindow_PageDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5930,7 +5810,7 @@ static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow::FindFocus(); + _result = (wxWindow *)wxWindow::FindFocus(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5948,7 +5828,7 @@ static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow::NewControlId(); + _result = (int )wxWindow::NewControlId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5967,7 +5847,7 @@ static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow::NextControlId(_arg0); + _result = (int )wxWindow::NextControlId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5986,7 +5866,7 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow::PrevControlId(_arg0); + _result = (int )wxWindow::PrevControlId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6022,7 +5902,7 @@ static PyObject *_wrap_wxWindow_SetAcceleratorTable(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetAcceleratorTable(_arg0,*_arg1); + wxWindow_SetAcceleratorTable(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6052,7 +5932,7 @@ static PyObject *_wrap_wxWindow_GetAcceleratorTable(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorTable *)wxWindow_GetAcceleratorTable(_arg0); + _result = (wxAcceleratorTable *)wxWindow_GetAcceleratorTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6086,7 +5966,7 @@ static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)wxWindow_GetDefaultItem(_arg0); + _result = (wxButton *)wxWindow_GetDefaultItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6122,7 +6002,7 @@ static PyObject *_wrap_wxWindow_SetDefaultItem(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetDefaultItem(_arg0,_arg1); + wxWindow_SetDefaultItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6197,7 +6077,7 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPanel *)new_wxPanel(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxPanel *)new_wxPanel(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6223,7 +6103,7 @@ static PyObject *_wrap_new_wxPrePanel(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPanel *)new_wxPrePanel(); + _result = (wxPanel *)new_wxPrePanel(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6287,7 +6167,7 @@ static PyObject *_wrap_wxPanel_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPanel_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxPanel_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6314,7 +6194,7 @@ static PyObject *_wrap_wxPanel_InitDialog(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPanel_InitDialog(_arg0); + wxPanel_InitDialog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6397,7 +6277,7 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrolledWindow *)new_wxScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxScrolledWindow *)new_wxScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6423,7 +6303,7 @@ static PyObject *_wrap_new_wxPreScrolledWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrolledWindow *)new_wxPreScrolledWindow(); + _result = (wxScrolledWindow *)new_wxPreScrolledWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6487,7 +6367,7 @@ static PyObject *_wrap_wxScrolledWindow_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrolledWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxScrolledWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6520,7 +6400,7 @@ static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_EnableScrolling(_arg0,_arg1,_arg2); + wxScrolledWindow_EnableScrolling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6550,7 +6430,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScrollPageSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrolledWindow_GetScrollPageSize(_arg0,_arg1); + _result = (int )wxScrolledWindow_GetScrollPageSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6587,7 +6467,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScrollPixelsPerUnit(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetScrollPixelsPerUnit(_arg0,_arg1,_arg2); + wxScrolledWindow_GetScrollPixelsPerUnit(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6626,7 +6506,7 @@ static PyObject *_wrap_wxScrolledWindow_GetTargetWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxScrolledWindow_GetTargetWindow(_arg0); + _result = (wxWindow *)wxScrolledWindow_GetTargetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6663,7 +6543,7 @@ static PyObject *_wrap_wxScrolledWindow_GetVirtualSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); + wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6702,7 +6582,7 @@ static PyObject *_wrap_wxScrolledWindow_IsRetained(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrolledWindow_IsRetained(_arg0); + _result = (bool )wxScrolledWindow_IsRetained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6738,7 +6618,7 @@ static PyObject *_wrap_wxScrolledWindow_PrepareDC(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_PrepareDC(_arg0,*_arg1); + wxScrolledWindow_PrepareDC(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6768,7 +6648,7 @@ static PyObject *_wrap_wxScrolledWindow_Scroll(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_Scroll(_arg0,_arg1,_arg2); + wxScrolledWindow_Scroll(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6803,7 +6683,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6833,7 +6713,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollPageSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetScrollPageSize(_arg0,_arg1,_arg2); + wxScrolledWindow_SetScrollPageSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6870,7 +6750,7 @@ static PyObject *_wrap_wxScrolledWindow_SetTargetWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetTargetWindow(_arg0,_arg1); + wxScrolledWindow_SetTargetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6908,7 +6788,7 @@ static PyObject *_wrap_wxScrolledWindow_GetViewStart(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetViewStart(_arg0,_arg1,_arg2); + wxScrolledWindow_GetViewStart(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6958,7 +6838,7 @@ static PyObject *_wrap_wxScrolledWindow_CalcScrolledPosition(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); + wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7008,7 +6888,7 @@ static PyObject *_wrap_wxScrolledWindow_CalcUnscrolledPosition(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); + wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7048,7 +6928,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScale(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetScale(_arg0,_arg1,_arg2); + wxScrolledWindow_SetScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7077,7 +6957,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScaleX(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxScrolledWindow_GetScaleX(_arg0); + _result = (double )wxScrolledWindow_GetScaleX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7105,7 +6985,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScaleY(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxScrolledWindow_GetScaleY(_arg0); + _result = (double )wxScrolledWindow_GetScaleY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7132,7 +7012,7 @@ static PyObject *_wrap_wxScrolledWindow_AdjustScrollbars(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_AdjustScrollbars(_arg0); + wxScrolledWindow_AdjustScrollbars(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7172,26 +7052,13 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args, PyObject *kwar return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)new_wxMenu(*_arg0,_arg1); + _result = (wxMenu *)new_wxMenu(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7233,45 +7100,19 @@ static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Append(_arg0,_arg1,*_arg2,*_arg3,_arg4); + wxMenu_Append(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7313,22 +7154,9 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -7339,26 +7167,13 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } if (_obj4) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) return NULL; - _arg4 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_AppendMenu(_arg0,_arg1,*_arg2,_arg3,*_arg4); + wxMenu_AppendMenu(_arg0,_arg1,*_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7403,7 +7218,7 @@ static PyObject *_wrap_wxMenu_AppendItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_AppendItem(_arg0,_arg1); + wxMenu_AppendItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7431,7 +7246,7 @@ static PyObject *_wrap_wxMenu_AppendSeparator(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_AppendSeparator(_arg0); + wxMenu_AppendSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7459,7 +7274,7 @@ static PyObject *_wrap_wxMenu_Break(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Break(_arg0); + wxMenu_Break(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7491,7 +7306,7 @@ static PyObject *_wrap_wxMenu_Check(PyObject *self, PyObject *args, PyObject *kw _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Check(_arg0,_arg1,_arg2); + wxMenu_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7521,7 +7336,7 @@ static PyObject *_wrap_wxMenu_IsChecked(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_IsChecked(_arg0,_arg1); + _result = (bool )wxMenu_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7552,7 +7367,7 @@ static PyObject *_wrap_wxMenu_Enable(PyObject *self, PyObject *args, PyObject *k _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Enable(_arg0,_arg1,_arg2); + wxMenu_Enable(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7582,7 +7397,7 @@ static PyObject *_wrap_wxMenu_IsEnabled(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_IsEnabled(_arg0,_arg1); + _result = (bool )wxMenu_IsEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7611,26 +7426,13 @@ static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenu_FindItem(_arg0,*_arg1); + _result = (int )wxMenu_FindItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7663,7 +7465,7 @@ static PyObject *_wrap_wxMenu_FindItemById(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenu_FindItemById(_arg0,_arg1); + _result = (wxMenuItem *)wxMenu_FindItemById(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7691,12 +7493,16 @@ static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenu_GetTitle(_arg0)); + _result = new wxString (wxMenu_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7724,26 +7530,13 @@ static PyObject *_wrap_wxMenu_SetTitle(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetTitle(_arg0,*_arg1); + wxMenu_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7777,12 +7570,16 @@ static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenu_GetLabel(_arg0,_arg1)); + _result = new wxString (wxMenu_GetLabel(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7811,26 +7608,13 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetLabel(_arg0,_arg1,*_arg2); + wxMenu_SetLabel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7864,12 +7648,16 @@ static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenu_GetHelpString(_arg0,_arg1)); + _result = new wxString (wxMenu_GetHelpString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7898,26 +7686,13 @@ static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetHelpString(_arg0,_arg1,*_arg2); + wxMenu_SetHelpString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7958,7 +7733,7 @@ static PyObject *_wrap_wxMenu_UpdateUI(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_UpdateUI(_arg0,_arg1); + wxMenu_UpdateUI(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7988,7 +7763,7 @@ static PyObject *_wrap_wxMenu_Delete(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_Delete(_arg0,_arg1); + _result = (bool )wxMenu_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8025,7 +7800,7 @@ static PyObject *_wrap_wxMenu_DeleteItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_DeleteItem(_arg0,_arg1); + _result = (bool )wxMenu_DeleteItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8063,7 +7838,7 @@ static PyObject *_wrap_wxMenu_Insert(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_Insert(_arg0,_arg1,_arg2); + _result = (bool )wxMenu_Insert(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8092,7 +7867,7 @@ static PyObject *_wrap_wxMenu_Remove(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenu_Remove(_arg0,_arg1); + _result = (wxMenuItem *)wxMenu_Remove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8129,7 +7904,7 @@ static PyObject *_wrap_wxMenu_RemoveItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenu_RemoveItem(_arg0,_arg1); + _result = (wxMenuItem *)wxMenu_RemoveItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8156,7 +7931,7 @@ static PyObject *_wrap_wxMenu_Destroy(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Destroy(_arg0); + wxMenu_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8186,7 +7961,7 @@ static PyObject *_wrap_wxMenu_DestroyId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_DestroyId(_arg0,_arg1); + _result = (bool )wxMenu_DestroyId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8223,7 +7998,7 @@ static PyObject *_wrap_wxMenu_DestroyItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_DestroyItem(_arg0,_arg1); + _result = (bool )wxMenu_DestroyItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8251,7 +8026,7 @@ static PyObject *_wrap_wxMenu_GetMenuItemCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxMenu_GetMenuItemCount(_arg0); + _result = (size_t )wxMenu_GetMenuItemCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8282,7 +8057,7 @@ static PyObject *_wrap_wxMenu_GetMenuItems(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxMenu_GetMenuItems(_arg0); + _result = (PyObject *)wxMenu_GetMenuItems(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8320,7 +8095,7 @@ static PyObject *_wrap_wxMenu_SetEventHandler(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetEventHandler(_arg0,_arg1); + wxMenu_SetEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8349,7 +8124,7 @@ static PyObject *_wrap_wxMenu_GetEventHandler(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxMenu_GetEventHandler(_arg0); + _result = (wxEvtHandler *)wxMenu_GetEventHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8385,7 +8160,7 @@ static PyObject *_wrap_wxMenu_SetInvokingWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetInvokingWindow(_arg0,_arg1); + wxMenu_SetInvokingWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8414,7 +8189,7 @@ static PyObject *_wrap_wxMenu_GetInvokingWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxMenu_GetInvokingWindow(_arg0); + _result = (wxWindow *)wxMenu_GetInvokingWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8442,7 +8217,7 @@ static PyObject *_wrap_wxMenu_GetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMenu_GetStyle(_arg0); + _result = (long )wxMenu_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8470,7 +8245,7 @@ static PyObject *_wrap_wxMenu_IsAttached(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_IsAttached(_arg0); + _result = (bool )wxMenu_IsAttached(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8506,7 +8281,7 @@ static PyObject *_wrap_wxMenu_SetParent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetParent(_arg0,_arg1); + wxMenu_SetParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8535,7 +8310,7 @@ static PyObject *_wrap_wxMenu_GetParent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenu_GetParent(_arg0); + _result = (wxMenu *)wxMenu_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8580,7 +8355,7 @@ static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)new_wxMenuBar(_arg0); + _result = (wxMenuBar *)new_wxMenuBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8624,26 +8399,13 @@ static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_Append(_arg0,_arg1,*_arg2); + _result = (bool )wxMenuBar_Append(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8686,26 +8448,13 @@ static PyObject *_wrap_wxMenuBar_Insert(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_Insert(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxMenuBar_Insert(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8737,7 +8486,7 @@ static PyObject *_wrap_wxMenuBar_GetMenuCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxMenuBar_GetMenuCount(_arg0); + _result = (size_t )wxMenuBar_GetMenuCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8766,7 +8515,7 @@ static PyObject *_wrap_wxMenuBar_GetMenu(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); + _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8805,26 +8554,13 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuBar_Replace(_arg0,_arg1,_arg2,*_arg3); + _result = (wxMenu *)wxMenuBar_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8857,7 +8593,7 @@ static PyObject *_wrap_wxMenuBar_Remove(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuBar_Remove(_arg0,_arg1); + _result = (wxMenu *)wxMenuBar_Remove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8888,7 +8624,7 @@ static PyObject *_wrap_wxMenuBar_EnableTop(PyObject *self, PyObject *args, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_EnableTop(_arg0,_arg1,_arg2); + wxMenuBar_EnableTop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8918,26 +8654,13 @@ static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_SetLabelTop(_arg0,_arg1,*_arg2); + wxMenuBar_SetLabelTop(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8971,12 +8694,16 @@ static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuBar_GetLabelTop(_arg0,_arg1)); + _result = new wxString (wxMenuBar_GetLabelTop(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9005,26 +8732,13 @@ static PyObject *_wrap_wxMenuBar_FindMenu(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuBar_FindMenu(_arg0,*_arg1); + _result = (int )wxMenuBar_FindMenu(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9059,44 +8773,18 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuBar_FindMenuItem(_arg0,*_arg1,*_arg2); + _result = (int )wxMenuBar_FindMenuItem(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9133,7 +8821,7 @@ static PyObject *_wrap_wxMenuBar_FindItemById(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenuBar_FindItemById(_arg0,_arg1); + _result = (wxMenuItem *)wxMenuBar_FindItemById(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9164,7 +8852,7 @@ static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_Enable(_arg0,_arg1,_arg2); + wxMenuBar_Enable(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9196,7 +8884,7 @@ static PyObject *_wrap_wxMenuBar_Check(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_Check(_arg0,_arg1,_arg2); + wxMenuBar_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9226,7 +8914,7 @@ static PyObject *_wrap_wxMenuBar_IsChecked(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_IsChecked(_arg0,_arg1); + _result = (bool )wxMenuBar_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9255,7 +8943,7 @@ static PyObject *_wrap_wxMenuBar_IsEnabled(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_IsEnabled(_arg0,_arg1); + _result = (bool )wxMenuBar_IsEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9284,26 +8972,13 @@ static PyObject *_wrap_wxMenuBar_SetLabel(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_SetLabel(_arg0,_arg1,*_arg2); + wxMenuBar_SetLabel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9337,12 +9012,16 @@ static PyObject *_wrap_wxMenuBar_GetLabel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuBar_GetLabel(_arg0,_arg1)); + _result = new wxString (wxMenuBar_GetLabel(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9371,26 +9050,13 @@ static PyObject *_wrap_wxMenuBar_SetHelpString(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_SetHelpString(_arg0,_arg1,*_arg2); + wxMenuBar_SetHelpString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9424,12 +9090,16 @@ static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuBar_GetHelpString(_arg0,_arg1)); + _result = new wxString (wxMenuBar_GetHelpString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9475,41 +9145,15 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; if (_argo5) { @@ -9521,7 +9165,7 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)new_wxMenuItem(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxMenuItem *)new_wxMenuItem(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9563,7 +9207,7 @@ static PyObject *_wrap_wxMenuItem_GetMenu(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuItem_GetMenu(_arg0); + _result = (wxMenu *)wxMenuItem_GetMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9591,7 +9235,7 @@ static PyObject *_wrap_wxMenuItem_SetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetId(_arg0,_arg1); + wxMenuItem_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9620,7 +9264,7 @@ static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuItem_GetId(_arg0); + _result = (int )wxMenuItem_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9648,7 +9292,7 @@ static PyObject *_wrap_wxMenuItem_IsSeparator(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsSeparator(_arg0); + _result = (bool )wxMenuItem_IsSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9676,26 +9320,13 @@ static PyObject *_wrap_wxMenuItem_SetText(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetText(_arg0,*_arg1); + wxMenuItem_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9728,12 +9359,16 @@ static PyObject *_wrap_wxMenuItem_GetLabel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuItem_GetLabel(_arg0)); + _result = new wxString (wxMenuItem_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9761,13 +9396,17 @@ static PyObject *_wrap_wxMenuItem_GetText(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxMenuItem_GetText(_arg0); + const wxString & _result_ref = wxMenuItem_GetText(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -9794,7 +9433,7 @@ static PyObject *_wrap_wxMenuItem_SetCheckable(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetCheckable(_arg0,_arg1); + wxMenuItem_SetCheckable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9823,7 +9462,7 @@ static PyObject *_wrap_wxMenuItem_IsCheckable(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsCheckable(_arg0); + _result = (bool )wxMenuItem_IsCheckable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9851,7 +9490,7 @@ static PyObject *_wrap_wxMenuItem_IsSubMenu(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsSubMenu(_arg0); + _result = (bool )wxMenuItem_IsSubMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9887,7 +9526,7 @@ static PyObject *_wrap_wxMenuItem_SetSubMenu(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetSubMenu(_arg0,_arg1); + wxMenuItem_SetSubMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9916,7 +9555,7 @@ static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); + _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9946,7 +9585,7 @@ static PyObject *_wrap_wxMenuItem_Enable(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_Enable(_arg0,_arg1); + wxMenuItem_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9975,7 +9614,7 @@ static PyObject *_wrap_wxMenuItem_IsEnabled(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsEnabled(_arg0); + _result = (bool )wxMenuItem_IsEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10005,7 +9644,7 @@ static PyObject *_wrap_wxMenuItem_Check(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_Check(_arg0,_arg1); + wxMenuItem_Check(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10034,7 +9673,7 @@ static PyObject *_wrap_wxMenuItem_IsChecked(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsChecked(_arg0); + _result = (bool )wxMenuItem_IsChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10061,7 +9700,7 @@ static PyObject *_wrap_wxMenuItem_Toggle(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_Toggle(_arg0); + wxMenuItem_Toggle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10090,26 +9729,13 @@ static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetHelp(_arg0,*_arg1); + wxMenuItem_SetHelp(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10142,13 +9768,17 @@ static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxMenuItem_GetHelp(_arg0); + const wxString & _result_ref = wxMenuItem_GetHelp(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -10174,7 +9804,7 @@ static PyObject *_wrap_wxMenuItem_GetAccel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)wxMenuItem_GetAccel(_arg0); + _result = (wxAcceleratorEntry *)wxMenuItem_GetAccel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10216,7 +9846,7 @@ static PyObject *_wrap_wxMenuItem_SetAccel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetAccel(_arg0,_arg1); + wxMenuItem_SetAccel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10236,31 +9866,22 @@ static PyObject *_wrap_wxMenuItem_GetLabelFromText(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetLabelFromText",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuItem::GetLabelFromText(*_arg0)); + _result = new wxString (wxMenuItem::GetLabelFromText(*_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 22372ccfe6..a5990b3ed2 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -92,12 +92,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -149,7 +143,7 @@ static PyObject *_wrap_new_wxNotebookEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -183,7 +177,7 @@ static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebookEvent_GetSelection(_arg0); + _result = (int )wxNotebookEvent_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -211,7 +205,7 @@ static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebookEvent_GetOldSelection(_arg0); + _result = (int )wxNotebookEvent_GetOldSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -239,7 +233,7 @@ static PyObject *_wrap_wxNotebookEvent_SetOldSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookEvent_SetOldSelection(_arg0,_arg1); + wxNotebookEvent_SetOldSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -268,7 +262,7 @@ static PyObject *_wrap_wxNotebookEvent_SetSelection(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookEvent_SetSelection(_arg0,_arg1); + wxNotebookEvent_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -351,7 +345,7 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -377,7 +371,7 @@ static PyObject *_wrap_new_wxPreNotebook(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)new_wxPreNotebook(); + _result = (wxNotebook *)new_wxPreNotebook(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -441,7 +435,7 @@ static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -469,7 +463,7 @@ static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetPageCount(_arg0); + _result = (int )wxNotebook_GetPageCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -498,7 +492,7 @@ static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); + _result = (int )wxNotebook_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +522,7 @@ static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AdvanceSelection(_arg0,_arg1); + wxNotebook_AdvanceSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -557,7 +551,7 @@ static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetSelection(_arg0); + _result = (int )wxNotebook_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -587,26 +581,13 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); + _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -639,12 +620,16 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); + _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -680,7 +665,7 @@ static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetImageList(_arg0,_arg1); + wxNotebook_SetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -717,7 +702,7 @@ static PyObject *_wrap_wxNotebook_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AssignImageList(_arg0,_arg1); + wxNotebook_AssignImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -746,7 +731,7 @@ static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxNotebook_GetImageList(_arg0); + _result = (wxImageList *)wxNotebook_GetImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -775,7 +760,7 @@ static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); + _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -805,7 +790,7 @@ static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); + _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -833,7 +818,7 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetRowCount(_arg0); + _result = (int )wxNotebook_GetRowCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -868,7 +853,7 @@ static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetPageSize(_arg0,*_arg1); + wxNotebook_SetPageSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -904,7 +889,7 @@ static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetPadding(_arg0,*_arg1); + wxNotebook_SetPadding(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -934,7 +919,7 @@ static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); + _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -963,7 +948,7 @@ static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); + _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -991,7 +976,7 @@ static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_DeleteAllPages(_arg0); + _result = (bool )wxNotebook_DeleteAllPages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1031,26 +1016,13 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1096,27 +1068,14 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1149,7 +1108,7 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); + _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1179,7 +1138,7 @@ static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_ResizeChildren(_arg0); + wxNotebook_ResizeChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1234,7 +1193,7 @@ static PyObject *_wrap_new_wxSplitterEvent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); + _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1268,7 +1227,7 @@ static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetSashPosition(_arg0); + _result = (int )wxSplitterEvent_GetSashPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1296,7 +1255,7 @@ static PyObject *_wrap_wxSplitterEvent_GetX(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetX(_arg0); + _result = (int )wxSplitterEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1324,7 +1283,7 @@ static PyObject *_wrap_wxSplitterEvent_GetY(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetY(_arg0); + _result = (int )wxSplitterEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1311,7 @@ static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); + _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1380,7 +1339,7 @@ static PyObject *_wrap_wxSplitterEvent_SetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterEvent_SetSashPosition(_arg0,_arg1); + wxSplitterEvent_SetSashPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1455,7 +1414,7 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1481,7 +1440,7 @@ static PyObject *_wrap_new_wxPreSplitterWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); + _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1545,7 +1504,7 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1573,7 +1532,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1601,7 +1560,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1629,7 +1588,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSplitMode(_arg0,_arg1); + wxSplitterWindow_SetSplitMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1658,7 +1617,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSplitMode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSplitMode(_arg0); + _result = (int )wxSplitterWindow_GetSplitMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1694,7 +1653,7 @@ static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_Initialize(_arg0,_arg1); + wxSplitterWindow_Initialize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1742,7 +1701,7 @@ static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1789,7 +1748,7 @@ static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1826,7 +1785,7 @@ static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); + _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1872,7 +1831,7 @@ static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); + _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1900,7 +1859,7 @@ static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_IsSplit(_arg0); + _result = (bool )wxSplitterWindow_IsSplit(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1928,7 +1887,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSashSize(_arg0,_arg1); + wxSplitterWindow_SetSashSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1957,7 +1916,7 @@ static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetBorderSize(_arg0,_arg1); + wxSplitterWindow_SetBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1986,7 +1945,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSashSize(_arg0); + _result = (int )wxSplitterWindow_GetSashSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2014,7 +1973,7 @@ static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetBorderSize(_arg0); + _result = (int )wxSplitterWindow_GetBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2045,7 +2004,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); + wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2074,7 +2033,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSashPosition(_arg0); + _result = (int )wxSplitterWindow_GetSashPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2102,7 +2061,7 @@ static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); + wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2131,7 +2090,7 @@ static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); + _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp index c485933a06..cf48aeeba1 100644 --- a/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/windows3.cpp @@ -90,12 +90,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPyPopupTransientWindow : public wxPopupTransientWindow { public: @@ -153,7 +147,7 @@ static PyObject *_wrap_new_wxSashEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); + _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -187,7 +181,7 @@ static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetEdge(_arg0,_arg1); + wxSashEvent_SetEdge(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -216,7 +210,7 @@ static PyObject *_wrap_wxSashEvent_GetEdge(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); + _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -251,7 +245,7 @@ static PyObject *_wrap_wxSashEvent_SetDragRect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetDragRect(_arg0,*_arg1); + wxSashEvent_SetDragRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -281,7 +275,7 @@ static PyObject *_wrap_wxSashEvent_GetDragRect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); + _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -310,7 +304,7 @@ static PyObject *_wrap_wxSashEvent_SetDragStatus(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetDragStatus(_arg0,_arg1); + wxSashEvent_SetDragStatus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -339,7 +333,7 @@ static PyObject *_wrap_wxSashEvent_GetDragStatus(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); + _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -413,7 +407,7 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -439,7 +433,7 @@ static PyObject *_wrap_new_wxPreSashWindow(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashWindow *)new_wxPreSashWindow(); + _result = (wxSashWindow *)new_wxPreSashWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -503,7 +497,7 @@ static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -532,7 +526,7 @@ static PyObject *_wrap_wxSashWindow_GetSashVisible(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); + _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -560,7 +554,7 @@ static PyObject *_wrap_wxSashWindow_GetDefaultBorderSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); + _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -589,7 +583,7 @@ static PyObject *_wrap_wxSashWindow_GetEdgeMargin(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); + _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -617,7 +611,7 @@ static PyObject *_wrap_wxSashWindow_GetExtraBorderSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); + _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -645,7 +639,7 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); + _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -673,7 +667,7 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); + _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -701,7 +695,7 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); + _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -729,7 +723,7 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); + _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -758,7 +752,7 @@ static PyObject *_wrap_wxSashWindow_HasBorder(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); + _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -786,7 +780,7 @@ static PyObject *_wrap_wxSashWindow_SetDefaultBorderSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); + wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -815,7 +809,7 @@ static PyObject *_wrap_wxSashWindow_SetExtraBorderSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetExtraBorderSize(_arg0,_arg1); + wxSashWindow_SetExtraBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -844,7 +838,7 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMaximumSizeX(_arg0,_arg1); + wxSashWindow_SetMaximumSizeX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -873,7 +867,7 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMaximumSizeY(_arg0,_arg1); + wxSashWindow_SetMaximumSizeY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -902,7 +896,7 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMinimumSizeX(_arg0,_arg1); + wxSashWindow_SetMinimumSizeX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -931,7 +925,7 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMinimumSizeY(_arg0,_arg1); + wxSashWindow_SetMinimumSizeY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -963,7 +957,7 @@ static PyObject *_wrap_wxSashWindow_SetSashVisible(PyObject *self, PyObject *arg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); + wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -995,7 +989,7 @@ static PyObject *_wrap_wxSashWindow_SetSashBorder(PyObject *self, PyObject *args _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); + wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1033,7 +1027,7 @@ static PyObject *_wrap_new_wxQueryLayoutInfoEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); + _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1067,7 +1061,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1096,7 +1090,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetRequestedLength(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); + _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1124,7 +1118,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1153,7 +1147,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); + _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1188,7 +1182,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); + wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1218,7 +1212,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); + _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1247,7 +1241,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetOrientation(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1276,7 +1270,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetOrientation(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); + _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1304,7 +1298,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetAlignment(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1333,7 +1327,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetAlignment(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); + _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1364,7 @@ static PyObject *_wrap_new_wxCalculateLayoutEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); + _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1404,7 +1398,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); + wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1433,7 +1427,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); + _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1468,7 +1462,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); + wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1498,7 +1492,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); + _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1581,7 +1575,7 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1607,7 +1601,7 @@ static PyObject *_wrap_new_wxPreSashLayoutWindow(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); + _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1671,7 +1665,7 @@ static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1699,7 +1693,7 @@ static PyObject *_wrap_wxSashLayoutWindow_GetAlignment(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); + _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1727,7 +1721,7 @@ static PyObject *_wrap_wxSashLayoutWindow_GetOrientation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); + _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1755,7 +1749,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetAlignment(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetAlignment(_arg0,_arg1); + wxSashLayoutWindow_SetAlignment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1791,7 +1785,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetDefaultSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); + wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1820,7 +1814,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetOrientation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetOrientation(_arg0,_arg1); + wxSashLayoutWindow_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1849,7 +1843,7 @@ static PyObject *_wrap_new_wxLayoutAlgorithm(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); + _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1882,7 +1876,7 @@ static PyObject *_wrap_delete_wxLayoutAlgorithm(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLayoutAlgorithm(_arg0); + delete_wxLayoutAlgorithm(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1929,7 +1923,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutMDIFrame(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1975,7 +1969,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutFrame(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2021,7 +2015,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2075,7 +2069,7 @@ static PyObject *_wrap_new_wxPopupWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); + _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2101,7 +2095,7 @@ static PyObject *_wrap_new_wxPrePopupWindow(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPopupWindow *)new_wxPrePopupWindow(); + _result = (wxPopupWindow *)new_wxPrePopupWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2145,7 +2139,7 @@ static PyObject *_wrap_wxPopupWindow_Create(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); + _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2188,7 +2182,7 @@ static PyObject *_wrap_wxPopupWindow_Position(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupWindow_Position(_arg0,*_arg1,*_arg2); + wxPopupWindow_Position(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2251,7 +2245,7 @@ static PyObject *_wrap_new_wxPopupTransientWindow(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); + _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2277,7 +2271,7 @@ static PyObject *_wrap_new_wxPrePopupTransientWindow(PyObject *self, PyObject *a return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); + _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2320,7 +2314,7 @@ static PyObject *_wrap_wxPopupTransientWindow__setCallbackInfo(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); + wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2357,7 +2351,7 @@ static PyObject *_wrap_wxPopupTransientWindow_Popup(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow_Popup(_arg0,_arg1); + wxPopupTransientWindow_Popup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2385,7 +2379,7 @@ static PyObject *_wrap_wxPopupTransientWindow_Dismiss(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow_Dismiss(_arg0); + wxPopupTransientWindow_Dismiss(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2464,22 +2458,9 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj3) { @@ -2489,7 +2470,7 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTipWindow *)new_wxTipWindow(_arg0,_arg1,_arg2,_arg3); + _result = (wxTipWindow *)new_wxTipWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2534,7 +2515,7 @@ static PyObject *_wrap_wxTipWindow_SetBoundingRect(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTipWindow_SetBoundingRect(_arg0,*_arg1); + wxTipWindow_SetBoundingRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2562,7 +2543,7 @@ static PyObject *_wrap_wxTipWindow_Close(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTipWindow_Close(_arg0); + wxTipWindow_Close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 294413c808..652c1af2a1 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - #include @@ -652,6 +646,7 @@ static wxPyCoreAPI API = { wxPyConstructObject, wxPy_ConvertList, + wxString_in_helper, byte_LIST_helper, int_LIST_helper, long_LIST_helper, @@ -701,7 +696,7 @@ static PyObject *_wrap_ptrcast(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrcast(_arg0,_arg1); + _result = (PyObject *)ptrcast(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -728,7 +723,7 @@ static PyObject *_wrap_ptrvalue(PyObject *self, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); + _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -760,7 +755,7 @@ static PyObject *_wrap_ptrset(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); + _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -788,7 +783,7 @@ static PyObject *_wrap_ptrcreate(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); + _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -813,7 +808,7 @@ static PyObject *_wrap_ptrfree(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrfree(_arg0); + _result = (PyObject *)ptrfree(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -839,7 +834,7 @@ static PyObject *_wrap_ptradd(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptradd(_arg0,_arg1); + _result = (PyObject *)ptradd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -860,7 +855,7 @@ static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - ptrmap(_arg0,_arg1); + ptrmap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -910,7 +905,7 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyApp *)wxGetApp(); + _result = (wxPyApp *)wxGetApp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -933,7 +928,7 @@ static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxApp_CleanUp(); + wxApp_CleanUp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -974,7 +969,7 @@ static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyApp *)new_wxPyApp(); + _result = (wxPyApp *)new_wxPyApp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1007,7 +1002,7 @@ static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyApp(_arg0); + delete_wxPyApp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1036,12 +1031,16 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyApp_GetAppName(_arg0)); + _result = new wxString (wxPyApp_GetAppName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1069,12 +1068,16 @@ static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyApp_GetClassName(_arg0)); + _result = new wxString (wxPyApp_GetClassName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1102,7 +1105,7 @@ static PyObject *_wrap_wxPyApp_GetExitOnFrameDelete(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); + _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1130,7 +1133,7 @@ static PyObject *_wrap_wxPyApp_GetPrintMode(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyApp_GetPrintMode(_arg0); + _result = (int )wxPyApp_GetPrintMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1158,7 +1161,7 @@ static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); + _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1186,12 +1189,16 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyApp_GetVendorName(_arg0)); + _result = new wxString (wxPyApp_GetVendorName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1219,7 +1226,7 @@ static PyObject *_wrap_wxPyApp_GetUseBestVisual(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_GetUseBestVisual(_arg0); + _result = (bool )wxPyApp_GetUseBestVisual(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1246,7 +1253,7 @@ static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_Dispatch(_arg0); + wxPyApp_Dispatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1274,7 +1281,7 @@ static PyObject *_wrap_wxPyApp_ExitMainLoop(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_ExitMainLoop(_arg0); + wxPyApp_ExitMainLoop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1303,7 +1310,7 @@ static PyObject *_wrap_wxPyApp_Initialized(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_Initialized(_arg0); + _result = (bool )wxPyApp_Initialized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1338,7 @@ static PyObject *_wrap_wxPyApp_MainLoop(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyApp_MainLoop(_arg0); + _result = (int )wxPyApp_MainLoop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1359,7 +1366,7 @@ static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_Pending(_arg0); + _result = (bool )wxPyApp_Pending(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1387,7 +1394,7 @@ static PyObject *_wrap_wxPyApp_ProcessIdle(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_ProcessIdle(_arg0); + _result = (bool )wxPyApp_ProcessIdle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1415,26 +1422,13 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetAppName(_arg0,*_arg1); + wxPyApp_SetAppName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1467,26 +1461,13 @@ static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetClassName(_arg0,*_arg1); + wxPyApp_SetClassName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1521,7 +1502,7 @@ static PyObject *_wrap_wxPyApp_SetExitOnFrameDelete(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); + wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1550,7 +1531,7 @@ static PyObject *_wrap_wxPyApp_SetPrintMode(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetPrintMode(_arg0,_arg1); + wxPyApp_SetPrintMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1587,7 +1568,7 @@ static PyObject *_wrap_wxPyApp_SetTopWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetTopWindow(_arg0,_arg1); + wxPyApp_SetTopWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1616,26 +1597,13 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetVendorName(_arg0,*_arg1); + wxPyApp_SetVendorName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1670,7 +1638,7 @@ static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetUseBestVisual(_arg0,_arg1); + wxPyApp_SetUseBestVisual(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1701,7 +1669,7 @@ static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1)); + _result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2634,7 +2602,12 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION )); PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER )); PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER )); +#if wxUSE_UNICODE + wxString tempStr(wxVERSION_STRING); + PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromUnicode(tempStr.c_str(), tempStr.Len())); +#else PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING)); +#endif { diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index bf1d3402f3..5d13c8f246 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -30,6 +30,12 @@ #endif +//---------------------------------------------------------------------- + +#if PYTHON_API_VERSION <= 1007 && wxUSE_UNICODE +#error Python must support Unicode to use wxWindows Unicode +#endif + //---------------------------------------------------------------------- #ifdef __WXGTK__ @@ -119,6 +125,39 @@ int wxPyApp::MainLoop() { //--------------------------------------------------------------------- //---------------------------------------------------------------------- +#if wxUSE_UNICODE +// TODO: Is this really the right way to do these???? +static char* copyUniString(const wxChar *s) +{ + if (s == NULL) s = wxT(""); + wxString tmpStr = wxString(s); + char *news = new char[tmpStr.Len()+1]; + for (unsigned int i=0; iargc = argc; wxPythonApp->argv = argv; @@ -271,6 +331,8 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) #endif PyDict_SetItemString(wxPython_dict, "wxPlatform", PyString_FromString(wxPlatform)); + PyDict_SetItemString(wxPython_dict, "wxUSE_UNICODE", PyInt_FromLong(wxUSE_UNICODE)); + Py_INCREF(Py_None); return Py_None; @@ -310,6 +372,28 @@ PyObject* wxPyClassExists(const char* className) { } +#if wxUSE_UNICODE +void unicodeToChar(const wxString *src, char *dest) +{ + for (unsigned int i=0; iLen(); i++) { + dest[i] = (char)(*src)[i]; + } + dest[i] = '\0'; +} +PyObject* wxPyClassExistsUnicode(const wxString *className) { + if (!className->Len()) + return NULL; + char buff[64]; // should always be big enough... + char *nameBuf = new char[className->Len()+1]; + unicodeToChar(className, nameBuf); + sprintf(buff, "%sPtr", nameBuf); + PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff); + delete [] nameBuf; + return classobj; // returns NULL if not found +} +#endif + + PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) { PyObject* target = NULL; bool isEvtHandler = FALSE; @@ -328,6 +412,7 @@ PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) { } } + // TODO: unicode fix if (! target) { // Otherwise make it the old fashioned way by making a // new shadow object and putting this pointer in it. @@ -860,8 +945,18 @@ void wxPyCallback::EventThunker(wxEvent& event) { arg = ((wxPyEvent*)&event)->GetSelf(); else if (className == "wxPyCommandEvent") arg = ((wxPyCommandEvent*)&event)->GetSelf(); - else - arg = wxPyConstructObject((void*)&event, className); + else { + +// TODO: get rid of this ifdef by changing wxPyConstructObject to take a wxString +#if wxUSE_UNICODE + char *classNameAsChrStr = new char[className.Len()+1]; + unicodeToChar(&className, classNameAsChrStr); + arg = wxPyConstructObject((void*)&event, classNameAsChrStr); + delete [] classNameAsChrStr; +#else + arg = wxPyConstructObject((void*)&event, className); +#endif + } tuple = PyTuple_New(1); PyTuple_SET_ITEM(tuple, 0, arg); @@ -1225,7 +1320,50 @@ long wxPyGetWinHandle(wxWindow* win) { //---------------------------------------------------------------------- // Some helper functions for typemaps in my_typemaps.i, so they won't be -// included in every file... +// included in every file over and over again... + +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "String type required"; +#endif + + +wxString* wxString_in_helper(PyObject* source) { + wxString* target; +#if PYTHON_API_VERSION >= 1009 // Have Python unicode API + if (!PyString_Check(source) && !PyUnicode_Check(source)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } +#if wxUSE_UNICODE + if (PyUnicode_Check(source)) { + target = new wxString(PyUnicode_AS_UNICODE(source)); + } else { + // It is a string, transform to unicode + PyObject *tempUniStr = PyObject_Unicode(source); + target = new wxString(PyUnicode_AS_UNICODE(tempUniStr)); + Py_DECREF(tempUniStr); + } +#else + char* tmpPtr; int tmpSize; + if (PyString_AsStringAndSize(source, &tmpPtr, &tmpSize) == -1) { + PyErr_SetString(PyExc_TypeError, "Unable to convert string"); + return NULL; + } + target = new wxString(tmpPtr, tmpSize); +#endif // wxUSE_UNICODE + +#else // No Python unicode API (1.5.2) + if (!PyString_Check(source)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + target = new wxString(PyString_AS_STRING(source), PyString_GET_SIZE(source)); +#endif + return target; +} + byte* byte_LIST_helper(PyObject* source) { @@ -1485,7 +1623,13 @@ wxString* wxString_LIST_helper(PyObject* source) { int length; if (PyString_AsStringAndSize(o, &buff, &length) == -1) return NULL; +#if wxUSE_UNICODE // TODO: unicode fix. this is wrong! + wxChar *uniBuff = wCharFromCStr(buff); + temp[x] = wxString(uniBuff, length); + delete [] uniBuff; +#else temp[x] = wxString(buff, length); +#endif //wxUSE_UNICODE #else if (! PyString_Check(o)) { PyErr_SetString(PyExc_TypeError, "Expected a list of strings."); @@ -1754,9 +1898,22 @@ bool wxColour_helper(PyObject* source, wxColour** obj) { wxString spec = PyString_AS_STRING(source); if (spec[0U] == '#' && spec.Length() == 7) { // It's #RRGGBB char* junk; +#if wxUSE_UNICODE // TODO: unicode fix. + // This ifdef can be removed by using wxString methods to + // convert to long instead of strtol + char *tmpAsChar = new char[spec.Len()+1]; + unicodeToChar(&spec.Mid(1,2), tmpAsChar); + int red = strtol(tmpAsChar, &junk, 16); + unicodeToChar(&spec.Mid(3,2), tmpAsChar); + int green = strtol(tmpAsChar, &junk, 16); + unicodeToChar(&spec.Mid(5,2), tmpAsChar); + int blue = strtol(tmpAsChar, &junk, 16); + delete [] tmpAsChar; +#else int red = strtol(spec.Mid(1,2), &junk, 16); int green = strtol(spec.Mid(3,2), &junk, 16); int blue = strtol(spec.Mid(5,2), &junk, 16); +#endif **obj = wxColour(red, green, blue); return TRUE; } @@ -1778,7 +1935,11 @@ PyObject* wxArrayString2PyList_helper(const wxArrayString& arr) { PyObject* list = PyList_New(0); for (size_t i=0; i < arr.GetCount(); i++) { - PyObject* str = PyString_FromString(arr[i].c_str()); +#if wxUSE_UNICODE + PyObject* str = PyUnicode_FromUnicode(arr[i].c_str(), arr[i].Len()); +#else + PyObject* str = PyString_FromStringAndSize(arr[i].c_str(), arr[i].Len()); +#endif PyList_Append(list, str); Py_DECREF(str); } diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index a39d69429c..eef0128333 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -79,6 +79,8 @@ void wxPyEndBlockThreads(); //---------------------------------------------------------------------- // These are helpers used by the typemaps +wxString* wxString_in_helper(PyObject* source); + byte* byte_LIST_helper(PyObject* source); int* int_LIST_helper(PyObject* source); long* long_LIST_helper(PyObject* source); @@ -218,6 +220,8 @@ struct wxPyCoreAPI { PyObject* (*p_wxPyConstructObject)(void *, const char *, int); PyObject* (*p_wxPy_ConvertList)(wxListBase* list, const char* className); + wxString* (*p_wxString_in_helper)(PyObject* source); + byte* (*p_byte_LIST_helper)(PyObject* source); int* (*p_int_LIST_helper)(PyObject* source); long* (*p_long_LIST_helper)(PyObject* source); @@ -802,7 +806,7 @@ public: void CBNAME(const wxString& a); \ void base_##CBNAME(const wxString& a); - +// TODO: unicode fix #define IMP_PYCALLBACK__STRING(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(const wxString& a) { \ bool found; \ @@ -823,7 +827,7 @@ public: bool CBNAME(const wxString& a); \ bool base_##CBNAME(const wxString& a); - +// TODO: unicode fix #define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \ bool CLASS::CBNAME(const wxString& a) { \ bool rval=FALSE; \ @@ -844,7 +848,8 @@ public: #define DEC_PYCALLBACK_BOOL_STRING_pure(CBNAME) \ bool CBNAME(const wxString& a); - \ + +// TODO: unicode fix #define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \ bool CLASS::CBNAME(const wxString& a) { \ bool rval=FALSE; \ @@ -860,6 +865,7 @@ public: #define DEC_PYCALLBACK_STRING_STRING_pure(CBNAME) \ wxString CBNAME(const wxString& a); \ +// TODO: unicode fix #define IMP_PYCALLBACK_STRING_STRING_pure(CLASS, PCLASS, CBNAME) \ wxString CLASS::CBNAME(const wxString& a) { \ wxString rval; \ @@ -882,6 +888,7 @@ public: #define DEC_PYCALLBACK_STRING_STRINGINT_pure(CBNAME) \ wxString CBNAME(const wxString& a,int b); \ +// TODO: unicode fix #define IMP_PYCALLBACK_STRING_STRINGINT_pure(CLASS, PCLASS, CBNAME) \ wxString CLASS::CBNAME(const wxString& a,int b) { \ wxString rval; \ @@ -905,7 +912,7 @@ public: bool CBNAME(const wxString& a, const wxString& b); \ bool base_##CBNAME(const wxString& a, const wxString& b); - +// TODO: unicode fix #define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \ bool CLASS::CBNAME(const wxString& a, const wxString& b) { \ bool rval=FALSE; \ @@ -929,7 +936,7 @@ public: wxString CBNAME(); \ wxString base_##CBNAME(); - +// TODO: unicode fix #define IMP_PYCALLBACK_STRING_(CLASS, PCLASS, CBNAME) \ wxString CLASS::CBNAME() { \ wxString rval; \ @@ -958,7 +965,7 @@ public: #define DEC_PYCALLBACK_STRING__pure(CBNAME) \ wxString CBNAME(); - +// TODO: unicode fix #define IMP_PYCALLBACK_STRING__pure(CLASS, PCLASS, CBNAME) \ wxString CLASS::CBNAME() { \ wxString rval; \ @@ -1003,7 +1010,6 @@ public: #define IMP_PYCALLBACK__CELLINTINT(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxHtmlCell *cell, wxCoord x, wxCoord y) { \ - wxString rval; \ bool found; \ wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ @@ -1162,6 +1168,7 @@ public: #define DEC_PYCALLBACK_FSF_FSSTRING_pure(CBNAME) \ wxFSFile* CBNAME(wxFileSystem& fs, const wxString& location); \ +// TODO: unicode fix #define IMP_PYCALLBACK_FSF_FSSTRING_pure(CLASS, PCLASS, CBNAME) \ wxFSFile* CLASS::CBNAME(wxFileSystem& a,const wxString& b) { \ wxPyBeginBlockThreads(); \ @@ -1225,7 +1232,7 @@ public: #define DEC_PYCALLBACK_BOOL_INTINTSTR_pure(CBNAME) \ bool CBNAME(int a, int b, const wxString& c); - +// TODO: unicode fix #define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \ bool CLASS::CBNAME(int a, int b, const wxString& c) { \ bool rval=FALSE; \ @@ -1371,7 +1378,7 @@ public: wxString CBNAME(long a, long b) const; \ wxString base_##CBNAME(long a, long b)const ; - +// TODO: unicode fix #define IMP_PYCALLBACK_STRING_LONGLONG(CLASS, PCLASS, CBNAME) \ wxString CLASS::CBNAME(long a, long b) const { \ wxString rval; \ diff --git a/wxPython/src/htmlhelp.i b/wxPython/src/htmlhelp.i index 871da59588..b9c9bee5e1 100644 --- a/wxPython/src/htmlhelp.i +++ b/wxPython/src/htmlhelp.i @@ -39,6 +39,15 @@ %extern utils.i %extern html.i +// #ifdef wxUSE_UNICODE +// %typemap(python, memberin) wxChar* { +// if ($target) delete [] $target; +// wxString *tempStr = new wxString($source); +// $target = new wxChar[tempStr->Len()+1]; +// memcpy($target, tempStr->c_str(), (sizeof(wxChar)*tempStr->Len())+sizeof(wxChar)); +// delete tempStr; +// } +// #endif //--------------------------------------------------------------------------- @@ -67,11 +76,13 @@ public: struct wxHtmlContentsItem { +%readonly short int m_Level; int m_ID; - char* m_Name; - char* m_Page; + wxChar* m_Name; + wxChar* m_Page; wxHtmlBookRecord *m_Book; +%readwrite }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 9ef4364b59..bae3d066b9 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -35,7 +35,7 @@ class wxObject { public: %addmethods { - const char* GetClassName() { + wxString GetClassName() { return self->GetClassInfo()->GetClassName(); } @@ -357,8 +357,9 @@ bool wxYieldIfNeeded(); void wxEnableTopLevelWindows(bool enable); %inline %{ - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; + wxString wxGetResource(const wxString& section, const wxString& entry, + const wxString& file = wxEmptyString) { + wxChar * retval; wxGetResource(section, entry, &retval, file); return retval; } diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 1e01336806..589c8c9546 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -53,14 +53,25 @@ //--------------------------------------------------------------------------- // Dialog Functions -wxString wxFileSelector(char* message, - char* default_path = NULL, - char* default_filename = NULL, - char* default_extension = NULL, - char* wildcard = "*.*", +#ifdef wxUSE_UNICODE +wxString wxFileSelector(const wxChar* message = wxFileSelectorPromptStr, + const wxChar* default_path = NULL, + const wxChar* default_filename = NULL, + const wxChar* default_extension = NULL, + const wxChar* wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, wxWindow *parent = NULL, int x = -1, int y = -1); +#else +wxString wxFileSelector(const char* message = wxFileSelectorPromptStr, + const char* default_path = NULL, + const char* default_filename = NULL, + const char* default_extension = NULL, + const char* wildcard = wxFileSelectorDefaultWildcardStr, + int flags = 0, + wxWindow *parent = NULL, + int x = -1, int y = -1); +#endif wxString wxGetTextFromUser(const wxString& message, const wxString& caption = wxEmptyString, @@ -574,7 +585,7 @@ public: static bool IsEnabled(); static bool EnableLogging(bool doIt = TRUE); - static void OnLog(wxLogLevel level, const char *szString, int t=0); + static void OnLog(wxLogLevel level, const wxString& szString, int t=0); virtual void Flush(); bool HasPendingMessages() const; @@ -600,7 +611,7 @@ public: bool GetVerbose() const { return m_bVerbose; } static wxTraceMask GetTraceMask(); - static bool IsAllowedTraceMask(const char *mask); + static bool IsAllowedTraceMask(const wxString& mask); // static void TimeStamp(wxString *str); %addmethods { @@ -637,7 +648,7 @@ class wxLogWindow : public wxLog { public: wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL) - const char *szTitle, // the title of the frame + const wxString& szTitle, // the title of the frame bool bShow = TRUE, // show window immediately? bool bPassToOld = TRUE); // pass log messages to the old target? @@ -645,7 +656,7 @@ public: wxFrame *GetFrame() const; wxLog *GetOldLog() const; bool IsPassingMessages() const; - void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } + void PassMessages(bool bDoPass); }; @@ -669,16 +680,16 @@ public: unsigned long wxSysErrorCode(); -const char* wxSysErrorMsg(unsigned long nErrCode = 0); -void wxLogFatalError(const char *szFormat); -void wxLogError(const char *szFormat); -void wxLogWarning(const char *szFormat); -void wxLogMessage(const char *szFormat); -void wxLogInfo(const char *szFormat); -void wxLogVerbose(const char *szFormat); -void wxLogStatus(const char *szFormat); -%name(wxLogStatusFrame)void wxLogStatus(wxFrame *pFrame, const char *szFormat); -void wxLogSysError(const char *szFormat); +const wxString wxSysErrorMsg(unsigned long nErrCode = 0); +void wxLogFatalError(const wxString& szFormat); +void wxLogError(const wxString& szFormat); +void wxLogWarning(const wxString& szFormat); +void wxLogMessage(const wxString& szFormat); +void wxLogInfo(const wxString& szFormat); +void wxLogVerbose(const wxString& szFormat); +void wxLogStatus(const wxString& szFormat); +%name(wxLogStatusFrame)void wxLogStatus(wxFrame *pFrame, const wxString& szFormat); +void wxLogSysError(const wxString& szFormat); %{ @@ -691,7 +702,7 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DoLog"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); // TODO: unicode fix wxPyEndBlockThreads(); if (! found) wxLog::DoLog(level, szString, t); @@ -701,7 +712,7 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); // TODO: unicode fix wxPyEndBlockThreads(); if (! found) wxLog::DoLogString(szString, t); @@ -1061,8 +1072,13 @@ public: %addmethods { PyObject* GetMimeType() { wxString str; - if (self->GetMimeType(&str)) - return PyString_FromString(str.c_str()); + if (self->GetMimeType(&str)) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } @@ -1109,7 +1125,11 @@ public: PyObject* tuple = PyTuple_New(3); PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon), "wxIcon", TRUE)); - PyTuple_SetItem(tuple, 1, PyString_FromString(iconFile.c_str())); +#if wxUSE_UNICODE + PyTuple_SetItem(tuple, 1, PyUnicode_FromUnicode(iconFile.c_str(), iconFile.Len())); +#else + PyTuple_SetItem(tuple, 1, PyString_FromStringAndSize(iconFile.c_str(), iconFile.Len())); +#endif PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex)); wxPyEndBlockThreads(); return tuple; @@ -1123,9 +1143,13 @@ public: // get a brief file type description ("*.txt" => "text document") PyObject* GetDescription() { wxString str; - if (self->GetDescription(&str)) - return PyString_FromString(str.c_str()); - else + if (self->GetDescription(&str)) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } } @@ -1136,9 +1160,13 @@ public: PyObject* GetOpenCommand(const wxString& filename, const wxString& mimetype=wxEmptyString) { wxString str; - if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) - return PyString_FromString(str.c_str()); - else + if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } } @@ -1149,9 +1177,13 @@ public: PyObject* GetPrintCommand(const wxString& filename, const wxString& mimetype=wxEmptyString) { wxString str; - if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) - return PyString_FromString(str.c_str()); - else + if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } } diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp index f0d0543fd7..2e3c9289f7 100644 --- a/wxPython/src/msw/calendar.cpp +++ b/wxPython/src/msw/calendar.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -141,7 +135,7 @@ static PyObject *_wrap_new_wxCalendarDateAttr(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateAttr *)new_wxCalendarDateAttr(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttr(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -177,7 +171,7 @@ static PyObject *_wrap_new_wxCalendarDateAttrBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateAttr *)new_wxCalendarDateAttrBorder(_arg0,*_arg1); + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttrBorder(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -218,7 +212,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetTextColour(_arg0,*_arg1); + wxCalendarDateAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -254,7 +248,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetBackgroundColour(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetBackgroundColour(_arg0,*_arg1); + wxCalendarDateAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -290,7 +284,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetBorderColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetBorderColour(_arg0,*_arg1); + wxCalendarDateAttr_SetBorderColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -327,7 +321,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetFont(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetFont(_arg0,*_arg1); + wxCalendarDateAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -356,7 +350,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetBorder(_arg0,_arg1); + wxCalendarDateAttr_SetBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -387,7 +381,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetHoliday(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarDateAttr_SetHoliday(_arg0,_arg1); + wxCalendarDateAttr_SetHoliday(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -416,7 +410,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasTextColour(_arg0); + _result = (bool )wxCalendarDateAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -444,7 +438,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasBackgroundColour(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasBackgroundColour(_arg0); + _result = (bool )wxCalendarDateAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -472,7 +466,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasBorderColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasBorderColour(_arg0); + _result = (bool )wxCalendarDateAttr_HasBorderColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -500,7 +494,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasFont(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasFont(_arg0); + _result = (bool )wxCalendarDateAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +522,7 @@ static PyObject *_wrap_wxCalendarDateAttr_HasBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_HasBorder(_arg0); + _result = (bool )wxCalendarDateAttr_HasBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -556,7 +550,7 @@ static PyObject *_wrap_wxCalendarDateAttr_IsHoliday(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarDateAttr_IsHoliday(_arg0); + _result = (bool )wxCalendarDateAttr_IsHoliday(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -585,7 +579,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarDateAttr_GetTextColour(_arg0)); + _result = new wxColour (wxCalendarDateAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -615,7 +609,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBackgroundColour(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarDateAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxCalendarDateAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -645,7 +639,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBorderColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarDateAttr_GetBorderColour(_arg0)); + _result = new wxColour (wxCalendarDateAttr_GetBorderColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -675,7 +669,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetFont(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxCalendarDateAttr_GetFont(_arg0)); + _result = new wxFont (wxCalendarDateAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -704,7 +698,7 @@ static PyObject *_wrap_wxCalendarDateAttr_GetBorder(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateBorder )wxCalendarDateAttr_GetBorder(_arg0); + _result = (wxCalendarDateBorder )wxCalendarDateAttr_GetBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -758,7 +752,7 @@ static PyObject *_wrap_new_wxCalendarEvent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarEvent *)new_wxCalendarEvent(_arg0,_arg1); + _result = (wxCalendarEvent *)new_wxCalendarEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -793,7 +787,7 @@ static PyObject *_wrap_wxCalendarEvent_GetDate(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarEvent_GetDate(_arg0); + const wxDateTime & _result_ref = wxCalendarEvent_GetDate(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -828,7 +822,7 @@ static PyObject *_wrap_wxCalendarEvent_GetWeekDay(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::WeekDay )wxCalendarEvent_GetWeekDay(_arg0); + _result = (wxDateTime::WeekDay )wxCalendarEvent_GetWeekDay(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -919,7 +913,7 @@ static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarCtrl *)new_wxCalendarCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxCalendarCtrl *)new_wxCalendarCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -945,7 +939,7 @@ static PyObject *_wrap_new_wxPreCalendarCtrl(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarCtrl *)new_wxPreCalendarCtrl(); + _result = (wxCalendarCtrl *)new_wxPreCalendarCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1018,7 +1012,7 @@ static PyObject *_wrap_wxCalendarCtrl_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxCalendarCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1054,7 +1048,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetDate(_arg0,*_arg1); + wxCalendarCtrl_SetDate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1084,7 +1078,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetDate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarCtrl_GetDate(_arg0); + const wxDateTime & _result_ref = wxCalendarCtrl_GetDate(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1128,7 +1122,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetLowerDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_SetLowerDateLimit(_arg0,*_arg1); + _result = (bool )wxCalendarCtrl_SetLowerDateLimit(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1157,7 +1151,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetLowerDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarCtrl_GetLowerDateLimit(_arg0); + const wxDateTime & _result_ref = wxCalendarCtrl_GetLowerDateLimit(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1201,7 +1195,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetUpperDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_SetUpperDateLimit(_arg0,*_arg1); + _result = (bool )wxCalendarCtrl_SetUpperDateLimit(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1230,7 +1224,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetUpperDateLimit(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDateTime & _result_ref = wxCalendarCtrl_GetUpperDateLimit(_arg0); + const wxDateTime & _result_ref = wxCalendarCtrl_GetUpperDateLimit(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1283,7 +1277,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetDateRange(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_SetDateRange(_arg0,*_arg1,*_arg2); + _result = (bool )wxCalendarCtrl_SetDateRange(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1313,7 +1307,7 @@ static PyObject *_wrap_wxCalendarCtrl_EnableYearChange(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_EnableYearChange(_arg0,_arg1); + wxCalendarCtrl_EnableYearChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1344,7 +1338,7 @@ static PyObject *_wrap_wxCalendarCtrl_EnableMonthChange(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_EnableMonthChange(_arg0,_arg1); + wxCalendarCtrl_EnableMonthChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1375,7 +1369,7 @@ static PyObject *_wrap_wxCalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_EnableHolidayDisplay(_arg0,_arg1); + wxCalendarCtrl_EnableHolidayDisplay(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1419,7 +1413,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHeaderColours(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHeaderColours(_arg0,*_arg1,*_arg2); + wxCalendarCtrl_SetHeaderColours(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1449,7 +1443,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourFg(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHeaderColourFg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHeaderColourFg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1473,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourBg(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHeaderColourBg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHeaderColourBg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1523,7 +1517,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHighlightColours(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHighlightColours(_arg0,*_arg1,*_arg2); + wxCalendarCtrl_SetHighlightColours(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1553,7 +1547,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourFg(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHighlightColourFg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHighlightColourFg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1583,7 +1577,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourBg(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHighlightColourBg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHighlightColourBg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1627,7 +1621,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHolidayColours(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHolidayColours(_arg0,*_arg1,*_arg2); + wxCalendarCtrl_SetHolidayColours(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1657,7 +1651,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourFg(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHolidayColourFg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHolidayColourFg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1687,7 +1681,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourBg(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxCalendarCtrl_GetHolidayColourBg(_arg0)); + _result = new wxColour (wxCalendarCtrl_GetHolidayColourBg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1718,7 +1712,7 @@ static PyObject *_wrap_wxCalendarCtrl_GetAttr(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarDateAttr *)wxCalendarCtrl_GetAttr(_arg0,_arg1); + _result = (wxCalendarDateAttr *)wxCalendarCtrl_GetAttr(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1761,7 +1755,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetAttr(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetAttr(_arg0,_arg1,_arg2); + wxCalendarCtrl_SetAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1790,7 +1784,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetHoliday(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_SetHoliday(_arg0,_arg1); + wxCalendarCtrl_SetHoliday(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1819,7 +1813,7 @@ static PyObject *_wrap_wxCalendarCtrl_ResetAttr(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalendarCtrl_ResetAttr(_arg0,_arg1); + wxCalendarCtrl_ResetAttr(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1874,7 +1868,7 @@ static PyObject *_wrap_wxCalendarCtrl_HitTest(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalendarHitTestResult )wxCalendarCtrl_HitTest(_arg0,*_arg1,_arg2,_arg3); + _result = (wxCalendarHitTestResult )wxCalendarCtrl_HitTest(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1905,7 +1899,7 @@ static PyObject *_wrap_wxCalendarCtrl_Enable(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_Enable(_arg0,_arg1); + _result = (bool )wxCalendarCtrl_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1936,7 +1930,7 @@ static PyObject *_wrap_wxCalendarCtrl_Show(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCalendarCtrl_Show(_arg0,_arg1); + _result = (bool )wxCalendarCtrl_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index 45bffb432b..493610c844 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif // An alternate constructor... wxDataFormat* wxCustomDataFormat(const wxString &id) { return new wxDataFormat(id); @@ -327,26 +321,13 @@ static PyObject *_wrap_wxCustomDataFormat(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCustomDataFormat",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataFormat *)wxCustomDataFormat(*_arg0); + _result = (wxDataFormat *)wxCustomDataFormat(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -405,7 +386,7 @@ static PyObject *_wrap_wxIsDragResultOk(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIsDragResultOk(_arg0); + _result = (bool )wxIsDragResultOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -426,7 +407,7 @@ static PyObject *_wrap_new_wxDataFormat(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataFormat *)new_wxDataFormat(_arg0); + _result = (wxDataFormat *)new_wxDataFormat(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -459,7 +440,7 @@ static PyObject *_wrap_delete_wxDataFormat(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDataFormat(_arg0); + delete_wxDataFormat(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -488,7 +469,7 @@ static PyObject *_wrap_wxDataFormat_SetType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataFormat_SetType(_arg0,_arg1); + wxDataFormat_SetType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -517,7 +498,7 @@ static PyObject *_wrap_wxDataFormat_GetType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataFormatId )wxDataFormat_GetType(_arg0); + _result = (wxDataFormatId )wxDataFormat_GetType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -545,12 +526,16 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDataFormat_GetId(_arg0)); + _result = new wxString (wxDataFormat_GetId(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -562,7 +547,7 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxDataFormat_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDataFormat * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","format", NULL }; @@ -578,7 +563,7 @@ static PyObject *_wrap_wxDataFormat_SetId(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataFormat_SetId(_arg0,_arg1); + wxDataFormat_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -606,7 +591,7 @@ static PyObject *_wrap_delete_wxDataObject(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDataObject(_arg0); + delete_wxDataObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -637,7 +622,7 @@ static PyObject *_wrap_wxDataObject_GetPreferredFormat(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDataFormat (wxDataObject_GetPreferredFormat(_arg0,_arg1)); + _result = new wxDataFormat (wxDataObject_GetPreferredFormat(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -667,7 +652,7 @@ static PyObject *_wrap_wxDataObject_GetFormatCount(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxDataObject_GetFormatCount(_arg0,_arg1); + _result = (size_t )wxDataObject_GetFormatCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -704,7 +689,7 @@ static PyObject *_wrap_wxDataObject_GetAllFormats(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataObject_GetAllFormats(_arg0,_arg1,_arg2); + wxDataObject_GetAllFormats(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -742,7 +727,7 @@ static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); + _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -788,7 +773,7 @@ static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); + _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -835,7 +820,7 @@ static PyObject *_wrap_wxDataObject_SetData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_SetData(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxDataObject_SetData(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -872,7 +857,7 @@ static PyObject *_wrap_wxDataObject_IsSupportedFormat(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_IsSupportedFormat(_arg0,*_arg1); + _result = (bool )wxDataObject_IsSupportedFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -909,7 +894,7 @@ static PyObject *_wrap_new_wxDataObjectSimple(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObjectSimple *)new_wxDataObjectSimple(*_arg0); + _result = (wxDataObjectSimple *)new_wxDataObjectSimple(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -944,7 +929,7 @@ static PyObject *_wrap_wxDataObjectSimple_GetFormat(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxDataFormat & _result_ref = wxDataObjectSimple_GetFormat(_arg0); + const wxDataFormat & _result_ref = wxDataObjectSimple_GetFormat(_arg0); _result = (wxDataFormat *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -987,7 +972,7 @@ static PyObject *_wrap_wxDataObjectSimple_SetFormat(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataObjectSimple_SetFormat(_arg0,*_arg1); + wxDataObjectSimple_SetFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1033,7 +1018,7 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDataObjectSimple *)new_wxPyDataObjectSimple(*_arg0); + _result = (wxPyDataObjectSimple *)new_wxPyDataObjectSimple(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1076,7 +1061,7 @@ static PyObject *_wrap_wxPyDataObjectSimple__setCallbackInfo(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDataObjectSimple__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDataObjectSimple__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1105,7 +1090,7 @@ static PyObject *_wrap_new_wxDataObjectComposite(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObjectComposite *)new_wxDataObjectComposite(); + _result = (wxDataObjectComposite *)new_wxDataObjectComposite(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1148,7 +1133,7 @@ static PyObject *_wrap_wxDataObjectComposite_Add(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataObjectComposite_Add(_arg0,_arg1,_arg2); + wxDataObjectComposite_Add(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1187,26 +1172,13 @@ static PyObject *_wrap_new_wxTextDataObject(PyObject *self, PyObject *args, PyOb return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextDataObject *)new_wxTextDataObject(*_arg0); + _result = (wxTextDataObject *)new_wxTextDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1244,7 +1216,7 @@ static PyObject *_wrap_wxTextDataObject_GetTextLength(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTextDataObject_GetTextLength(_arg0); + _result = (size_t )wxTextDataObject_GetTextLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1272,12 +1244,16 @@ static PyObject *_wrap_wxTextDataObject_GetText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextDataObject_GetText(_arg0)); + _result = new wxString (wxTextDataObject_GetText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1305,26 +1281,13 @@ static PyObject *_wrap_wxTextDataObject_SetText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextDataObject_SetText(_arg0,*_arg1); + wxTextDataObject_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1375,26 +1338,13 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTextDataObject *)new_wxPyTextDataObject(*_arg0); + _result = (wxPyTextDataObject *)new_wxPyTextDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1441,7 +1391,7 @@ static PyObject *_wrap_wxPyTextDataObject__setCallbackInfo(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTextDataObject__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyTextDataObject__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1487,7 +1437,7 @@ static PyObject *_wrap_new_wxBitmapDataObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapDataObject *)new_wxBitmapDataObject(*_arg0); + _result = (wxBitmapDataObject *)new_wxBitmapDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1522,7 +1472,7 @@ static PyObject *_wrap_wxBitmapDataObject_GetBitmap(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapDataObject_GetBitmap(_arg0)); + _result = new wxBitmap (wxBitmapDataObject_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1559,7 +1509,7 @@ static PyObject *_wrap_wxBitmapDataObject_SetBitmap(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapDataObject_SetBitmap(_arg0,*_arg1); + wxBitmapDataObject_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1613,7 +1563,7 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyBitmapDataObject *)new_wxPyBitmapDataObject(*_arg0); + _result = (wxPyBitmapDataObject *)new_wxPyBitmapDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1656,7 +1606,7 @@ static PyObject *_wrap_wxPyBitmapDataObject__setCallbackInfo(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyBitmapDataObject__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyBitmapDataObject__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1693,7 +1643,7 @@ static PyObject *_wrap_new_wxFileDataObject(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileDataObject *)new_wxFileDataObject(); + _result = (wxFileDataObject *)new_wxFileDataObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1730,7 +1680,7 @@ static PyObject *_wrap_wxFileDataObject_GetFilenames(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileDataObject_GetFilenames(_arg0); + _result = (PyObject *)wxFileDataObject_GetFilenames(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,26 +1710,13 @@ static PyObject *_wrap_wxFileDataObject_AddFile(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDataObject_AddFile(_arg0,*_arg1); + wxFileDataObject_AddFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1829,7 +1766,7 @@ static PyObject *_wrap_new_wxCustomDataObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCustomDataObject *)new_wxCustomDataObject(*_arg0); + _result = (wxCustomDataObject *)new_wxCustomDataObject(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1871,7 +1808,7 @@ static PyObject *_wrap_wxCustomDataObject_TakeData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCustomDataObject_TakeData(_arg0,_arg1); + wxCustomDataObject_TakeData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1910,7 +1847,7 @@ static PyObject *_wrap_wxCustomDataObject_SetData(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCustomDataObject_SetData(_arg0,_arg1); + _result = (bool )wxCustomDataObject_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1938,7 +1875,7 @@ static PyObject *_wrap_wxCustomDataObject_GetSize(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxCustomDataObject_GetSize(_arg0); + _result = (size_t )wxCustomDataObject_GetSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1968,7 +1905,7 @@ static PyObject *_wrap_wxCustomDataObject_GetData(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxCustomDataObject_GetData(_arg0); + _result = (PyObject *)wxCustomDataObject_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2006,7 +1943,7 @@ static PyObject *_wrap_new_wxURLDataObject(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxURLDataObject *)new_wxURLDataObject(); + _result = (wxURLDataObject *)new_wxURLDataObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2040,12 +1977,16 @@ static PyObject *_wrap_wxURLDataObject_GetURL(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxURLDataObject_GetURL(_arg0)); + _result = new wxString (wxURLDataObject_GetURL(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2073,26 +2014,13 @@ static PyObject *_wrap_wxURLDataObject_SetURL(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxURLDataObject_SetURL(_arg0,*_arg1); + wxURLDataObject_SetURL(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2133,7 +2061,7 @@ static PyObject *_wrap_new_wxMetafileDataObject(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMetafileDataObject *)new_wxMetafileDataObject(); + _result = (wxMetafileDataObject *)new_wxMetafileDataObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2175,7 +2103,7 @@ static PyObject *_wrap_wxMetafileDataObject_SetMetafile(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMetafileDataObject_SetMetafile(_arg0,*_arg1); + wxMetafileDataObject_SetMetafile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2205,7 +2133,7 @@ static PyObject *_wrap_wxMetafileDataObject_GetMetafile(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxMetafile (wxMetafileDataObject_GetMetafile(_arg0)); + _result = new wxMetafile (wxMetafileDataObject_GetMetafile(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2234,7 +2162,7 @@ static PyObject *_wrap_new_wxClipboard(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxClipboard *)new_wxClipboard(); + _result = (wxClipboard *)new_wxClipboard(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2268,7 +2196,7 @@ static PyObject *_wrap_wxClipboard_Open(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_Open(_arg0); + _result = (bool )wxClipboard_Open(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2295,7 +2223,7 @@ static PyObject *_wrap_wxClipboard_Close(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClipboard_Close(_arg0); + wxClipboard_Close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2324,7 +2252,7 @@ static PyObject *_wrap_wxClipboard_IsOpened(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_IsOpened(_arg0); + _result = (bool )wxClipboard_IsOpened(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2361,7 +2289,7 @@ static PyObject *_wrap_wxClipboard_AddData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_AddData(_arg0,_arg1); + _result = (bool )wxClipboard_AddData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2398,7 +2326,7 @@ static PyObject *_wrap_wxClipboard_SetData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_SetData(_arg0,_arg1); + _result = (bool )wxClipboard_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2435,7 +2363,7 @@ static PyObject *_wrap_wxClipboard_IsSupported(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_IsSupported(_arg0,*_arg1); + _result = (bool )wxClipboard_IsSupported(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2472,7 +2400,7 @@ static PyObject *_wrap_wxClipboard_GetData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_GetData(_arg0,*_arg1); + _result = (bool )wxClipboard_GetData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2499,7 +2427,7 @@ static PyObject *_wrap_wxClipboard_Clear(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClipboard_Clear(_arg0); + wxClipboard_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2528,7 +2456,7 @@ static PyObject *_wrap_wxClipboard_Flush(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxClipboard_Flush(_arg0); + _result = (bool )wxClipboard_Flush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2556,7 +2484,7 @@ static PyObject *_wrap_wxClipboard_UsePrimarySelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClipboard_UsePrimarySelection(_arg0,_arg1); + wxClipboard_UsePrimarySelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2613,7 +2541,7 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDropSource *)new_wxDropSource(_arg0,*_arg1,*_arg2,*_arg3); + _result = (wxPyDropSource *)new_wxDropSource(_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2657,7 +2585,7 @@ static PyObject *_wrap_wxDropSource__setCallbackInfo(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDropSource__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); + wxDropSource__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2685,7 +2613,7 @@ static PyObject *_wrap_delete_wxDropSource(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyDropSource(_arg0); + delete_wxPyDropSource(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2722,7 +2650,7 @@ static PyObject *_wrap_wxDropSource_SetData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDropSource_SetData(_arg0,*_arg1); + wxDropSource_SetData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2752,7 +2680,7 @@ static PyObject *_wrap_wxDropSource_GetDataObject(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObject *)wxDropSource_GetDataObject(_arg0); + _result = (wxDataObject *)wxDropSource_GetDataObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2795,7 +2723,7 @@ static PyObject *_wrap_wxDropSource_SetCursor(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDropSource_SetCursor(_arg0,_arg1,*_arg2); + wxDropSource_SetCursor(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2825,7 +2753,7 @@ static PyObject *_wrap_wxDropSource_DoDragDrop(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxDropSource_DoDragDrop(_arg0,_arg1); + _result = (wxDragResult )wxDropSource_DoDragDrop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2854,7 +2782,7 @@ static PyObject *_wrap_wxDropSource_base_GiveFeedback(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDropSource_base_GiveFeedback(_arg0,_arg1); + _result = (bool )wxDropSource_base_GiveFeedback(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2891,7 +2819,7 @@ static PyObject *_wrap_new_wxPyDropTarget(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDropTarget *)new_wxPyDropTarget(_arg0); + _result = (wxPyDropTarget *)new_wxPyDropTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2934,7 +2862,7 @@ static PyObject *_wrap_wxPyDropTarget__setCallbackInfo(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2962,7 +2890,7 @@ static PyObject *_wrap_delete_wxPyDropTarget(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyDropTarget(_arg0); + delete_wxPyDropTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2992,7 +2920,7 @@ static PyObject *_wrap_wxPyDropTarget_GetDataObject(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDataObject *)wxPyDropTarget_GetDataObject(_arg0); + _result = (wxDataObject *)wxPyDropTarget_GetDataObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3034,7 +2962,7 @@ static PyObject *_wrap_wxPyDropTarget_SetDataObject(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDropTarget_SetDataObject(_arg0,_arg1); + wxPyDropTarget_SetDataObject(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3066,7 +2994,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnEnter(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxPyDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxPyDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3097,7 +3025,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnDragOver(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxPyDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxPyDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3124,7 +3052,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnLeave(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyDropTarget_base_OnLeave(_arg0); + wxPyDropTarget_base_OnLeave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3155,7 +3083,7 @@ static PyObject *_wrap_wxPyDropTarget_base_OnDrop(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDropTarget_base_OnDrop(_arg0,_arg1,_arg2); + _result = (bool )wxPyDropTarget_base_OnDrop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3183,7 +3111,7 @@ static PyObject *_wrap_wxPyDropTarget_GetData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyDropTarget_GetData(_arg0); + _result = (bool )wxPyDropTarget_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3219,7 +3147,7 @@ static PyObject *_wrap_new_wxTextDropTarget(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTextDropTarget *)new_wxTextDropTarget(); + _result = (wxPyTextDropTarget *)new_wxTextDropTarget(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3262,7 +3190,7 @@ static PyObject *_wrap_wxTextDropTarget__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); + wxTextDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3294,7 +3222,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnEnter(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxTextDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxTextDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3325,7 +3253,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnDragOver(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxTextDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxTextDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3352,7 +3280,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnLeave(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextDropTarget_base_OnLeave(_arg0); + wxTextDropTarget_base_OnLeave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3383,7 +3311,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnDrop(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextDropTarget_base_OnDrop(_arg0,_arg1,_arg2); + _result = (bool )wxTextDropTarget_base_OnDrop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3414,7 +3342,7 @@ static PyObject *_wrap_wxTextDropTarget_base_OnData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxTextDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxTextDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3450,7 +3378,7 @@ static PyObject *_wrap_new_wxFileDropTarget(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyFileDropTarget *)new_wxFileDropTarget(); + _result = (wxPyFileDropTarget *)new_wxFileDropTarget(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3493,7 +3421,7 @@ static PyObject *_wrap_wxFileDropTarget__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); + wxFileDropTarget__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3525,7 +3453,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnEnter(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxFileDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxFileDropTarget_base_OnEnter(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3556,7 +3484,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnDragOver(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxFileDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxFileDropTarget_base_OnDragOver(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3583,7 +3511,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnLeave(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDropTarget_base_OnLeave(_arg0); + wxFileDropTarget_base_OnLeave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3614,7 +3542,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnDrop(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileDropTarget_base_OnDrop(_arg0,_arg1,_arg2); + _result = (bool )wxFileDropTarget_base_OnDrop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3645,7 +3573,7 @@ static PyObject *_wrap_wxFileDropTarget_base_OnData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDragResult )wxFileDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); + _result = (wxDragResult )wxFileDropTarget_base_OnData(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index a3e20f8a60..b56c41e6b4 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -88,12 +88,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -117,7 +111,7 @@ static PyObject *_wrap_new_wxColourData(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColourData *)new_wxColourData(); + _result = (wxColourData *)new_wxColourData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -150,7 +144,7 @@ static PyObject *_wrap_delete_wxColourData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxColourData(_arg0); + delete_wxColourData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -179,7 +173,7 @@ static PyObject *_wrap_wxColourData_GetChooseFull(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxColourData_GetChooseFull(_arg0); + _result = (bool )wxColourData_GetChooseFull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -208,7 +202,7 @@ static PyObject *_wrap_wxColourData_GetColour(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxColourData_GetColour(_arg0)); + _result = new wxColour (wxColourData_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -239,7 +233,7 @@ static PyObject *_wrap_wxColourData_GetCustomColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxColourData_GetCustomColour(_arg0,_arg1)); + _result = new wxColour (wxColourData_GetCustomColour(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -268,7 +262,7 @@ static PyObject *_wrap_wxColourData_SetChooseFull(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData_SetChooseFull(_arg0,_arg1); + wxColourData_SetChooseFull(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -304,7 +298,7 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData_SetColour(_arg0,*_arg1); + wxColourData_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -341,7 +335,7 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); + wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -420,7 +414,7 @@ static PyObject *_wrap_new_wxColourDialog(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColourDialog *)new_wxColourDialog(_arg0,_arg1); + _result = (wxColourDialog *)new_wxColourDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -455,7 +449,7 @@ static PyObject *_wrap_wxColourDialog_GetColourData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourData & _result_ref = wxColourDialog_GetColourData(_arg0); + wxColourData & _result_ref = wxColourDialog_GetColourData(_arg0); _result = (wxColourData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -490,7 +484,7 @@ static PyObject *_wrap_wxColourDialog_ShowModal(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxColourDialog_ShowModal(_arg0); + _result = (int )wxColourDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -571,7 +565,7 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirDialog *)new_wxDirDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); + _result = (wxDirDialog *)new_wxDirDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -605,12 +599,16 @@ static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDirDialog_GetPath(_arg0)); + _result = new wxString (wxDirDialog_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -638,12 +636,16 @@ static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDirDialog_GetMessage(_arg0)); + _result = new wxString (wxDirDialog_GetMessage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -671,7 +673,7 @@ static PyObject *_wrap_wxDirDialog_GetStyle(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDirDialog_GetStyle(_arg0); + _result = (long )wxDirDialog_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -699,26 +701,13 @@ static PyObject *_wrap_wxDirDialog_SetMessage(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirDialog_SetMessage(_arg0,*_arg1); + wxDirDialog_SetMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -751,26 +740,13 @@ static PyObject *_wrap_wxDirDialog_SetPath(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirDialog_SetPath(_arg0,*_arg1); + wxDirDialog_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -803,7 +779,7 @@ static PyObject *_wrap_wxDirDialog_ShowModal(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDirDialog_ShowModal(_arg0); + _result = (int )wxDirDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -886,7 +862,7 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); + _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -920,12 +896,16 @@ static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetDirectory(_arg0)); + _result = new wxString (wxFileDialog_GetDirectory(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -953,12 +933,16 @@ static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetFilename(_arg0)); + _result = new wxString (wxFileDialog_GetFilename(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -986,7 +970,7 @@ static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_GetFilterIndex(_arg0); + _result = (int )wxFileDialog_GetFilterIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1014,12 +998,16 @@ static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetMessage(_arg0)); + _result = new wxString (wxFileDialog_GetMessage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1047,12 +1035,16 @@ static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetPath(_arg0)); + _result = new wxString (wxFileDialog_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1080,7 +1072,7 @@ static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxFileDialog_GetStyle(_arg0); + _result = (long )wxFileDialog_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1108,12 +1100,16 @@ static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetWildcard(_arg0)); + _result = new wxString (wxFileDialog_GetWildcard(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1141,26 +1137,13 @@ static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetDirectory(_arg0,*_arg1); + wxFileDialog_SetDirectory(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1193,26 +1176,13 @@ static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilename(_arg0,*_arg1); + wxFileDialog_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1245,7 +1215,7 @@ static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilterIndex(_arg0,_arg1); + wxFileDialog_SetFilterIndex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1274,26 +1244,13 @@ static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetMessage(_arg0,*_arg1); + wxFileDialog_SetMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1326,26 +1283,13 @@ static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetPath(_arg0,*_arg1); + wxFileDialog_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1378,7 +1322,7 @@ static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetStyle(_arg0,_arg1); + wxFileDialog_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1407,26 +1351,13 @@ static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetWildcard(_arg0,*_arg1); + wxFileDialog_SetWildcard(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1459,7 +1390,7 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_ShowModal(_arg0); + _result = (int )wxFileDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1491,7 +1422,7 @@ static PyObject *_wrap_wxFileDialog_GetFilenames(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileDialog_GetFilenames(_arg0); + _result = (PyObject *)wxFileDialog_GetFilenames(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1525,7 +1456,7 @@ static PyObject *_wrap_wxFileDialog_GetPaths(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileDialog_GetPaths(_arg0); + _result = (PyObject *)wxFileDialog_GetPaths(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1606,40 +1537,14 @@ static PyObject *_wrap_new_wxMultiChoiceDialog(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj4) { @@ -1664,7 +1569,7 @@ static PyObject *_wrap_new_wxMultiChoiceDialog(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMultiChoiceDialog *)new_wxMultiChoiceDialog(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,*_arg6); + _result = (wxMultiChoiceDialog *)new_wxMultiChoiceDialog(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1725,7 +1630,7 @@ static PyObject *_wrap_wxMultiChoiceDialog_SetSelections(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMultiChoiceDialog_SetSelections(_arg0,*_arg1); + wxMultiChoiceDialog_SetSelections(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,7 +1665,7 @@ static PyObject *_wrap_wxMultiChoiceDialog_GetSelections(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxMultiChoiceDialog_GetSelections(_arg0); + _result = (PyObject *)wxMultiChoiceDialog_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1845,40 +1750,14 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj4) { @@ -1903,7 +1782,7 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSingleChoiceDialog *)new_wxSingleChoiceDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxSingleChoiceDialog *)new_wxSingleChoiceDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1948,7 +1827,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetSelection(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSingleChoiceDialog_GetSelection(_arg0); + _result = (int )wxSingleChoiceDialog_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1976,12 +1855,16 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxSingleChoiceDialog_GetStringSelection(_arg0)); + _result = new wxString (wxSingleChoiceDialog_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2009,7 +1892,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_SetSelection(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSingleChoiceDialog_SetSelection(_arg0,_arg1); + wxSingleChoiceDialog_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2038,7 +1921,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_ShowModal(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSingleChoiceDialog_ShowModal(_arg0); + _result = (int )wxSingleChoiceDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2120,7 +2003,7 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); + _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2154,12 +2037,16 @@ static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextEntryDialog_GetValue(_arg0)); + _result = new wxString (wxTextEntryDialog_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2187,26 +2074,13 @@ static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextEntryDialog_SetValue(_arg0,*_arg1); + wxTextEntryDialog_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2239,7 +2113,7 @@ static PyObject *_wrap_wxTextEntryDialog_ShowModal(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextEntryDialog_ShowModal(_arg0); + _result = (int )wxTextEntryDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2267,7 +2141,7 @@ static PyObject *_wrap_new_wxFontData(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontData *)new_wxFontData(); + _result = (wxFontData *)new_wxFontData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2174,7 @@ static PyObject *_wrap_delete_wxFontData(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFontData(_arg0); + delete_wxFontData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2331,7 +2205,7 @@ static PyObject *_wrap_wxFontData_EnableEffects(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_EnableEffects(_arg0,_arg1); + wxFontData_EnableEffects(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2360,7 +2234,7 @@ static PyObject *_wrap_wxFontData_GetAllowSymbols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontData_GetAllowSymbols(_arg0); + _result = (bool )wxFontData_GetAllowSymbols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2389,7 +2263,7 @@ static PyObject *_wrap_wxFontData_GetColour(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxFontData_GetColour(_arg0)); + _result = new wxColour (wxFontData_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2419,7 +2293,7 @@ static PyObject *_wrap_wxFontData_GetChosenFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxFontData_GetChosenFont(_arg0)); + _result = new wxFont (wxFontData_GetChosenFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2448,7 +2322,7 @@ static PyObject *_wrap_wxFontData_GetEnableEffects(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontData_GetEnableEffects(_arg0); + _result = (bool )wxFontData_GetEnableEffects(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2477,7 +2351,7 @@ static PyObject *_wrap_wxFontData_GetInitialFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxFontData_GetInitialFont(_arg0)); + _result = new wxFont (wxFontData_GetInitialFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2506,7 +2380,7 @@ static PyObject *_wrap_wxFontData_GetShowHelp(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontData_GetShowHelp(_arg0); + _result = (bool )wxFontData_GetShowHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2536,7 +2410,7 @@ static PyObject *_wrap_wxFontData_SetAllowSymbols(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetAllowSymbols(_arg0,_arg1); + wxFontData_SetAllowSymbols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2573,7 +2447,7 @@ static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetChosenFont(_arg0,*_arg1); + wxFontData_SetChosenFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2609,7 +2483,7 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetColour(_arg0,*_arg1); + wxFontData_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2646,7 +2520,7 @@ static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetInitialFont(_arg0,*_arg1); + wxFontData_SetInitialFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2676,7 +2550,7 @@ static PyObject *_wrap_wxFontData_SetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetRange(_arg0,_arg1,_arg2); + wxFontData_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2707,7 +2581,7 @@ static PyObject *_wrap_wxFontData_SetShowHelp(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData_SetShowHelp(_arg0,_arg1); + wxFontData_SetShowHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2786,7 +2660,7 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); + _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2821,7 +2695,7 @@ static PyObject *_wrap_wxFontDialog_GetFontData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontData & _result_ref = wxFontDialog_GetFontData(_arg0); + wxFontData & _result_ref = wxFontDialog_GetFontData(_arg0); _result = (wxFontData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2856,7 +2730,7 @@ static PyObject *_wrap_wxFontDialog_ShowModal(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFontDialog_ShowModal(_arg0); + _result = (int )wxFontDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2937,7 +2811,7 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); + _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2971,7 +2845,7 @@ static PyObject *_wrap_wxMessageDialog_ShowModal(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMessageDialog_ShowModal(_arg0); + _result = (int )wxMessageDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3038,40 +2912,14 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOi:new_wxProgressDialog",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -3082,7 +2930,7 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxProgressDialog *)new_wxProgressDialog(*_arg0,*_arg1,_arg2,_arg3,_arg4); + _result = (wxProgressDialog *)new_wxProgressDialog(*_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3126,7 +2974,7 @@ static PyObject *_wrap_wxProgressDialog_Update(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxProgressDialog_Update(_arg0,_arg1,_arg2); + _result = (bool )wxProgressDialog_Update(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3153,7 +3001,7 @@ static PyObject *_wrap_wxProgressDialog_Resume(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProgressDialog_Resume(_arg0); + wxProgressDialog_Resume(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3200,7 +3048,7 @@ static PyObject *_wrap_new_wxFindDialogEvent(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindDialogEvent *)new_wxFindDialogEvent(_arg0,_arg1); + _result = (wxFindDialogEvent *)new_wxFindDialogEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3234,7 +3082,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFindDialogEvent_GetFlags(_arg0); + _result = (int )wxFindDialogEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3262,12 +3110,16 @@ static PyObject *_wrap_wxFindDialogEvent_GetFindString(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFindDialogEvent_GetFindString(_arg0)); + _result = new wxString (wxFindDialogEvent_GetFindString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3295,13 +3147,17 @@ static PyObject *_wrap_wxFindDialogEvent_GetReplaceString(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFindDialogEvent_GetReplaceString(_arg0); + const wxString & _result_ref = wxFindDialogEvent_GetReplaceString(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -3327,7 +3183,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetDialog(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceDialog *)wxFindDialogEvent_GetDialog(_arg0); + _result = (wxFindReplaceDialog *)wxFindDialogEvent_GetDialog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3361,7 +3217,7 @@ static PyObject *_wrap_wxFindDialogEvent_SetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindDialogEvent_SetFlags(_arg0,_arg1); + wxFindDialogEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3390,26 +3246,13 @@ static PyObject *_wrap_wxFindDialogEvent_SetFindString(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindDialogEvent_SetFindString(_arg0,*_arg1); + wxFindDialogEvent_SetFindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3442,26 +3285,13 @@ static PyObject *_wrap_wxFindDialogEvent_SetReplaceString(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindDialogEvent_SetReplaceString(_arg0,*_arg1); + wxFindDialogEvent_SetReplaceString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3495,7 +3325,7 @@ static PyObject *_wrap_new_wxFindReplaceData(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceData *)new_wxFindReplaceData(_arg0); + _result = (wxFindReplaceData *)new_wxFindReplaceData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3528,7 +3358,7 @@ static PyObject *_wrap_delete_wxFindReplaceData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFindReplaceData(_arg0); + delete_wxFindReplaceData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3557,13 +3387,17 @@ static PyObject *_wrap_wxFindReplaceData_GetFindString(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFindReplaceData_GetFindString(_arg0); + const wxString & _result_ref = wxFindReplaceData_GetFindString(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -3588,13 +3422,17 @@ static PyObject *_wrap_wxFindReplaceData_GetReplaceString(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFindReplaceData_GetReplaceString(_arg0); + const wxString & _result_ref = wxFindReplaceData_GetReplaceString(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -3619,7 +3457,7 @@ static PyObject *_wrap_wxFindReplaceData_GetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFindReplaceData_GetFlags(_arg0); + _result = (int )wxFindReplaceData_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3647,7 +3485,7 @@ static PyObject *_wrap_wxFindReplaceData_SetFlags(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceData_SetFlags(_arg0,_arg1); + wxFindReplaceData_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3676,26 +3514,13 @@ static PyObject *_wrap_wxFindReplaceData_SetFindString(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceData_SetFindString(_arg0,*_arg1); + wxFindReplaceData_SetFindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3728,26 +3553,13 @@ static PyObject *_wrap_wxFindReplaceData_SetReplaceString(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceData_SetReplaceString(_arg0,*_arg1); + wxFindReplaceData_SetReplaceString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3832,26 +3644,13 @@ static PyObject *_wrap_new_wxFindReplaceDialog(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceDialog *)new_wxFindReplaceDialog(_arg0,_arg1,*_arg2,_arg3); + _result = (wxFindReplaceDialog *)new_wxFindReplaceDialog(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3881,7 +3680,7 @@ static PyObject *_wrap_new_wxPreFindReplaceDialog(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceDialog *)new_wxPreFindReplaceDialog(); + _result = (wxFindReplaceDialog *)new_wxPreFindReplaceDialog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3935,26 +3734,13 @@ static PyObject *_wrap_wxFindReplaceDialog_Create(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFindReplaceDialog_Create(_arg0,_arg1,_arg2,*_arg3,_arg4); + _result = (bool )wxFindReplaceDialog_Create(_arg0,_arg1,_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3987,7 +3773,7 @@ static PyObject *_wrap_wxFindReplaceDialog_GetData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFindReplaceData *)wxFindReplaceDialog_GetData(_arg0); + _result = (wxFindReplaceData *)wxFindReplaceDialog_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4029,7 +3815,7 @@ static PyObject *_wrap_wxFindReplaceDialog_SetData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFindReplaceDialog_SetData(_arg0,_arg1); + wxFindReplaceDialog_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index 3e34707253..4aead096a1 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -99,12 +99,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -198,7 +192,7 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -224,7 +218,7 @@ static PyObject *_wrap_new_wxPreControl(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)new_wxPreControl(); + _result = (wxControl *)new_wxPreControl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -297,7 +291,7 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -333,7 +327,7 @@ static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_Command(_arg0,*_arg1); + wxControl_Command(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -362,12 +356,16 @@ static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControl_GetLabel(_arg0)); + _result = new wxString (wxControl_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -395,26 +393,13 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_SetLabel(_arg0,*_arg1); + wxControl_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,7 +464,7 @@ static PyObject *_wrap_wxControlWithItems_Delete(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Delete(_arg0,_arg1); + wxControlWithItems_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -508,7 +493,7 @@ static PyObject *_wrap_wxControlWithItems_GetCount(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_GetCount(_arg0); + _result = (int )wxControlWithItems_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -537,12 +522,16 @@ static PyObject *_wrap_wxControlWithItems_GetString(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); + _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -571,26 +560,13 @@ static PyObject *_wrap_wxControlWithItems_SetString(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_SetString(_arg0,_arg1,*_arg2); + wxControlWithItems_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -624,26 +600,13 @@ static PyObject *_wrap_wxControlWithItems_FindString(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); + _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -675,7 +638,7 @@ static PyObject *_wrap_wxControlWithItems_Select(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Select(_arg0,_arg1); + wxControlWithItems_Select(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -704,7 +667,7 @@ static PyObject *_wrap_wxControlWithItems_GetSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_GetSelection(_arg0); + _result = (int )wxControlWithItems_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -732,12 +695,16 @@ static PyObject *_wrap_wxControlWithItems_GetStringSelection(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); + _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -773,22 +740,9 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { @@ -796,7 +750,7 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Append(_arg0,*_arg1,_arg2); + wxControlWithItems_Append(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -839,7 +793,7 @@ static PyObject *_wrap_wxControlWithItems_GetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); + _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -877,7 +831,7 @@ static PyObject *_wrap_wxControlWithItems_SetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); + wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -914,15 +868,20 @@ static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject * int i, len=PySequence_Length(_obj1); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg1->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_AppendItems(_arg0,*_arg1); + wxControlWithItems_AppendItems(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1000,22 +959,9 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1038,7 +984,7 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1068,7 +1014,7 @@ static PyObject *_wrap_new_wxPreButton(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)new_wxPreButton(); + _result = (wxButton *)new_wxPreButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1123,22 +1069,9 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -1161,7 +1094,7 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1192,7 +1125,7 @@ static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetDefault(_arg0); + wxButton_SetDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1228,7 +1161,7 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetBackgroundColour(_arg0,*_arg1); + wxButton_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1264,7 +1197,7 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetForegroundColour(_arg0,*_arg1); + wxButton_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1301,7 +1234,7 @@ static PyObject *_wrap_wxButton_SetImageLabel(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetImageLabel(_arg0,*_arg1); + wxButton_SetImageLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1264,7 @@ static PyObject *_wrap_wxButton_SetImageMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetImageMargins(_arg0,_arg1,_arg2); + wxButton_SetImageMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1351,7 +1284,7 @@ static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxButton::GetDefaultSize()); + _result = new wxSize (wxButton::GetDefaultSize()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1460,7 +1393,7 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1486,7 +1419,7 @@ static PyObject *_wrap_new_wxPreBitmapButton(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapButton *)new_wxPreBitmapButton(); + _result = (wxBitmapButton *)new_wxPreBitmapButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1568,7 +1501,7 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1597,7 +1530,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1627,7 +1560,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1657,7 +1590,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1687,7 +1620,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1724,7 +1657,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); + wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1761,7 +1694,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); + wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1798,7 +1731,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); + wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1835,7 +1768,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); + wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1865,7 +1798,7 @@ static PyObject *_wrap_wxBitmapButton_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); + wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1894,7 +1827,7 @@ static PyObject *_wrap_wxBitmapButton_GetMarginX(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmapButton_GetMarginX(_arg0); + _result = (int )wxBitmapButton_GetMarginX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1922,7 +1855,7 @@ static PyObject *_wrap_wxBitmapButton_GetMarginY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmapButton_GetMarginY(_arg0); + _result = (int )wxBitmapButton_GetMarginY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1995,22 +1928,9 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -2033,7 +1953,7 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2063,7 +1983,7 @@ static PyObject *_wrap_new_wxPreCheckBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckBox *)new_wxPreCheckBox(); + _result = (wxCheckBox *)new_wxPreCheckBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2118,22 +2038,9 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -2156,7 +2063,7 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2188,7 +2095,7 @@ static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckBox_GetValue(_arg0); + _result = (bool )wxCheckBox_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2218,7 +2125,7 @@ static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckBox_SetValue(_arg0,_arg1); + wxCheckBox_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2336,7 +2243,7 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2365,7 +2272,7 @@ static PyObject *_wrap_new_wxPreChoice(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChoice *)new_wxPreChoice(); + _result = (wxChoice *)new_wxPreChoice(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2456,7 +2363,7 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2486,7 +2393,7 @@ static PyObject *_wrap_wxChoice_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_Clear(_arg0); + wxChoice_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2515,7 +2422,7 @@ static PyObject *_wrap_wxChoice_GetColumns(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxChoice_GetColumns(_arg0); + _result = (int )wxChoice_GetColumns(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2543,7 +2450,7 @@ static PyObject *_wrap_wxChoice_SetColumns(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetColumns(_arg0,_arg1); + wxChoice_SetColumns(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2572,7 +2479,7 @@ static PyObject *_wrap_wxChoice_SetSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetSelection(_arg0,_arg1); + wxChoice_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2601,26 +2508,13 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetStringSelection(_arg0,*_arg1); + wxChoice_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2654,26 +2548,13 @@ static PyObject *_wrap_wxChoice_SetString(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetString(_arg0,_arg1,*_arg2); + wxChoice_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2804,7 +2685,7 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2833,7 +2714,7 @@ static PyObject *_wrap_new_wxPreComboBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxComboBox *)new_wxPreComboBox(); + _result = (wxComboBox *)new_wxPreComboBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2925,7 +2806,7 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2955,7 +2836,7 @@ static PyObject *_wrap_wxComboBox_Copy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Copy(_arg0); + wxComboBox_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2983,7 +2864,7 @@ static PyObject *_wrap_wxComboBox_Cut(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Cut(_arg0); + wxComboBox_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3012,7 +2893,7 @@ static PyObject *_wrap_wxComboBox_GetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxComboBox_GetInsertionPoint(_arg0); + _result = (long )wxComboBox_GetInsertionPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3040,7 +2921,7 @@ static PyObject *_wrap_wxComboBox_GetLastPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxComboBox_GetLastPosition(_arg0); + _result = (long )wxComboBox_GetLastPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3068,12 +2949,16 @@ static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetValue(_arg0)); + _result = new wxString (wxComboBox_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3100,7 +2985,7 @@ static PyObject *_wrap_wxComboBox_Paste(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Paste(_arg0); + wxComboBox_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3131,26 +3016,13 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); + wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3184,7 +3056,7 @@ static PyObject *_wrap_wxComboBox_Remove(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Remove(_arg0,_arg1,_arg2); + wxComboBox_Remove(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3213,7 +3085,7 @@ static PyObject *_wrap_wxComboBox_SetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetInsertionPoint(_arg0,_arg1); + wxComboBox_SetInsertionPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3241,7 +3113,7 @@ static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetInsertionPointEnd(_arg0); + wxComboBox_SetInsertionPointEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3270,7 +3142,7 @@ static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetSelection(_arg0,_arg1); + wxComboBox_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3300,7 +3172,7 @@ static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetMark(_arg0,_arg1,_arg2); + wxComboBox_SetMark(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3329,26 +3201,13 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetValue(_arg0,*_arg1); + wxComboBox_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3383,7 +3242,7 @@ static PyObject *_wrap_wxComboBox_SetEditable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetEditable(_arg0,_arg1); + wxComboBox_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3476,7 +3335,7 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3502,7 +3361,7 @@ static PyObject *_wrap_new_wxPreGauge(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGauge *)new_wxPreGauge(); + _result = (wxGauge *)new_wxPreGauge(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3576,7 +3435,7 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3604,7 +3463,7 @@ static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetBezelFace(_arg0); + _result = (int )wxGauge_GetBezelFace(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3632,7 +3491,7 @@ static PyObject *_wrap_wxGauge_GetRange(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetRange(_arg0); + _result = (int )wxGauge_GetRange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3660,7 +3519,7 @@ static PyObject *_wrap_wxGauge_GetShadowWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetShadowWidth(_arg0); + _result = (int )wxGauge_GetShadowWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3688,7 +3547,7 @@ static PyObject *_wrap_wxGauge_GetValue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetValue(_arg0); + _result = (int )wxGauge_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3716,7 +3575,7 @@ static PyObject *_wrap_wxGauge_SetBezelFace(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetBezelFace(_arg0,_arg1); + wxGauge_SetBezelFace(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3745,7 +3604,7 @@ static PyObject *_wrap_wxGauge_SetRange(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetRange(_arg0,_arg1); + wxGauge_SetRange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3774,7 +3633,7 @@ static PyObject *_wrap_wxGauge_SetShadowWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetShadowWidth(_arg0,_arg1); + wxGauge_SetShadowWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3803,7 +3662,7 @@ static PyObject *_wrap_wxGauge_SetValue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetValue(_arg0,_arg1); + wxGauge_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3875,22 +3734,9 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -3906,7 +3752,7 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3936,7 +3782,7 @@ static PyObject *_wrap_new_wxPreStaticBox(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)new_wxPreStaticBox(); + _result = (wxStaticBox *)new_wxPreStaticBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3989,22 +3835,9 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4020,7 +3853,7 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4106,7 +3939,7 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4132,7 +3965,7 @@ static PyObject *_wrap_new_wxPreStaticLine(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticLine *)new_wxPreStaticLine(); + _result = (wxStaticLine *)new_wxPreStaticLine(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4196,7 +4029,7 @@ static PyObject *_wrap_wxStaticLine_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4267,22 +4100,9 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -4298,7 +4118,7 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4328,7 +4148,7 @@ static PyObject *_wrap_new_wxPreStaticText(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticText *)new_wxPreStaticText(); + _result = (wxStaticText *)new_wxPreStaticText(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4381,22 +4201,9 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4412,7 +4219,7 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4444,12 +4251,16 @@ static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStaticText_GetLabel(_arg0)); + _result = new wxString (wxStaticText_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4477,26 +4288,13 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticText_SetLabel(_arg0,*_arg1); + wxStaticText_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4618,7 +4416,7 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4647,7 +4445,7 @@ static PyObject *_wrap_new_wxPreListBox(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListBox *)new_wxPreListBox(); + _result = (wxListBox *)new_wxPreListBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4738,7 +4536,7 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4768,7 +4566,7 @@ static PyObject *_wrap_wxListBox_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Clear(_arg0); + wxListBox_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4797,7 +4595,7 @@ static PyObject *_wrap_wxListBox_Deselect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Deselect(_arg0,_arg1); + wxListBox_Deselect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4834,7 +4632,7 @@ static PyObject *_wrap_wxListBox_GetSelections(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxListBox_GetSelections(_arg0); + _result = (PyObject *)wxListBox_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4881,7 +4679,7 @@ static PyObject *_wrap_wxListBox_InsertItems(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4914,7 +4712,7 @@ static PyObject *_wrap_wxListBox_IsSelected(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_IsSelected(_arg0,_arg1); + _result = (bool )wxListBox_IsSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4943,7 +4741,7 @@ static PyObject *_wrap_wxListBox_Selected(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_Selected(_arg0,_arg1); + _result = (bool )wxListBox_Selected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4988,7 +4786,7 @@ static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Set(_arg0,_arg1,_arg2); + wxListBox_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5020,7 +4818,7 @@ static PyObject *_wrap_wxListBox_SetFirstItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetFirstItem(_arg0,_arg1); + wxListBox_SetFirstItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5049,26 +4847,13 @@ static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetFirstItemStr(_arg0,*_arg1); + wxListBox_SetFirstItemStr(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5104,7 +4889,7 @@ static PyObject *_wrap_wxListBox_SetSelection(PyObject *self, PyObject *args, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetSelection(_arg0,_arg1,_arg2); + wxListBox_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5134,26 +4919,13 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetString(_arg0,_arg1,*_arg2); + wxListBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5188,27 +4960,14 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); + wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5338,7 +5097,7 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5367,7 +5126,7 @@ static PyObject *_wrap_new_wxPreCheckListBox(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckListBox *)new_wxPreCheckListBox(); + _result = (wxCheckListBox *)new_wxPreCheckListBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5458,7 +5217,7 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5490,7 +5249,7 @@ static PyObject *_wrap_wxCheckListBox_IsChecked(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); + _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5519,7 +5278,7 @@ static PyObject *_wrap_wxCheckListBox_Check(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckListBox_Check(_arg0,_arg1,_arg2); + wxCheckListBox_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5565,7 +5324,7 @@ static PyObject *_wrap_wxCheckListBox_InsertItems(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5597,7 +5356,7 @@ static PyObject *_wrap_wxCheckListBox_GetItemHeight(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCheckListBox_GetItemHeight(_arg0); + _result = (int )wxCheckListBox_GetItemHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5644,7 +5403,7 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5677,7 +5436,7 @@ static PyObject *_wrap_delete_wxTextAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTextAttr(_arg0); + delete_wxTextAttr(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5713,7 +5472,7 @@ static PyObject *_wrap_wxTextAttr_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetTextColour(_arg0,*_arg1); + wxTextAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5749,7 +5508,7 @@ static PyObject *_wrap_wxTextAttr_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetBackgroundColour(_arg0,*_arg1); + wxTextAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5786,7 +5545,7 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetFont(_arg0,*_arg1); + wxTextAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5815,7 +5574,7 @@ static PyObject *_wrap_wxTextAttr_HasTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasTextColour(_arg0); + _result = (bool )wxTextAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5843,7 +5602,7 @@ static PyObject *_wrap_wxTextAttr_HasBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); + _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5871,7 +5630,7 @@ static PyObject *_wrap_wxTextAttr_HasFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasFont(_arg0); + _result = (bool )wxTextAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5900,7 +5659,7 @@ static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); + _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5930,7 +5689,7 @@ static PyObject *_wrap_wxTextAttr_GetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5960,7 +5719,7 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxTextAttr_GetFont(_arg0)); + _result = new wxFont (wxTextAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5989,7 +5748,7 @@ static PyObject *_wrap_wxTextAttr_IsDefault(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_IsDefault(_arg0); + _result = (bool )wxTextAttr_IsDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6035,7 +5794,7 @@ static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); + _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6128,7 +5887,7 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6154,7 +5913,7 @@ static PyObject *_wrap_new_wxPreTextCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)new_wxPreTextCtrl(); + _result = (wxTextCtrl *)new_wxPreTextCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6228,7 +5987,7 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6256,12 +6015,16 @@ static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetValue(_arg0)); + _result = new wxString (wxTextCtrl_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6289,26 +6052,13 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetValue(_arg0,*_arg1); + wxTextCtrl_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6343,12 +6093,16 @@ static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); + _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6377,7 +6131,7 @@ static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); + _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6406,12 +6160,16 @@ static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); + _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6439,7 +6197,7 @@ static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); + _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6467,7 +6225,7 @@ static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_IsModified(_arg0); + _result = (bool )wxTextCtrl_IsModified(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6495,7 +6253,7 @@ static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_IsEditable(_arg0); + _result = (bool )wxTextCtrl_IsEditable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6532,7 +6290,7 @@ static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6571,12 +6329,16 @@ static PyObject *_wrap_wxTextCtrl_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); + _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6603,7 +6365,7 @@ static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Clear(_arg0); + wxTextCtrl_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6634,26 +6396,13 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); + wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6687,7 +6436,7 @@ static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Remove(_arg0,_arg1,_arg2); + wxTextCtrl_Remove(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6717,26 +6466,13 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6770,26 +6506,13 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6820,7 +6543,7 @@ static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_DiscardEdits(_arg0); + wxTextCtrl_DiscardEdits(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6849,7 +6572,7 @@ static PyObject *_wrap_wxTextCtrl_SetMaxLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetMaxLength(_arg0,_arg1); + wxTextCtrl_SetMaxLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6878,26 +6601,13 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_WriteText(_arg0,*_arg1); + wxTextCtrl_WriteText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6930,26 +6640,13 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_AppendText(_arg0,*_arg1); + wxTextCtrl_AppendText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6993,7 +6690,7 @@ static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7030,7 +6727,7 @@ static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7059,7 +6756,7 @@ static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); + const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); _result = (wxTextAttr *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7096,7 +6793,7 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); + _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7134,7 +6831,7 @@ static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7173,7 +6870,7 @@ static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_ShowPosition(_arg0,_arg1); + wxTextCtrl_ShowPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7201,7 +6898,7 @@ static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Copy(_arg0); + wxTextCtrl_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7229,7 +6926,7 @@ static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Cut(_arg0); + wxTextCtrl_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7257,7 +6954,7 @@ static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Paste(_arg0); + wxTextCtrl_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7286,7 +6983,7 @@ static PyObject *_wrap_wxTextCtrl_CanCopy(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanCopy(_arg0); + _result = (bool )wxTextCtrl_CanCopy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7314,7 +7011,7 @@ static PyObject *_wrap_wxTextCtrl_CanCut(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanCut(_arg0); + _result = (bool )wxTextCtrl_CanCut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7342,7 +7039,7 @@ static PyObject *_wrap_wxTextCtrl_CanPaste(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanPaste(_arg0); + _result = (bool )wxTextCtrl_CanPaste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7369,7 +7066,7 @@ static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Undo(_arg0); + wxTextCtrl_Undo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7397,7 +7094,7 @@ static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Redo(_arg0); + wxTextCtrl_Redo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7426,7 +7123,7 @@ static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanUndo(_arg0); + _result = (bool )wxTextCtrl_CanUndo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7454,7 +7151,7 @@ static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanRedo(_arg0); + _result = (bool )wxTextCtrl_CanRedo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7482,7 +7179,7 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); + wxTextCtrl_SetInsertionPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7510,7 +7207,7 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetInsertionPointEnd(_arg0); + wxTextCtrl_SetInsertionPointEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7539,7 +7236,7 @@ static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); + _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7567,7 +7264,7 @@ static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_GetLastPosition(_arg0); + _result = (long )wxTextCtrl_GetLastPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7596,7 +7293,7 @@ static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7624,7 +7321,7 @@ static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SelectAll(_arg0); + wxTextCtrl_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7655,7 +7352,7 @@ static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetEditable(_arg0,_arg1); + wxTextCtrl_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7686,26 +7383,13 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_write(_arg0,*_arg1); + wxTextCtrl_write(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7742,12 +7426,16 @@ static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); + _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7838,7 +7526,7 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7864,7 +7552,7 @@ static PyObject *_wrap_new_wxPreScrollBar(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)new_wxPreScrollBar(); + _result = (wxScrollBar *)new_wxPreScrollBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7937,7 +7625,7 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7965,7 +7653,7 @@ static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetRange(_arg0); + _result = (int )wxScrollBar_GetRange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7993,7 +7681,7 @@ static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetPageSize(_arg0); + _result = (int )wxScrollBar_GetPageSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8021,7 +7709,7 @@ static PyObject *_wrap_wxScrollBar_GetThumbPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetThumbPosition(_arg0); + _result = (int )wxScrollBar_GetThumbPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8049,7 +7737,7 @@ static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetThumbSize(_arg0); + _result = (int )wxScrollBar_GetThumbSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8077,7 +7765,7 @@ static PyObject *_wrap_wxScrollBar_IsVertical(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrollBar_IsVertical(_arg0); + _result = (bool )wxScrollBar_IsVertical(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8105,7 +7793,7 @@ static PyObject *_wrap_wxScrollBar_SetThumbPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrollBar_SetThumbPosition(_arg0,_arg1); + wxScrollBar_SetThumbPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8140,7 +7828,7 @@ static PyObject *_wrap_wxScrollBar_SetScrollbar(PyObject *self, PyObject *args, _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8223,7 +7911,7 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8249,7 +7937,7 @@ static PyObject *_wrap_new_wxPreSpinButton(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinButton *)new_wxPreSpinButton(); + _result = (wxSpinButton *)new_wxPreSpinButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8313,7 +8001,7 @@ static PyObject *_wrap_wxSpinButton_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8341,7 +8029,7 @@ static PyObject *_wrap_wxSpinButton_GetMax(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetMax(_arg0); + _result = (int )wxSpinButton_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8369,7 +8057,7 @@ static PyObject *_wrap_wxSpinButton_GetMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetMin(_arg0); + _result = (int )wxSpinButton_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8397,7 +8085,7 @@ static PyObject *_wrap_wxSpinButton_GetValue(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetValue(_arg0); + _result = (int )wxSpinButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8426,7 +8114,7 @@ static PyObject *_wrap_wxSpinButton_SetRange(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinButton_SetRange(_arg0,_arg1,_arg2); + wxSpinButton_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8455,7 +8143,7 @@ static PyObject *_wrap_wxSpinButton_SetValue(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinButton_SetValue(_arg0,_arg1); + wxSpinButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8547,7 +8235,7 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8573,7 +8261,7 @@ static PyObject *_wrap_new_wxPreStaticBitmap(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); + _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8646,7 +8334,7 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8675,7 +8363,7 @@ static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); + _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8712,7 +8400,7 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetBitmap(_arg0,*_arg1); + wxStaticBitmap_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8749,7 +8437,7 @@ static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetIcon(_arg0,*_arg1); + wxStaticBitmap_SetIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8827,22 +8515,9 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -8880,7 +8555,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8913,7 +8588,7 @@ static PyObject *_wrap_new_wxPreRadioBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioBox *)new_wxPreRadioBox(); + _result = (wxRadioBox *)new_wxPreRadioBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8972,22 +8647,9 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -9025,7 +8687,7 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); + _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9062,7 +8724,7 @@ static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_Enable(_arg0,_arg1); + wxRadioBox_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9094,7 +8756,7 @@ static PyObject *_wrap_wxRadioBox_EnableItem(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_EnableItem(_arg0,_arg1,_arg2); + wxRadioBox_EnableItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9124,26 +8786,13 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_FindString(_arg0,*_arg1); + _result = (int )wxRadioBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9176,12 +8825,16 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); + _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9210,26 +8863,13 @@ static PyObject *_wrap_wxRadioBox_SetString(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetString(_arg0,_arg1,*_arg2); + wxRadioBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9262,7 +8902,7 @@ static PyObject *_wrap_wxRadioBox_GetColumnCount(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetColumnCount(_arg0); + _result = (int )wxRadioBox_GetColumnCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9290,7 +8930,7 @@ static PyObject *_wrap_wxRadioBox_GetRowCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetRowCount(_arg0); + _result = (int )wxRadioBox_GetRowCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9318,7 +8958,7 @@ static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetSelection(_arg0); + _result = (int )wxRadioBox_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9346,12 +8986,16 @@ static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); + _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9379,7 +9023,7 @@ static PyObject *_wrap_wxRadioBox_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetCount(_arg0); + _result = (int )wxRadioBox_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9407,7 +9051,7 @@ static PyObject *_wrap_wxRadioBox_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetSelection(_arg0,_arg1); + wxRadioBox_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9436,26 +9080,13 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetStringSelection(_arg0,*_arg1); + wxRadioBox_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9490,7 +9121,7 @@ static PyObject *_wrap_wxRadioBox_Show(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_Show(_arg0,_arg1); + wxRadioBox_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9522,7 +9153,7 @@ static PyObject *_wrap_wxRadioBox_ShowItem(PyObject *self, PyObject *args, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_ShowItem(_arg0,_arg1,_arg2); + wxRadioBox_ShowItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9596,22 +9227,9 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -9634,7 +9252,7 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9664,7 +9282,7 @@ static PyObject *_wrap_new_wxPreRadioButton(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioButton *)new_wxPreRadioButton(); + _result = (wxRadioButton *)new_wxPreRadioButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9719,22 +9337,9 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -9757,7 +9362,7 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9789,7 +9394,7 @@ static PyObject *_wrap_wxRadioButton_GetValue(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioButton_GetValue(_arg0); + _result = (bool )wxRadioButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9819,7 +9424,7 @@ static PyObject *_wrap_wxRadioButton_SetValue(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioButton_SetValue(_arg0,_arg1); + wxRadioButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9914,7 +9519,7 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); + _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9940,7 +9545,7 @@ static PyObject *_wrap_new_wxPreSlider(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSlider *)new_wxPreSlider(); + _result = (wxSlider *)new_wxPreSlider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10016,7 +9621,7 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); + _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10043,7 +9648,7 @@ static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_ClearSel(_arg0); + wxSlider_ClearSel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10071,7 +9676,7 @@ static PyObject *_wrap_wxSlider_ClearTicks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_ClearTicks(_arg0); + wxSlider_ClearTicks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10100,7 +9705,7 @@ static PyObject *_wrap_wxSlider_GetLineSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetLineSize(_arg0); + _result = (int )wxSlider_GetLineSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10128,7 +9733,7 @@ static PyObject *_wrap_wxSlider_GetMax(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetMax(_arg0); + _result = (int )wxSlider_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10156,7 +9761,7 @@ static PyObject *_wrap_wxSlider_GetMin(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetMin(_arg0); + _result = (int )wxSlider_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10184,7 +9789,7 @@ static PyObject *_wrap_wxSlider_GetPageSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetPageSize(_arg0); + _result = (int )wxSlider_GetPageSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10212,7 +9817,7 @@ static PyObject *_wrap_wxSlider_GetSelEnd(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetSelEnd(_arg0); + _result = (int )wxSlider_GetSelEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10240,7 +9845,7 @@ static PyObject *_wrap_wxSlider_GetSelStart(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetSelStart(_arg0); + _result = (int )wxSlider_GetSelStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10268,7 +9873,7 @@ static PyObject *_wrap_wxSlider_GetThumbLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetThumbLength(_arg0); + _result = (int )wxSlider_GetThumbLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10296,7 +9901,7 @@ static PyObject *_wrap_wxSlider_GetTickFreq(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetTickFreq(_arg0); + _result = (int )wxSlider_GetTickFreq(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10324,7 +9929,7 @@ static PyObject *_wrap_wxSlider_GetValue(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetValue(_arg0); + _result = (int )wxSlider_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10353,7 +9958,7 @@ static PyObject *_wrap_wxSlider_SetRange(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetRange(_arg0,_arg1,_arg2); + wxSlider_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10383,7 +9988,7 @@ static PyObject *_wrap_wxSlider_SetTickFreq(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetTickFreq(_arg0,_arg1,_arg2); + wxSlider_SetTickFreq(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10412,7 +10017,7 @@ static PyObject *_wrap_wxSlider_SetLineSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetLineSize(_arg0,_arg1); + wxSlider_SetLineSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10441,7 +10046,7 @@ static PyObject *_wrap_wxSlider_SetPageSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetPageSize(_arg0,_arg1); + wxSlider_SetPageSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10471,7 +10076,7 @@ static PyObject *_wrap_wxSlider_SetSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetSelection(_arg0,_arg1,_arg2); + wxSlider_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10500,7 +10105,7 @@ static PyObject *_wrap_wxSlider_SetThumbLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetThumbLength(_arg0,_arg1); + wxSlider_SetThumbLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10529,7 +10134,7 @@ static PyObject *_wrap_wxSlider_SetTick(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetTick(_arg0,_arg1); + wxSlider_SetTick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10558,7 +10163,7 @@ static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetValue(_arg0,_arg1); + wxSlider_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10653,7 +10258,7 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10679,7 +10284,7 @@ static PyObject *_wrap_new_wxPreSpinCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); + _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10747,7 +10352,7 @@ static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); + _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10775,7 +10380,7 @@ static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetMax(_arg0); + _result = (int )wxSpinCtrl_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10803,7 +10408,7 @@ static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetMin(_arg0); + _result = (int )wxSpinCtrl_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10831,7 +10436,7 @@ static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetValue(_arg0); + _result = (int )wxSpinCtrl_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10860,7 +10465,7 @@ static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10889,7 +10494,7 @@ static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinCtrl_SetValue(_arg0,_arg1); + wxSpinCtrl_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10963,22 +10568,9 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -11001,7 +10593,7 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToggleButton *)new_wxToggleButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxToggleButton *)new_wxToggleButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11031,7 +10623,7 @@ static PyObject *_wrap_new_wxPreToggleButton(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToggleButton *)new_wxPreToggleButton(); + _result = (wxToggleButton *)new_wxPreToggleButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11086,22 +10678,9 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -11124,7 +10703,7 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11158,7 +10737,7 @@ static PyObject *_wrap_wxToggleButton_SetValue(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToggleButton_SetValue(_arg0,_arg1); + wxToggleButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11187,7 +10766,7 @@ static PyObject *_wrap_wxToggleButton_GetValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToggleButton_GetValue(_arg0); + _result = (bool )wxToggleButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11215,26 +10794,13 @@ static PyObject *_wrap_wxToggleButton_SetLabel(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToggleButton_SetLabel(_arg0,*_arg1); + wxToggleButton_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 5e4b68ae08..73aa999456 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -90,12 +90,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif // C++ Version of a Python aware class class wxPyListCtrl : public wxListCtrl { DECLARE_ABSTRACT_CLASS(wxPyListCtrl); @@ -264,7 +258,7 @@ static PyObject *_wrap_new_wxListItemAttr(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItemAttr *)new_wxListItemAttr(*_arg0,*_arg1,*_arg2); + _result = (wxListItemAttr *)new_wxListItemAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -305,7 +299,7 @@ static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItemAttr_SetTextColour(_arg0,*_arg1); + wxListItemAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -341,7 +335,7 @@ static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItemAttr_SetBackgroundColour(_arg0,*_arg1); + wxListItemAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -378,7 +372,7 @@ static PyObject *_wrap_wxListItemAttr_SetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItemAttr_SetFont(_arg0,*_arg1); + wxListItemAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -407,7 +401,7 @@ static PyObject *_wrap_wxListItemAttr_HasTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItemAttr_HasTextColour(_arg0); + _result = (bool )wxListItemAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -435,7 +429,7 @@ static PyObject *_wrap_wxListItemAttr_HasBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0); + _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -463,7 +457,7 @@ static PyObject *_wrap_wxListItemAttr_HasFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItemAttr_HasFont(_arg0); + _result = (bool )wxListItemAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -492,7 +486,7 @@ static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItemAttr_GetTextColour(_arg0)); + _result = new wxColour (wxListItemAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -522,7 +516,7 @@ static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItemAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxListItemAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -552,7 +546,7 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxListItemAttr_GetFont(_arg0)); + _result = new wxFont (wxListItemAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -581,7 +575,7 @@ static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)new_wxListItem(); + _result = (wxListItem *)new_wxListItem(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -614,7 +608,7 @@ static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxListItem(_arg0); + delete_wxListItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -642,7 +636,7 @@ static PyObject *_wrap_wxListItem_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_Clear(_arg0); + wxListItem_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -670,7 +664,7 @@ static PyObject *_wrap_wxListItem_ClearAttributes(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_ClearAttributes(_arg0); + wxListItem_ClearAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -699,7 +693,7 @@ static PyObject *_wrap_wxListItem_SetMask(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetMask(_arg0,_arg1); + wxListItem_SetMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -728,7 +722,7 @@ static PyObject *_wrap_wxListItem_SetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetId(_arg0,_arg1); + wxListItem_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -757,7 +751,7 @@ static PyObject *_wrap_wxListItem_SetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetColumn(_arg0,_arg1); + wxListItem_SetColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -786,7 +780,7 @@ static PyObject *_wrap_wxListItem_SetState(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetState(_arg0,_arg1); + wxListItem_SetState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -815,7 +809,7 @@ static PyObject *_wrap_wxListItem_SetStateMask(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetStateMask(_arg0,_arg1); + wxListItem_SetStateMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -844,26 +838,13 @@ static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetText(_arg0,*_arg1); + wxListItem_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -896,7 +877,7 @@ static PyObject *_wrap_wxListItem_SetImage(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetImage(_arg0,_arg1); + wxListItem_SetImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -925,7 +906,7 @@ static PyObject *_wrap_wxListItem_SetData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetData(_arg0,_arg1); + wxListItem_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -954,7 +935,7 @@ static PyObject *_wrap_wxListItem_SetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetWidth(_arg0,_arg1); + wxListItem_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -983,7 +964,7 @@ static PyObject *_wrap_wxListItem_SetAlign(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetAlign(_arg0,_arg1); + wxListItem_SetAlign(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1019,7 +1000,7 @@ static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetTextColour(_arg0,*_arg1); + wxListItem_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1055,7 +1036,7 @@ static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetBackgroundColour(_arg0,*_arg1); + wxListItem_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1092,7 +1073,7 @@ static PyObject *_wrap_wxListItem_SetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListItem_SetFont(_arg0,*_arg1); + wxListItem_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1121,7 +1102,7 @@ static PyObject *_wrap_wxListItem_GetMask(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetMask(_arg0); + _result = (long )wxListItem_GetMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1149,7 +1130,7 @@ static PyObject *_wrap_wxListItem_GetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetId(_arg0); + _result = (long )wxListItem_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1177,7 +1158,7 @@ static PyObject *_wrap_wxListItem_GetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_GetColumn(_arg0); + _result = (int )wxListItem_GetColumn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1205,7 +1186,7 @@ static PyObject *_wrap_wxListItem_GetState(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetState(_arg0); + _result = (long )wxListItem_GetState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1233,13 +1214,17 @@ static PyObject *_wrap_wxListItem_GetText(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxListItem_GetText(_arg0); + const wxString & _result_ref = wxListItem_GetText(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1264,7 +1249,7 @@ static PyObject *_wrap_wxListItem_GetImage(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_GetImage(_arg0); + _result = (int )wxListItem_GetImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1292,7 +1277,7 @@ static PyObject *_wrap_wxListItem_GetData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_GetData(_arg0); + _result = (long )wxListItem_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1320,7 +1305,7 @@ static PyObject *_wrap_wxListItem_GetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_GetWidth(_arg0); + _result = (int )wxListItem_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1348,7 +1333,7 @@ static PyObject *_wrap_wxListItem_GetAlign(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0); + _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1377,7 +1362,7 @@ static PyObject *_wrap_wxListItem_GetAttributes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0); + _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1396,7 @@ static PyObject *_wrap_wxListItem_HasAttributes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListItem_HasAttributes(_arg0); + _result = (bool )wxListItem_HasAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1440,7 +1425,7 @@ static PyObject *_wrap_wxListItem_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItem_GetTextColour(_arg0)); + _result = new wxColour (wxListItem_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1470,7 +1455,7 @@ static PyObject *_wrap_wxListItem_GetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListItem_GetBackgroundColour(_arg0)); + _result = new wxColour (wxListItem_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1500,7 +1485,7 @@ static PyObject *_wrap_wxListItem_GetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxListItem_GetFont(_arg0)); + _result = new wxFont (wxListItem_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1530,7 +1515,7 @@ static PyObject *_wrap_wxListItem_m_mask_set(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_mask_set(_arg0,_arg1); + _result = (long )wxListItem_m_mask_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1558,7 +1543,7 @@ static PyObject *_wrap_wxListItem_m_mask_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_mask_get(_arg0); + _result = (long )wxListItem_m_mask_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1587,7 +1572,7 @@ static PyObject *_wrap_wxListItem_m_itemId_set(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_itemId_set(_arg0,_arg1); + _result = (long )wxListItem_m_itemId_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1615,7 +1600,7 @@ static PyObject *_wrap_wxListItem_m_itemId_get(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_itemId_get(_arg0); + _result = (long )wxListItem_m_itemId_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1644,7 +1629,7 @@ static PyObject *_wrap_wxListItem_m_col_set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_col_set(_arg0,_arg1); + _result = (int )wxListItem_m_col_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1672,7 +1657,7 @@ static PyObject *_wrap_wxListItem_m_col_get(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_col_get(_arg0); + _result = (int )wxListItem_m_col_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1701,7 +1686,7 @@ static PyObject *_wrap_wxListItem_m_state_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_state_set(_arg0,_arg1); + _result = (long )wxListItem_m_state_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1729,7 +1714,7 @@ static PyObject *_wrap_wxListItem_m_state_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_state_get(_arg0); + _result = (long )wxListItem_m_state_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1758,7 +1743,7 @@ static PyObject *_wrap_wxListItem_m_stateMask_set(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_stateMask_set(_arg0,_arg1); + _result = (long )wxListItem_m_stateMask_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1786,7 +1771,7 @@ static PyObject *_wrap_wxListItem_m_stateMask_get(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_stateMask_get(_arg0); + _result = (long )wxListItem_m_stateMask_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1815,31 +1800,22 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxListItem_m_text_set(_arg0,_arg1); + _result = (wxString *)wxListItem_m_text_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1868,12 +1844,16 @@ static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxListItem_m_text_get(_arg0); + _result = (wxString *)wxListItem_m_text_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1899,7 +1879,7 @@ static PyObject *_wrap_wxListItem_m_image_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_image_set(_arg0,_arg1); + _result = (int )wxListItem_m_image_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1927,7 +1907,7 @@ static PyObject *_wrap_wxListItem_m_image_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_image_get(_arg0); + _result = (int )wxListItem_m_image_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1956,7 +1936,7 @@ static PyObject *_wrap_wxListItem_m_data_set(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_data_set(_arg0,_arg1); + _result = (long )wxListItem_m_data_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1984,7 +1964,7 @@ static PyObject *_wrap_wxListItem_m_data_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListItem_m_data_get(_arg0); + _result = (long )wxListItem_m_data_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2013,7 +1993,7 @@ static PyObject *_wrap_wxListItem_m_format_set(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_format_set(_arg0,_arg1); + _result = (int )wxListItem_m_format_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2041,7 +2021,7 @@ static PyObject *_wrap_wxListItem_m_format_get(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_format_get(_arg0); + _result = (int )wxListItem_m_format_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2070,7 +2050,7 @@ static PyObject *_wrap_wxListItem_m_width_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_width_set(_arg0,_arg1); + _result = (int )wxListItem_m_width_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2098,7 +2078,7 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListItem_m_width_get(_arg0); + _result = (int )wxListItem_m_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2152,7 +2132,7 @@ static PyObject *_wrap_new_wxListEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListEvent *)new_wxListEvent(_arg0,_arg1); + _result = (wxListEvent *)new_wxListEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2187,7 +2167,7 @@ static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_code_set(_arg0,_arg1); + _result = (int )wxListEvent_m_code_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2215,7 +2195,7 @@ static PyObject *_wrap_wxListEvent_m_code_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_code_get(_arg0); + _result = (int )wxListEvent_m_code_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2244,7 +2224,7 @@ static PyObject *_wrap_wxListEvent_m_oldItemIndex_set(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1); + _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2272,7 +2252,7 @@ static PyObject *_wrap_wxListEvent_m_oldItemIndex_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); + _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2301,7 +2281,7 @@ static PyObject *_wrap_wxListEvent_m_itemIndex_set(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_itemIndex_set(_arg0,_arg1); + _result = (long )wxListEvent_m_itemIndex_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2329,7 +2309,7 @@ static PyObject *_wrap_wxListEvent_m_itemIndex_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_m_itemIndex_get(_arg0); + _result = (long )wxListEvent_m_itemIndex_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2358,7 +2338,7 @@ static PyObject *_wrap_wxListEvent_m_col_set(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_col_set(_arg0,_arg1); + _result = (int )wxListEvent_m_col_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2386,7 +2366,7 @@ static PyObject *_wrap_wxListEvent_m_col_get(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_m_col_get(_arg0); + _result = (int )wxListEvent_m_col_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2423,7 +2403,7 @@ static PyObject *_wrap_wxListEvent_m_pointDrag_set(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxListEvent_m_pointDrag_set(_arg0,_arg1); + _result = (wxPoint *)wxListEvent_m_pointDrag_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2458,7 +2438,7 @@ static PyObject *_wrap_wxListEvent_m_pointDrag_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0); + _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2501,7 +2481,7 @@ static PyObject *_wrap_wxListEvent_m_item_set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1); + _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2529,7 +2509,7 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxListEvent_m_item_get(_arg0); + _result = (wxListItem *)wxListEvent_m_item_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2557,7 +2537,7 @@ static PyObject *_wrap_wxListEvent_GetCode(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_GetCode(_arg0); + _result = (int )wxListEvent_GetCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2585,7 +2565,7 @@ static PyObject *_wrap_wxListEvent_GetIndex(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetIndex(_arg0); + _result = (long )wxListEvent_GetIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2613,7 +2593,7 @@ static PyObject *_wrap_wxListEvent_GetColumn(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_GetColumn(_arg0); + _result = (int )wxListEvent_GetColumn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2642,7 +2622,7 @@ static PyObject *_wrap_wxListEvent_GetPoint(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxListEvent_GetPoint(_arg0)); + _result = new wxPoint (wxListEvent_GetPoint(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2671,13 +2651,17 @@ static PyObject *_wrap_wxListEvent_GetLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxListEvent_GetLabel(_arg0); + const wxString & _result_ref = wxListEvent_GetLabel(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -2702,13 +2686,17 @@ static PyObject *_wrap_wxListEvent_GetText(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxListEvent_GetText(_arg0); + const wxString & _result_ref = wxListEvent_GetText(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -2733,7 +2721,7 @@ static PyObject *_wrap_wxListEvent_GetImage(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListEvent_GetImage(_arg0); + _result = (int )wxListEvent_GetImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2761,7 +2749,7 @@ static PyObject *_wrap_wxListEvent_GetData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetData(_arg0); + _result = (long )wxListEvent_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2789,7 +2777,7 @@ static PyObject *_wrap_wxListEvent_GetMask(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetMask(_arg0); + _result = (long )wxListEvent_GetMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2817,7 +2805,7 @@ static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxListItem & _result_ref = wxListEvent_GetItem(_arg0); + const wxListItem & _result_ref = wxListEvent_GetItem(_arg0); _result = (wxListItem *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2846,7 +2834,7 @@ static PyObject *_wrap_wxListEvent_GetCacheFrom(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetCacheFrom(_arg0); + _result = (long )wxListEvent_GetCacheFrom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2874,7 +2862,7 @@ static PyObject *_wrap_wxListEvent_GetCacheTo(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListEvent_GetCacheTo(_arg0); + _result = (long )wxListEvent_GetCacheTo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2965,7 +2953,7 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxPyListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2991,7 +2979,7 @@ static PyObject *_wrap_new_wxPreListCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyListCtrl *)new_wxPreListCtrl(); + _result = (wxPyListCtrl *)new_wxPreListCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3064,7 +3052,7 @@ static PyObject *_wrap_wxListCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3101,7 +3089,7 @@ static PyObject *_wrap_wxListCtrl__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl__setCallbackInfo(_arg0,_arg1,_arg2); + wxListCtrl__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3138,7 +3126,7 @@ static PyObject *_wrap_wxListCtrl_SetForegroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetForegroundColour(_arg0,*_arg1); + _result = (bool )wxListCtrl_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3174,7 +3162,7 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetBackgroundColour(_arg0,*_arg1); + _result = (bool )wxListCtrl_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3209,7 +3197,7 @@ static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxPyListCtrl_GetColumn(_arg0,_arg1); + _result = (wxListItem *)wxPyListCtrl_GetColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3247,7 +3235,7 @@ static PyObject *_wrap_wxListCtrl_SetColumn(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2); + _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3276,7 +3264,7 @@ static PyObject *_wrap_wxListCtrl_GetColumnWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1); + _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3306,7 +3294,7 @@ static PyObject *_wrap_wxListCtrl_SetColumnWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2); + _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3334,7 +3322,7 @@ static PyObject *_wrap_wxListCtrl_GetCountPerPage(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetCountPerPage(_arg0); + _result = (int )wxListCtrl_GetCountPerPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3362,7 +3350,7 @@ static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); + _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3399,7 +3387,7 @@ static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListItem *)wxPyListCtrl_GetItem(_arg0,_arg1,_arg2); + _result = (wxListItem *)wxPyListCtrl_GetItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3436,7 +3424,7 @@ static PyObject *_wrap_wxListCtrl_SetItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1); + _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3468,26 +3456,13 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_SetStringItem(_arg0,_arg1,_arg2,*_arg3,_arg4); + _result = (long )wxListCtrl_SetStringItem(_arg0,_arg1,_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3521,7 +3496,7 @@ static PyObject *_wrap_wxListCtrl_GetItemState(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2); + _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3552,7 +3527,7 @@ static PyObject *_wrap_wxListCtrl_SetItemState(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3583,7 +3558,7 @@ static PyObject *_wrap_wxListCtrl_SetItemImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3612,12 +3587,16 @@ static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1)); + _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3646,26 +3625,13 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetItemText(_arg0,_arg1,*_arg2); + wxListCtrl_SetItemText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3699,7 +3665,7 @@ static PyObject *_wrap_wxListCtrl_GetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_GetItemData(_arg0,_arg1); + _result = (long )wxListCtrl_GetItemData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3729,7 +3695,7 @@ static PyObject *_wrap_wxListCtrl_SetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2); + _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3763,7 +3729,7 @@ static PyObject *_wrap_wxListCtrl_GetItemPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)wxPyListCtrl_GetItemPosition(_arg0,_arg1); + _result = (wxPoint *)wxPyListCtrl_GetItemPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3804,7 +3770,7 @@ static PyObject *_wrap_wxListCtrl_GetItemRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)wxPyListCtrl_GetItemRect(_arg0,_arg1,_arg2); + _result = (wxRect *)wxPyListCtrl_GetItemRect(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3847,7 +3813,7 @@ static PyObject *_wrap_wxListCtrl_SetItemPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2); + _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3875,7 +3841,7 @@ static PyObject *_wrap_wxListCtrl_GetItemCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetItemCount(_arg0); + _result = (int )wxListCtrl_GetItemCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3903,7 +3869,7 @@ static PyObject *_wrap_wxListCtrl_GetColumnCount(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetColumnCount(_arg0); + _result = (int )wxListCtrl_GetColumnCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3934,7 +3900,7 @@ static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1); + _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3962,7 +3928,7 @@ static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxListCtrl_GetSelectedItemCount(_arg0); + _result = (int )wxListCtrl_GetSelectedItemCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3991,7 +3957,7 @@ static PyObject *_wrap_wxListCtrl_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); + _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4027,7 +3993,7 @@ static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetTextColour(_arg0,*_arg1); + wxListCtrl_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4056,7 +4022,7 @@ static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_GetTopItem(_arg0); + _result = (long )wxListCtrl_GetTopItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4087,7 +4053,7 @@ static PyObject *_wrap_wxListCtrl_SetSingleStyle(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2); + wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4116,7 +4082,7 @@ static PyObject *_wrap_wxListCtrl_SetWindowStyleFlag(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetWindowStyleFlag(_arg0,_arg1); + wxListCtrl_SetWindowStyleFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4148,7 +4114,7 @@ static PyObject *_wrap_wxListCtrl_GetNextItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3); + _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4177,7 +4143,7 @@ static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); + _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4214,7 +4180,7 @@ static PyObject *_wrap_wxListCtrl_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetImageList(_arg0,_arg1,_arg2); + wxListCtrl_SetImageList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4252,7 +4218,7 @@ static PyObject *_wrap_wxListCtrl_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_AssignImageList(_arg0,_arg1,_arg2); + wxListCtrl_AssignImageList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4281,7 +4247,7 @@ static PyObject *_wrap_wxListCtrl_IsVirtual(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_IsVirtual(_arg0); + _result = (bool )wxListCtrl_IsVirtual(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4309,7 +4275,7 @@ static PyObject *_wrap_wxListCtrl_RefreshItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_RefreshItem(_arg0,_arg1); + wxListCtrl_RefreshItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4339,7 +4305,7 @@ static PyObject *_wrap_wxListCtrl_RefreshItems(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_RefreshItems(_arg0,_arg1,_arg2); + wxListCtrl_RefreshItems(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4369,7 +4335,7 @@ static PyObject *_wrap_wxListCtrl_Arrange(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_Arrange(_arg0,_arg1); + _result = (bool )wxListCtrl_Arrange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4398,7 +4364,7 @@ static PyObject *_wrap_wxListCtrl_DeleteItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1); + _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4426,7 +4392,7 @@ static PyObject *_wrap_wxListCtrl_DeleteAllItems(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteAllItems(_arg0); + _result = (bool )wxListCtrl_DeleteAllItems(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4455,7 +4421,7 @@ static PyObject *_wrap_wxListCtrl_DeleteColumn(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1); + _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4483,7 +4449,7 @@ static PyObject *_wrap_wxListCtrl_DeleteAllColumns(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_DeleteAllColumns(_arg0); + _result = (bool )wxListCtrl_DeleteAllColumns(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4510,7 +4476,7 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_ClearAll(_arg0); + wxListCtrl_ClearAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4540,7 +4506,7 @@ static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)wxListCtrl_EditLabel(_arg0,_arg1); + _result = (wxTextCtrl *)wxListCtrl_EditLabel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4571,7 +4537,7 @@ static PyObject *_wrap_wxListCtrl_EndEditLabel(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_EndEditLabel(_arg0,_arg1); + _result = (bool )wxListCtrl_EndEditLabel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4600,7 +4566,7 @@ static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1); + _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4632,27 +4598,14 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3); + _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4686,7 +4639,7 @@ static PyObject *_wrap_wxListCtrl_FindItemData(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2); + _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4724,7 +4677,7 @@ static PyObject *_wrap_wxListCtrl_FindItemAtPos(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3); + _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4765,7 +4718,7 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2); + _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4807,7 +4760,7 @@ static PyObject *_wrap_wxListCtrl_InsertItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1); + _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4837,26 +4790,13 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4890,7 +4830,7 @@ static PyObject *_wrap_wxListCtrl_InsertImageItem(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2); + _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4921,26 +4861,13 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3); + _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4982,7 +4909,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5014,26 +4941,13 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5065,7 +4979,7 @@ static PyObject *_wrap_wxListCtrl_SetItemCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListCtrl_SetItemCount(_arg0,_arg1); + wxListCtrl_SetItemCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5096,7 +5010,7 @@ static PyObject *_wrap_wxListCtrl_ScrollList(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2); + _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5133,7 +5047,7 @@ static PyObject *_wrap_wxListCtrl_SortItems(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyListCtrl_SortItems(_arg0,_arg1); + _result = (bool )wxPyListCtrl_SortItems(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5233,26 +5147,13 @@ static PyObject *_wrap_new_wxListView(PyObject *self, PyObject *args, PyObject * } if (_obj6) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg6 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) return NULL; - } - _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListView *)new_wxListView(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6); + _result = (wxListView *)new_wxListView(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5282,7 +5183,7 @@ static PyObject *_wrap_new_wxPreListView(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListView *)new_wxPreListView(); + _result = (wxListView *)new_wxPreListView(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5356,26 +5257,13 @@ static PyObject *_wrap_wxListView_Create(PyObject *self, PyObject *args, PyObjec } if (_obj7) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg7 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) return NULL; - } - _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListView_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); + _result = (bool )wxListView_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5410,7 +5298,7 @@ static PyObject *_wrap_wxListView_Select(PyObject *self, PyObject *args, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_Select(_arg0,_arg1,_arg2); + wxListView_Select(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5439,7 +5327,7 @@ static PyObject *_wrap_wxListView_Focus(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_Focus(_arg0,_arg1); + wxListView_Focus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5468,7 +5356,7 @@ static PyObject *_wrap_wxListView_GetFocusedItem(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListView_GetFocusedItem(_arg0); + _result = (long )wxListView_GetFocusedItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5497,7 +5385,7 @@ static PyObject *_wrap_wxListView_GetNextSelected(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListView_GetNextSelected(_arg0,_arg1); + _result = (long )wxListView_GetNextSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5525,7 +5413,7 @@ static PyObject *_wrap_wxListView_GetFirstSelected(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxListView_GetFirstSelected(_arg0); + _result = (long )wxListView_GetFirstSelected(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5554,7 +5442,7 @@ static PyObject *_wrap_wxListView_IsSelected(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListView_IsSelected(_arg0,_arg1); + _result = (bool )wxListView_IsSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5583,7 +5471,7 @@ static PyObject *_wrap_wxListView_SetColumnImage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_SetColumnImage(_arg0,_arg1,_arg2); + wxListView_SetColumnImage(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5612,7 +5500,7 @@ static PyObject *_wrap_wxListView_ClearColumnImage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListView_ClearColumnImage(_arg0,_arg1); + wxListView_ClearColumnImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5660,7 +5548,7 @@ static PyObject *_wrap_new_wxTreeItemAttr(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeItemAttr *)new_wxTreeItemAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTreeItemAttr *)new_wxTreeItemAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5701,7 +5589,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemAttr_SetTextColour(_arg0,*_arg1); + wxTreeItemAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5737,7 +5625,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemAttr_SetBackgroundColour(_arg0,*_arg1); + wxTreeItemAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5774,7 +5662,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemAttr_SetFont(_arg0,*_arg1); + wxTreeItemAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5803,7 +5691,7 @@ static PyObject *_wrap_wxTreeItemAttr_HasTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemAttr_HasTextColour(_arg0); + _result = (bool )wxTreeItemAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5831,7 +5719,7 @@ static PyObject *_wrap_wxTreeItemAttr_HasBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemAttr_HasBackgroundColour(_arg0); + _result = (bool )wxTreeItemAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5859,7 +5747,7 @@ static PyObject *_wrap_wxTreeItemAttr_HasFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemAttr_HasFont(_arg0); + _result = (bool )wxTreeItemAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5888,7 +5776,7 @@ static PyObject *_wrap_wxTreeItemAttr_GetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTreeItemAttr_GetTextColour(_arg0)); + _result = new wxColour (wxTreeItemAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5918,7 +5806,7 @@ static PyObject *_wrap_wxTreeItemAttr_GetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTreeItemAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxTreeItemAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5948,7 +5836,7 @@ static PyObject *_wrap_wxTreeItemAttr_GetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxTreeItemAttr_GetFont(_arg0)); + _result = new wxFont (wxTreeItemAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5969,7 +5857,7 @@ static PyObject *_wrap_new_wxTreeItemId(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeItemId *)new_wxTreeItemId(); + _result = (wxTreeItemId *)new_wxTreeItemId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6002,7 +5890,7 @@ static PyObject *_wrap_delete_wxTreeItemId(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTreeItemId(_arg0); + delete_wxTreeItemId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6031,7 +5919,7 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeItemId_IsOk(_arg0); + _result = (bool )wxTreeItemId_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6071,7 +5959,7 @@ static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeItemId___cmp__(_arg0,_arg1); + _result = (int )wxTreeItemId___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6105,7 +5993,7 @@ static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeItemData *)new_wxTreeItemData(_arg0); + _result = (wxPyTreeItemData *)new_wxTreeItemData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6139,7 +6027,7 @@ static PyObject *_wrap_wxTreeItemData_GetData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxTreeItemData_GetData(_arg0); + _result = (PyObject *)wxTreeItemData_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6173,7 +6061,7 @@ static PyObject *_wrap_wxTreeItemData_SetData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemData_SetData(_arg0,_arg1); + wxTreeItemData_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6203,7 +6091,7 @@ static PyObject *_wrap_wxTreeItemData_GetId(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxTreeItemId & _result_ref = wxTreeItemData_GetId(_arg0); + const wxTreeItemId & _result_ref = wxTreeItemData_GetId(_arg0); _result = (wxTreeItemId *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6246,7 +6134,7 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeItemData_SetId(_arg0,*_arg1); + wxTreeItemData_SetId(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6301,7 +6189,7 @@ static PyObject *_wrap_new_wxTreeEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeEvent *)new_wxTreeEvent(_arg0,_arg1); + _result = (wxTreeEvent *)new_wxTreeEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6336,7 +6224,7 @@ static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeEvent_GetItem(_arg0)); + _result = new wxTreeItemId (wxTreeEvent_GetItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6366,7 +6254,7 @@ static PyObject *_wrap_wxTreeEvent_GetOldItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0)); + _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6396,7 +6284,7 @@ static PyObject *_wrap_wxTreeEvent_GetPoint(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxTreeEvent_GetPoint(_arg0)); + _result = new wxPoint (wxTreeEvent_GetPoint(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6426,7 +6314,7 @@ static PyObject *_wrap_wxTreeEvent_GetKeyEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); + const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); _result = (wxKeyEvent *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6461,7 +6349,7 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeEvent_GetCode(_arg0); + _result = (int )wxTreeEvent_GetCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6489,13 +6377,17 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); + const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -6583,7 +6475,7 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6609,7 +6501,7 @@ static PyObject *_wrap_new_wxPreTreeCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeCtrl *)new_wxPreTreeCtrl(); + _result = (wxPyTreeCtrl *)new_wxPreTreeCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6682,7 +6574,7 @@ static PyObject *_wrap_wxTreeCtrl_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxTreeCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6719,7 +6611,7 @@ static PyObject *_wrap_wxTreeCtrl__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl__setCallbackInfo(_arg0,_arg1,_arg2); + wxTreeCtrl__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6748,7 +6640,7 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTreeCtrl_GetCount(_arg0); + _result = (size_t )wxTreeCtrl_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6776,7 +6668,7 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned int )wxTreeCtrl_GetIndent(_arg0); + _result = (unsigned int )wxTreeCtrl_GetIndent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6804,7 +6696,7 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetIndent(_arg0,_arg1); + wxTreeCtrl_SetIndent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6833,7 +6725,7 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0); + _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6861,7 +6753,7 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0); + _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6897,7 +6789,7 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetImageList(_arg0,_arg1); + wxTreeCtrl_SetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6934,7 +6826,7 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetStateImageList(_arg0,_arg1); + wxTreeCtrl_SetStateImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6971,7 +6863,7 @@ static PyObject *_wrap_wxTreeCtrl_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_AssignImageList(_arg0,_arg1); + wxTreeCtrl_AssignImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7008,7 +6900,7 @@ static PyObject *_wrap_wxTreeCtrl_AssignStateImageList(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_AssignStateImageList(_arg0,_arg1); + wxTreeCtrl_AssignStateImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7037,7 +6929,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned int )wxTreeCtrl_GetSpacing(_arg0); + _result = (unsigned int )wxTreeCtrl_GetSpacing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7065,7 +6957,7 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetSpacing(_arg0,_arg1); + wxTreeCtrl_SetSpacing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7103,12 +6995,16 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTreeCtrl_GetItemText(_arg0,*_arg1)); + _result = new wxString (wxTreeCtrl_GetItemText(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7146,7 +7042,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeCtrl_GetItemImage(_arg0,*_arg1,_arg2); + _result = (int )wxTreeCtrl_GetItemImage(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7183,7 +7079,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeCtrl_GetItemSelectedImage(_arg0,*_arg1); + _result = (int )wxTreeCtrl_GetItemSelectedImage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7220,26 +7116,13 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemText(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7282,7 +7165,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemImage(_arg0,*_arg1,_arg2,_arg3); + wxTreeCtrl_SetItemImage(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7320,7 +7203,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemSelectedImage(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemSelectedImage(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7360,7 +7243,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7407,7 +7290,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1); + _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7461,7 +7344,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7507,7 +7390,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1); + _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7558,7 +7441,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7596,7 +7479,7 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsVisible(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsVisible(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7633,7 +7516,7 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7670,7 +7553,7 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsExpanded(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsExpanded(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7707,7 +7590,7 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsSelected(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsSelected(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7736,7 +7619,7 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetRootItem(_arg0)); + _result = new wxTreeItemId (wxTreeCtrl_GetRootItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7766,7 +7649,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetSelection(_arg0)); + _result = new wxTreeItemId (wxTreeCtrl_GetSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7805,7 +7688,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetItemParent(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetItemParent(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7847,7 +7730,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0); + _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7889,7 +7772,7 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2); + _result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7934,7 +7817,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetFirstChild(_arg0,*_arg1,*_arg2)); + _result = new wxTreeItemId (wxTreeCtrl_GetFirstChild(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7985,7 +7868,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetNextChild(_arg0,*_arg1,*_arg2)); + _result = new wxTreeItemId (wxTreeCtrl_GetNextChild(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8029,7 +7912,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetNextSibling(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetNextSibling(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8068,7 +7951,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetPrevSibling(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetPrevSibling(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8098,7 +7981,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetFirstVisibleItem(_arg0)); + _result = new wxTreeItemId (wxTreeCtrl_GetFirstVisibleItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8137,7 +8020,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetNextVisible(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetNextVisible(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8176,7 +8059,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetPrevVisible(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetPrevVisible(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8215,7 +8098,7 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1)); + _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8250,22 +8133,9 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -8276,7 +8146,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_AddRoot(_arg0,*_arg1,_arg2,_arg3,_arg4)); + _result = new wxTreeItemId (wxTreeCtrl_AddRoot(_arg0,*_arg1,_arg2,_arg3,_arg4)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8324,22 +8194,9 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -8350,7 +8207,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_PrependItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); + _result = new wxTreeItemId (wxTreeCtrl_PrependItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8407,22 +8264,9 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8433,7 +8277,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_InsertItem(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6)); + _result = new wxTreeItemId (wxTreeCtrl_InsertItem(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8482,22 +8326,9 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8508,7 +8339,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6)); + _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8556,22 +8387,9 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -8582,7 +8400,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_AppendItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); + _result = new wxTreeItemId (wxTreeCtrl_AppendItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8623,7 +8441,7 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Delete(_arg0,*_arg1); + wxTreeCtrl_Delete(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8660,7 +8478,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_DeleteChildren(_arg0,*_arg1); + wxTreeCtrl_DeleteChildren(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8688,7 +8506,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_DeleteAllItems(_arg0); + wxTreeCtrl_DeleteAllItems(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8725,7 +8543,7 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Expand(_arg0,*_arg1); + wxTreeCtrl_Expand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8762,7 +8580,7 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Collapse(_arg0,*_arg1); + wxTreeCtrl_Collapse(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8799,7 +8617,7 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_CollapseAndReset(_arg0,*_arg1); + wxTreeCtrl_CollapseAndReset(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8836,7 +8654,7 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Toggle(_arg0,*_arg1); + wxTreeCtrl_Toggle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8864,7 +8682,7 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_Unselect(_arg0); + wxTreeCtrl_Unselect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8892,7 +8710,7 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_UnselectAll(_arg0); + wxTreeCtrl_UnselectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8929,7 +8747,7 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SelectItem(_arg0,*_arg1); + wxTreeCtrl_SelectItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8966,7 +8784,7 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_EnsureVisible(_arg0,*_arg1); + wxTreeCtrl_EnsureVisible(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9003,7 +8821,7 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_ScrollTo(_arg0,*_arg1); + wxTreeCtrl_ScrollTo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9041,7 +8859,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); + _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9069,7 +8887,7 @@ static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); + _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9106,7 +8924,7 @@ static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2); + wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9143,7 +8961,7 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SortChildren(_arg0,*_arg1); + wxTreeCtrl_SortChildren(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9181,7 +8999,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9219,7 +9037,7 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1); + _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9261,7 +9079,7 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2)); + _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9311,7 +9129,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9356,7 +9174,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9402,7 +9220,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2); + wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9440,7 +9258,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemDropHighlight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeCtrl_SetItemDropHighlight(_arg0,*_arg1,_arg2); + wxTreeCtrl_SetItemDropHighlight(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9492,7 +9310,7 @@ static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); + _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9527,45 +9345,19 @@ static PyObject *_wrap_new_wxDirItemData(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:new_wxDirItemData",_kwnames,&_obj0,&_obj1,&tempbool2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirItemData *)new_wxDirItemData(*_arg0,*_arg1,_arg2); + _result = (wxDirItemData *)new_wxDirItemData(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9607,26 +9399,13 @@ static PyObject *_wrap_wxDirItemData_SetNewDirName(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirItemData_SetNewDirName(_arg0,*_arg1); + wxDirItemData_SetNewDirName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9660,31 +9439,22 @@ static PyObject *_wrap_wxDirItemData_m_path_set(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_path_set(_arg0,_arg1); + _result = (wxString *)wxDirItemData_m_path_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -9713,12 +9483,16 @@ static PyObject *_wrap_wxDirItemData_m_path_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_path_get(_arg0); + _result = (wxString *)wxDirItemData_m_path_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -9744,31 +9518,22 @@ static PyObject *_wrap_wxDirItemData_m_name_set(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_name_set(_arg0,_arg1); + _result = (wxString *)wxDirItemData_m_name_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -9797,12 +9562,16 @@ static PyObject *_wrap_wxDirItemData_m_name_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxDirItemData_m_name_get(_arg0); + _result = (wxString *)wxDirItemData_m_name_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -9830,7 +9599,7 @@ static PyObject *_wrap_wxDirItemData_m_isHidden_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isHidden_set(_arg0,_arg1); + _result = (bool )wxDirItemData_m_isHidden_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9858,7 +9627,7 @@ static PyObject *_wrap_wxDirItemData_m_isHidden_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isHidden_get(_arg0); + _result = (bool )wxDirItemData_m_isHidden_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9889,7 +9658,7 @@ static PyObject *_wrap_wxDirItemData_m_isExpanded_set(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isExpanded_set(_arg0,_arg1); + _result = (bool )wxDirItemData_m_isExpanded_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9917,7 +9686,7 @@ static PyObject *_wrap_wxDirItemData_m_isExpanded_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isExpanded_get(_arg0); + _result = (bool )wxDirItemData_m_isExpanded_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9948,7 +9717,7 @@ static PyObject *_wrap_wxDirItemData_m_isDir_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isDir_set(_arg0,_arg1); + _result = (bool )wxDirItemData_m_isDir_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9976,7 +9745,7 @@ static PyObject *_wrap_wxDirItemData_m_isDir_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirItemData_m_isDir_get(_arg0); + _result = (bool )wxDirItemData_m_isDir_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10061,7 +9830,7 @@ static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8); + _result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10087,7 +9856,7 @@ static PyObject *_wrap_new_wxPreGenericDirCtrl(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDirCtrl *)new_wxPreGenericDirCtrl(); + _result = (wxGenericDirCtrl *)new_wxPreGenericDirCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10154,7 +9923,7 @@ static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10183,26 +9952,13 @@ static PyObject *_wrap_wxGenericDirCtrl_ExpandPath(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGenericDirCtrl_ExpandPath(_arg0,*_arg1); + _result = (bool )wxGenericDirCtrl_ExpandPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10234,12 +9990,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetDefaultPath(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetDefaultPath(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetDefaultPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10267,26 +10027,13 @@ static PyObject *_wrap_wxGenericDirCtrl_SetDefaultPath(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetDefaultPath(_arg0,*_arg1); + wxGenericDirCtrl_SetDefaultPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10319,12 +10066,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetPath(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetPath(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10352,12 +10103,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilePath(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetFilePath(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetFilePath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10385,26 +10140,13 @@ static PyObject *_wrap_wxGenericDirCtrl_SetPath(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetPath(_arg0,*_arg1); + wxGenericDirCtrl_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10439,7 +10181,7 @@ static PyObject *_wrap_wxGenericDirCtrl_ShowHidden(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_ShowHidden(_arg0,_arg1); + wxGenericDirCtrl_ShowHidden(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10468,7 +10210,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetShowHidden(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGenericDirCtrl_GetShowHidden(_arg0); + _result = (bool )wxGenericDirCtrl_GetShowHidden(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10496,12 +10238,16 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilter(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGenericDirCtrl_GetFilter(_arg0)); + _result = new wxString (wxGenericDirCtrl_GetFilter(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10529,26 +10275,13 @@ static PyObject *_wrap_wxGenericDirCtrl_SetFilter(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetFilter(_arg0,*_arg1); + wxGenericDirCtrl_SetFilter(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10581,7 +10314,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilterIndex(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGenericDirCtrl_GetFilterIndex(_arg0); + _result = (int )wxGenericDirCtrl_GetFilterIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10609,7 +10342,7 @@ static PyObject *_wrap_wxGenericDirCtrl_SetFilterIndex(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGenericDirCtrl_SetFilterIndex(_arg0,_arg1); + wxGenericDirCtrl_SetFilterIndex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10639,7 +10372,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetRootId(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxGenericDirCtrl_GetRootId(_arg0)); + _result = new wxTreeItemId (wxGenericDirCtrl_GetRootId(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10669,7 +10402,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTreeCtrl *)wxGenericDirCtrl_GetTreeCtrl(_arg0); + _result = (wxTreeCtrl *)wxGenericDirCtrl_GetTreeCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10704,7 +10437,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilterListCtrl(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirFilterListCtrl *)wxGenericDirCtrl_GetFilterListCtrl(_arg0); + _result = (wxDirFilterListCtrl *)wxGenericDirCtrl_GetFilterListCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10807,7 +10540,7 @@ static PyObject *_wrap_new_wxDirFilterListCtrl(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirFilterListCtrl *)new_wxDirFilterListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxDirFilterListCtrl *)new_wxDirFilterListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10833,7 +10566,7 @@ static PyObject *_wrap_new_wxPreDirFilterListCtrl(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirFilterListCtrl *)new_wxPreDirFilterListCtrl(); + _result = (wxDirFilterListCtrl *)new_wxPreDirFilterListCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10896,7 +10629,7 @@ static PyObject *_wrap_wxDirFilterListCtrl_Create(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDirFilterListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); + _result = (bool )wxDirFilterListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10925,26 +10658,13 @@ static PyObject *_wrap_wxDirFilterListCtrl_FillFilterList(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDirFilterListCtrl_FillFilterList(_arg0,*_arg1,_arg2); + wxDirFilterListCtrl_FillFilterList(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index ddb24cf053..7dd5e886c3 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -103,7 +97,7 @@ static PyObject *_wrap_wxNewEventType(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNewEventType(); + _result = (int )wxNewEventType(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -138,7 +132,7 @@ static PyObject *_wrap_delete_wxEvent(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxEvent(_arg0); + delete_wxEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -167,7 +161,7 @@ static PyObject *_wrap_wxEvent_GetEventObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxObject *)wxEvent_GetEventObject(_arg0); + _result = (wxObject *)wxEvent_GetEventObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -195,7 +189,7 @@ static PyObject *_wrap_wxEvent_GetEventType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEventType )wxEvent_GetEventType(_arg0); + _result = (wxEventType )wxEvent_GetEventType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -223,7 +217,7 @@ static PyObject *_wrap_wxEvent_GetId(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxEvent_GetId(_arg0); + _result = (int )wxEvent_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -251,7 +245,7 @@ static PyObject *_wrap_wxEvent_GetSkipped(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvent_GetSkipped(_arg0); + _result = (bool )wxEvent_GetSkipped(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -279,7 +273,7 @@ static PyObject *_wrap_wxEvent_GetTimestamp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxEvent_GetTimestamp(_arg0); + _result = (long )wxEvent_GetTimestamp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -315,7 +309,7 @@ static PyObject *_wrap_wxEvent_SetEventObject(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetEventObject(_arg0,_arg1); + wxEvent_SetEventObject(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -344,7 +338,7 @@ static PyObject *_wrap_wxEvent_SetEventType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetEventType(_arg0,_arg1); + wxEvent_SetEventType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -373,7 +367,7 @@ static PyObject *_wrap_wxEvent_SetId(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetId(_arg0,_arg1); + wxEvent_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -402,7 +396,7 @@ static PyObject *_wrap_wxEvent_SetTimestamp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_SetTimestamp(_arg0,_arg1); + wxEvent_SetTimestamp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -433,7 +427,7 @@ static PyObject *_wrap_wxEvent_Skip(PyObject *self, PyObject *args, PyObject *kw _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvent_Skip(_arg0,_arg1); + wxEvent_Skip(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -463,7 +457,7 @@ static PyObject *_wrap_wxEvent_Clone(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvent *)wxEvent_Clone(_arg0); + _result = (wxEvent *)wxEvent_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -514,7 +508,7 @@ static PyObject *_wrap_new_wxSizeEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizeEvent *)new_wxSizeEvent(*_arg0,_arg1); + _result = (wxSizeEvent *)new_wxSizeEvent(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -549,7 +543,7 @@ static PyObject *_wrap_wxSizeEvent_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizeEvent_GetSize(_arg0)); + _result = new wxSize (wxSizeEvent_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -588,7 +582,7 @@ static PyObject *_wrap_new_wxCloseEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCloseEvent *)new_wxCloseEvent(_arg0,_arg1); + _result = (wxCloseEvent *)new_wxCloseEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -624,7 +618,7 @@ static PyObject *_wrap_wxCloseEvent_SetLoggingOff(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCloseEvent_SetLoggingOff(_arg0,_arg1); + wxCloseEvent_SetLoggingOff(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -653,7 +647,7 @@ static PyObject *_wrap_wxCloseEvent_GetLoggingOff(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCloseEvent_GetLoggingOff(_arg0); + _result = (bool )wxCloseEvent_GetLoggingOff(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -683,7 +677,7 @@ static PyObject *_wrap_wxCloseEvent_Veto(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCloseEvent_Veto(_arg0,_arg1); + wxCloseEvent_Veto(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -712,7 +706,7 @@ static PyObject *_wrap_wxCloseEvent_CanVeto(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCloseEvent_CanVeto(_arg0); + _result = (bool )wxCloseEvent_CanVeto(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -740,7 +734,7 @@ static PyObject *_wrap_wxCloseEvent_GetVeto(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCloseEvent_GetVeto(_arg0); + _result = (bool )wxCloseEvent_GetVeto(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -770,7 +764,7 @@ static PyObject *_wrap_wxCloseEvent_SetCanVeto(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCloseEvent_SetCanVeto(_arg0,_arg1); + wxCloseEvent_SetCanVeto(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -809,7 +803,7 @@ static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCommandEvent *)new_wxCommandEvent(_arg0,_arg1); + _result = (wxCommandEvent *)new_wxCommandEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -843,7 +837,7 @@ static PyObject *_wrap_wxCommandEvent_IsChecked(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCommandEvent_IsChecked(_arg0); + _result = (bool )wxCommandEvent_IsChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -871,7 +865,7 @@ static PyObject *_wrap_wxCommandEvent_GetExtraLong(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxCommandEvent_GetExtraLong(_arg0); + _result = (long )wxCommandEvent_GetExtraLong(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -899,7 +893,7 @@ static PyObject *_wrap_wxCommandEvent_GetInt(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCommandEvent_GetInt(_arg0); + _result = (int )wxCommandEvent_GetInt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -927,7 +921,7 @@ static PyObject *_wrap_wxCommandEvent_GetSelection(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCommandEvent_GetSelection(_arg0); + _result = (int )wxCommandEvent_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -955,12 +949,16 @@ static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxCommandEvent_GetString(_arg0)); + _result = new wxString (wxCommandEvent_GetString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -988,7 +986,7 @@ static PyObject *_wrap_wxCommandEvent_IsSelection(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCommandEvent_IsSelection(_arg0); + _result = (bool )wxCommandEvent_IsSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1016,26 +1014,13 @@ static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCommandEvent_SetString(_arg0,*_arg1); + wxCommandEvent_SetString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1068,7 +1053,7 @@ static PyObject *_wrap_wxCommandEvent_SetExtraLong(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCommandEvent_SetExtraLong(_arg0,_arg1); + wxCommandEvent_SetExtraLong(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1097,7 +1082,7 @@ static PyObject *_wrap_wxCommandEvent_SetInt(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCommandEvent_SetInt(_arg0,_arg1); + wxCommandEvent_SetInt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1135,7 +1120,7 @@ static PyObject *_wrap_wxCommandEvent_GetClientData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxCommandEvent_GetClientData(_arg0); + _result = (PyObject *)wxCommandEvent_GetClientData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1185,7 +1170,7 @@ static PyObject *_wrap_new_wxScrollEvent(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollEvent *)new_wxScrollEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxScrollEvent *)new_wxScrollEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1219,7 +1204,7 @@ static PyObject *_wrap_wxScrollEvent_GetOrientation(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollEvent_GetOrientation(_arg0); + _result = (int )wxScrollEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1247,7 +1232,7 @@ static PyObject *_wrap_wxScrollEvent_GetPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollEvent_GetPosition(_arg0); + _result = (int )wxScrollEvent_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1286,7 +1271,7 @@ static PyObject *_wrap_new_wxScrollWinEvent(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollWinEvent *)new_wxScrollWinEvent(_arg0,_arg1,_arg2); + _result = (wxScrollWinEvent *)new_wxScrollWinEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1320,7 +1305,7 @@ static PyObject *_wrap_wxScrollWinEvent_GetOrientation(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollWinEvent_GetOrientation(_arg0); + _result = (int )wxScrollWinEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1348,7 +1333,7 @@ static PyObject *_wrap_wxScrollWinEvent_GetPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollWinEvent_GetPosition(_arg0); + _result = (int )wxScrollWinEvent_GetPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1402,7 +1387,7 @@ static PyObject *_wrap_new_wxSpinEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinEvent *)new_wxSpinEvent(_arg0,_arg1); + _result = (wxSpinEvent *)new_wxSpinEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1445,7 +1430,7 @@ static PyObject *_wrap_new_wxMouseEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMouseEvent *)new_wxMouseEvent(_arg0); + _result = (wxMouseEvent *)new_wxMouseEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1464,7 @@ static PyObject *_wrap_wxMouseEvent_IsButton(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_IsButton(_arg0); + _result = (bool )wxMouseEvent_IsButton(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1508,7 +1493,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonDown(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1537,7 +1522,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonDClick(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonDClick(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonDClick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1566,7 +1551,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonUp(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonUp(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1595,7 +1580,7 @@ static PyObject *_wrap_wxMouseEvent_Button(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Button(_arg0,_arg1); + _result = (bool )wxMouseEvent_Button(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1624,7 +1609,7 @@ static PyObject *_wrap_wxMouseEvent_ButtonIsDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ButtonIsDown(_arg0,_arg1); + _result = (bool )wxMouseEvent_ButtonIsDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1652,7 +1637,7 @@ static PyObject *_wrap_wxMouseEvent_ControlDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ControlDown(_arg0); + _result = (bool )wxMouseEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1680,7 +1665,7 @@ static PyObject *_wrap_wxMouseEvent_MetaDown(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MetaDown(_arg0); + _result = (bool )wxMouseEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1708,7 +1693,7 @@ static PyObject *_wrap_wxMouseEvent_AltDown(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_AltDown(_arg0); + _result = (bool )wxMouseEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1736,7 +1721,7 @@ static PyObject *_wrap_wxMouseEvent_ShiftDown(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_ShiftDown(_arg0); + _result = (bool )wxMouseEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1764,7 +1749,7 @@ static PyObject *_wrap_wxMouseEvent_LeftDown(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftDown(_arg0); + _result = (bool )wxMouseEvent_LeftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1792,7 +1777,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleDown(_arg0); + _result = (bool )wxMouseEvent_MiddleDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1820,7 +1805,7 @@ static PyObject *_wrap_wxMouseEvent_RightDown(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightDown(_arg0); + _result = (bool )wxMouseEvent_RightDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1848,7 +1833,7 @@ static PyObject *_wrap_wxMouseEvent_LeftUp(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftUp(_arg0); + _result = (bool )wxMouseEvent_LeftUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1876,7 +1861,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleUp(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleUp(_arg0); + _result = (bool )wxMouseEvent_MiddleUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1904,7 +1889,7 @@ static PyObject *_wrap_wxMouseEvent_RightUp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightUp(_arg0); + _result = (bool )wxMouseEvent_RightUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1932,7 +1917,7 @@ static PyObject *_wrap_wxMouseEvent_LeftDClick(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftDClick(_arg0); + _result = (bool )wxMouseEvent_LeftDClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1960,7 +1945,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleDClick(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleDClick(_arg0); + _result = (bool )wxMouseEvent_MiddleDClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1988,7 +1973,7 @@ static PyObject *_wrap_wxMouseEvent_RightDClick(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightDClick(_arg0); + _result = (bool )wxMouseEvent_RightDClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2016,7 +2001,7 @@ static PyObject *_wrap_wxMouseEvent_LeftIsDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_LeftIsDown(_arg0); + _result = (bool )wxMouseEvent_LeftIsDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2044,7 +2029,7 @@ static PyObject *_wrap_wxMouseEvent_MiddleIsDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_MiddleIsDown(_arg0); + _result = (bool )wxMouseEvent_MiddleIsDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2072,7 +2057,7 @@ static PyObject *_wrap_wxMouseEvent_RightIsDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_RightIsDown(_arg0); + _result = (bool )wxMouseEvent_RightIsDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2100,7 +2085,7 @@ static PyObject *_wrap_wxMouseEvent_Dragging(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Dragging(_arg0); + _result = (bool )wxMouseEvent_Dragging(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2128,7 +2113,7 @@ static PyObject *_wrap_wxMouseEvent_Moving(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Moving(_arg0); + _result = (bool )wxMouseEvent_Moving(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2156,7 +2141,7 @@ static PyObject *_wrap_wxMouseEvent_Entering(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Entering(_arg0); + _result = (bool )wxMouseEvent_Entering(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2184,7 +2169,7 @@ static PyObject *_wrap_wxMouseEvent_Leaving(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_Leaving(_arg0); + _result = (bool )wxMouseEvent_Leaving(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2213,7 +2198,7 @@ static PyObject *_wrap_wxMouseEvent_GetPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxMouseEvent_GetPosition(_arg0)); + _result = new wxPoint (wxMouseEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2251,7 +2236,7 @@ static PyObject *_wrap_wxMouseEvent_GetPositionTuple(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMouseEvent_GetPositionTuple(_arg0,_arg1,_arg2); + wxMouseEvent_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2285,7 @@ static PyObject *_wrap_wxMouseEvent_GetLogicalPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxMouseEvent_GetLogicalPosition(_arg0,*_arg1)); + _result = new wxPoint (wxMouseEvent_GetLogicalPosition(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2329,7 +2314,7 @@ static PyObject *_wrap_wxMouseEvent_GetX(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_GetX(_arg0); + _result = (long )wxMouseEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2357,7 +2342,7 @@ static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_GetY(_arg0); + _result = (long )wxMouseEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2385,7 +2370,7 @@ static PyObject *_wrap_wxMouseEvent_GetWheelRotation(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_GetWheelRotation(_arg0); + _result = (int )wxMouseEvent_GetWheelRotation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2413,7 +2398,7 @@ static PyObject *_wrap_wxMouseEvent_GetWheelDelta(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_GetWheelDelta(_arg0); + _result = (int )wxMouseEvent_GetWheelDelta(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2441,7 +2426,7 @@ static PyObject *_wrap_wxMouseEvent_GetLinesPerAction(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_GetLinesPerAction(_arg0); + _result = (int )wxMouseEvent_GetLinesPerAction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2470,7 +2455,7 @@ static PyObject *_wrap_wxMouseEvent_m_x_set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); + _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2498,7 +2483,7 @@ static PyObject *_wrap_wxMouseEvent_m_x_get(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_x_get(_arg0); + _result = (long )wxMouseEvent_m_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2527,7 +2512,7 @@ static PyObject *_wrap_wxMouseEvent_m_y_set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); + _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2555,7 +2540,7 @@ static PyObject *_wrap_wxMouseEvent_m_y_get(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMouseEvent_m_y_get(_arg0); + _result = (long )wxMouseEvent_m_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2571,7 @@ static PyObject *_wrap_wxMouseEvent_m_leftDown_set(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2614,7 +2599,7 @@ static PyObject *_wrap_wxMouseEvent_m_leftDown_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); + _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2645,7 +2630,7 @@ static PyObject *_wrap_wxMouseEvent_m_middleDown_set(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2673,7 +2658,7 @@ static PyObject *_wrap_wxMouseEvent_m_middleDown_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); + _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2704,7 +2689,7 @@ static PyObject *_wrap_wxMouseEvent_m_rightDown_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2732,7 +2717,7 @@ static PyObject *_wrap_wxMouseEvent_m_rightDown_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); + _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2763,7 +2748,7 @@ static PyObject *_wrap_wxMouseEvent_m_controlDown_set(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2791,7 +2776,7 @@ static PyObject *_wrap_wxMouseEvent_m_controlDown_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); + _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2822,7 +2807,7 @@ static PyObject *_wrap_wxMouseEvent_m_shiftDown_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2850,7 +2835,7 @@ static PyObject *_wrap_wxMouseEvent_m_shiftDown_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); + _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2881,7 +2866,7 @@ static PyObject *_wrap_wxMouseEvent_m_altDown_set(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +2894,7 @@ static PyObject *_wrap_wxMouseEvent_m_altDown_get(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_altDown_get(_arg0); + _result = (bool )wxMouseEvent_m_altDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2940,7 +2925,7 @@ static PyObject *_wrap_wxMouseEvent_m_metaDown_set(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); + _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2968,7 +2953,7 @@ static PyObject *_wrap_wxMouseEvent_m_metaDown_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); + _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2997,7 +2982,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelRotation_set(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelRotation_set(_arg0,_arg1); + _result = (int )wxMouseEvent_m_wheelRotation_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3025,7 +3010,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelRotation_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelRotation_get(_arg0); + _result = (int )wxMouseEvent_m_wheelRotation_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3054,7 +3039,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelDelta_set(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelDelta_set(_arg0,_arg1); + _result = (int )wxMouseEvent_m_wheelDelta_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3082,7 +3067,7 @@ static PyObject *_wrap_wxMouseEvent_m_wheelDelta_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_wheelDelta_get(_arg0); + _result = (int )wxMouseEvent_m_wheelDelta_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3111,7 +3096,7 @@ static PyObject *_wrap_wxMouseEvent_m_linesPerAction_set(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_linesPerAction_set(_arg0,_arg1); + _result = (int )wxMouseEvent_m_linesPerAction_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3139,7 +3124,7 @@ static PyObject *_wrap_wxMouseEvent_m_linesPerAction_get(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMouseEvent_m_linesPerAction_get(_arg0); + _result = (int )wxMouseEvent_m_linesPerAction_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3176,7 +3161,7 @@ static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); + _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3210,7 +3195,7 @@ static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_ControlDown(_arg0); + _result = (bool )wxKeyEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3238,7 +3223,7 @@ static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_MetaDown(_arg0); + _result = (bool )wxKeyEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3266,7 +3251,7 @@ static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_AltDown(_arg0); + _result = (bool )wxKeyEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3294,7 +3279,7 @@ static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_ShiftDown(_arg0); + _result = (bool )wxKeyEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3322,7 +3307,7 @@ static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_KeyCode(_arg0); + _result = (long )wxKeyEvent_KeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3350,7 +3335,7 @@ static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_GetKeyCode(_arg0); + _result = (long )wxKeyEvent_GetKeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3378,7 +3363,7 @@ static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_HasModifiers(_arg0); + _result = (bool )wxKeyEvent_HasModifiers(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3406,7 +3391,7 @@ static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_GetX(_arg0); + _result = (long )wxKeyEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3434,7 +3419,7 @@ static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_GetY(_arg0); + _result = (long )wxKeyEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3463,7 +3448,7 @@ static PyObject *_wrap_wxKeyEvent_GetPosition(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); + _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3501,7 +3486,7 @@ static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); + wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3541,7 +3526,7 @@ static PyObject *_wrap_wxKeyEvent_m_x_set(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); + _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3569,7 +3554,7 @@ static PyObject *_wrap_wxKeyEvent_m_x_get(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_x_get(_arg0); + _result = (long )wxKeyEvent_m_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3598,7 +3583,7 @@ static PyObject *_wrap_wxKeyEvent_m_y_set(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); + _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3626,7 +3611,7 @@ static PyObject *_wrap_wxKeyEvent_m_y_get(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_y_get(_arg0); + _result = (long )wxKeyEvent_m_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3655,7 +3640,7 @@ static PyObject *_wrap_wxKeyEvent_m_keyCode_set(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); + _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3683,7 +3668,7 @@ static PyObject *_wrap_wxKeyEvent_m_keyCode_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_m_keyCode_get(_arg0); + _result = (long )wxKeyEvent_m_keyCode_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3714,7 +3699,7 @@ static PyObject *_wrap_wxKeyEvent_m_controlDown_set(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3742,7 +3727,7 @@ static PyObject *_wrap_wxKeyEvent_m_controlDown_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); + _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3773,7 +3758,7 @@ static PyObject *_wrap_wxKeyEvent_m_shiftDown_set(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3801,7 +3786,7 @@ static PyObject *_wrap_wxKeyEvent_m_shiftDown_get(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); + _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3832,7 +3817,7 @@ static PyObject *_wrap_wxKeyEvent_m_altDown_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3860,7 +3845,7 @@ static PyObject *_wrap_wxKeyEvent_m_altDown_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_altDown_get(_arg0); + _result = (bool )wxKeyEvent_m_altDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3891,7 +3876,7 @@ static PyObject *_wrap_wxKeyEvent_m_metaDown_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3919,7 +3904,7 @@ static PyObject *_wrap_wxKeyEvent_m_metaDown_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); + _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3950,7 +3935,7 @@ static PyObject *_wrap_wxKeyEvent_m_scanCode_set(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); + _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3978,7 +3963,7 @@ static PyObject *_wrap_wxKeyEvent_m_scanCode_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); + _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4014,7 +3999,7 @@ static PyObject *_wrap_new_wxNavigationKeyEvent(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNavigationKeyEvent *)new_wxNavigationKeyEvent(); + _result = (wxNavigationKeyEvent *)new_wxNavigationKeyEvent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4048,7 +4033,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_GetDirection(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNavigationKeyEvent_GetDirection(_arg0); + _result = (bool )wxNavigationKeyEvent_GetDirection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4078,7 +4063,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_SetDirection(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNavigationKeyEvent_SetDirection(_arg0,_arg1); + wxNavigationKeyEvent_SetDirection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4107,7 +4092,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_IsWindowChange(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNavigationKeyEvent_IsWindowChange(_arg0); + _result = (bool )wxNavigationKeyEvent_IsWindowChange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4137,7 +4122,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_SetWindowChange(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNavigationKeyEvent_SetWindowChange(_arg0,_arg1); + wxNavigationKeyEvent_SetWindowChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4166,7 +4151,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_GetCurrentFocus(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxNavigationKeyEvent_GetCurrentFocus(_arg0); + _result = (wxWindow *)wxNavigationKeyEvent_GetCurrentFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4202,7 +4187,7 @@ static PyObject *_wrap_wxNavigationKeyEvent_SetCurrentFocus(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNavigationKeyEvent_SetCurrentFocus(_arg0,_arg1); + wxNavigationKeyEvent_SetCurrentFocus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4248,7 +4233,7 @@ static PyObject *_wrap_new_wxMoveEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMoveEvent *)new_wxMoveEvent(*_arg0,_arg1); + _result = (wxMoveEvent *)new_wxMoveEvent(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4283,7 +4268,7 @@ static PyObject *_wrap_wxMoveEvent_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxMoveEvent_GetPosition(_arg0)); + _result = new wxPoint (wxMoveEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4321,7 +4306,7 @@ static PyObject *_wrap_new_wxPaintEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaintEvent *)new_wxPaintEvent(_arg0); + _result = (wxPaintEvent *)new_wxPaintEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4373,7 +4358,7 @@ static PyObject *_wrap_new_wxEraseEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEraseEvent *)new_wxEraseEvent(_arg0,_arg1); + _result = (wxEraseEvent *)new_wxEraseEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4407,7 +4392,7 @@ static PyObject *_wrap_wxEraseEvent_GetDC(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxEraseEvent_GetDC(_arg0); + _result = (wxDC *)wxEraseEvent_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4445,7 +4430,7 @@ static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFocusEvent *)new_wxFocusEvent(_arg0,_arg1); + _result = (wxFocusEvent *)new_wxFocusEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4504,7 +4489,7 @@ static PyObject *_wrap_new_wxChildFocusEvent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0); + _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4538,7 +4523,7 @@ static PyObject *_wrap_wxChildFocusEvent_GetWindow(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0); + _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4577,7 +4562,7 @@ static PyObject *_wrap_new_wxActivateEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxActivateEvent *)new_wxActivateEvent(_arg0,_arg1,_arg2); + _result = (wxActivateEvent *)new_wxActivateEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4611,7 +4596,7 @@ static PyObject *_wrap_wxActivateEvent_GetActive(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxActivateEvent_GetActive(_arg0); + _result = (bool )wxActivateEvent_GetActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4648,7 +4633,7 @@ static PyObject *_wrap_new_wxInitDialogEvent(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInitDialogEvent *)new_wxInitDialogEvent(_arg0); + _result = (wxInitDialogEvent *)new_wxInitDialogEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4692,7 +4677,7 @@ static PyObject *_wrap_new_wxMenuEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuEvent *)new_wxMenuEvent(_arg0,_arg1); + _result = (wxMenuEvent *)new_wxMenuEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4726,7 +4711,7 @@ static PyObject *_wrap_wxMenuEvent_GetMenuId(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuEvent_GetMenuId(_arg0); + _result = (int )wxMenuEvent_GetMenuId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4754,7 +4739,7 @@ static PyObject *_wrap_wxMenuEvent_IsPopup(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuEvent_IsPopup(_arg0); + _result = (bool )wxMenuEvent_IsPopup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4792,7 +4777,7 @@ static PyObject *_wrap_new_wxShowEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxShowEvent *)new_wxShowEvent(_arg0,_arg1); + _result = (wxShowEvent *)new_wxShowEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4828,7 +4813,7 @@ static PyObject *_wrap_wxShowEvent_SetShow(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxShowEvent_SetShow(_arg0,_arg1); + wxShowEvent_SetShow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4857,7 +4842,7 @@ static PyObject *_wrap_wxShowEvent_GetShow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShowEvent_GetShow(_arg0); + _result = (bool )wxShowEvent_GetShow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4897,7 +4882,7 @@ static PyObject *_wrap_new_wxIconizeEvent(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIconizeEvent *)new_wxIconizeEvent(_arg0,_arg1); + _result = (wxIconizeEvent *)new_wxIconizeEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4931,7 +4916,7 @@ static PyObject *_wrap_wxIconizeEvent_Iconized(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIconizeEvent_Iconized(_arg0); + _result = (bool )wxIconizeEvent_Iconized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4968,7 +4953,7 @@ static PyObject *_wrap_new_wxMaximizeEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMaximizeEvent *)new_wxMaximizeEvent(_arg0); + _result = (wxMaximizeEvent *)new_wxMaximizeEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5014,7 +4999,7 @@ static PyObject *_wrap_new_wxJoystickEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxJoystickEvent *)new_wxJoystickEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxJoystickEvent *)new_wxJoystickEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5049,7 +5034,7 @@ static PyObject *_wrap_wxJoystickEvent_GetPosition(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxJoystickEvent_GetPosition(_arg0)); + _result = new wxPoint (wxJoystickEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5078,7 +5063,7 @@ static PyObject *_wrap_wxJoystickEvent_GetZPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetZPosition(_arg0); + _result = (int )wxJoystickEvent_GetZPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5106,7 +5091,7 @@ static PyObject *_wrap_wxJoystickEvent_GetButtonState(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetButtonState(_arg0); + _result = (int )wxJoystickEvent_GetButtonState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5134,7 +5119,7 @@ static PyObject *_wrap_wxJoystickEvent_GetButtonChange(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetButtonChange(_arg0); + _result = (int )wxJoystickEvent_GetButtonChange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5162,7 +5147,7 @@ static PyObject *_wrap_wxJoystickEvent_GetJoystick(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystickEvent_GetJoystick(_arg0); + _result = (int )wxJoystickEvent_GetJoystick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5190,7 +5175,7 @@ static PyObject *_wrap_wxJoystickEvent_SetJoystick(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetJoystick(_arg0,_arg1); + wxJoystickEvent_SetJoystick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5219,7 +5204,7 @@ static PyObject *_wrap_wxJoystickEvent_SetButtonState(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetButtonState(_arg0,_arg1); + wxJoystickEvent_SetButtonState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5248,7 +5233,7 @@ static PyObject *_wrap_wxJoystickEvent_SetButtonChange(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetButtonChange(_arg0,_arg1); + wxJoystickEvent_SetButtonChange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5284,7 +5269,7 @@ static PyObject *_wrap_wxJoystickEvent_SetPosition(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetPosition(_arg0,*_arg1); + wxJoystickEvent_SetPosition(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5313,7 +5298,7 @@ static PyObject *_wrap_wxJoystickEvent_SetZPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystickEvent_SetZPosition(_arg0,_arg1); + wxJoystickEvent_SetZPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5342,7 +5327,7 @@ static PyObject *_wrap_wxJoystickEvent_IsButton(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_IsButton(_arg0); + _result = (bool )wxJoystickEvent_IsButton(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5370,7 +5355,7 @@ static PyObject *_wrap_wxJoystickEvent_IsMove(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_IsMove(_arg0); + _result = (bool )wxJoystickEvent_IsMove(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5398,7 +5383,7 @@ static PyObject *_wrap_wxJoystickEvent_IsZMove(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_IsZMove(_arg0); + _result = (bool )wxJoystickEvent_IsZMove(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5427,7 +5412,7 @@ static PyObject *_wrap_wxJoystickEvent_ButtonDown(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_ButtonDown(_arg0,_arg1); + _result = (bool )wxJoystickEvent_ButtonDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5456,7 +5441,7 @@ static PyObject *_wrap_wxJoystickEvent_ButtonUp(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_ButtonUp(_arg0,_arg1); + _result = (bool )wxJoystickEvent_ButtonUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5485,7 +5470,7 @@ static PyObject *_wrap_wxJoystickEvent_ButtonIsDown(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystickEvent_ButtonIsDown(_arg0,_arg1); + _result = (bool )wxJoystickEvent_ButtonIsDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5530,7 +5515,7 @@ static PyObject *_wrap_wxDropFilesEvent_GetPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxDropFilesEvent_GetPosition(_arg0)); + _result = new wxPoint (wxDropFilesEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5559,7 +5544,7 @@ static PyObject *_wrap_wxDropFilesEvent_GetNumberOfFiles(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDropFilesEvent_GetNumberOfFiles(_arg0); + _result = (int )wxDropFilesEvent_GetNumberOfFiles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5578,7 +5563,11 @@ static PyObject * wxDropFilesEvent_GetFiles(wxDropFilesEvent *self) { } for (int i=0; ic_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5864,7 +5857,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetSetText(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxUpdateUIEvent_GetSetText(_arg0); + _result = (bool )wxUpdateUIEvent_GetSetText(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5892,7 +5885,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetSetChecked(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxUpdateUIEvent_GetSetChecked(_arg0); + _result = (bool )wxUpdateUIEvent_GetSetChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5920,7 +5913,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetSetEnabled(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxUpdateUIEvent_GetSetEnabled(_arg0); + _result = (bool )wxUpdateUIEvent_GetSetEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5950,7 +5943,7 @@ static PyObject *_wrap_wxUpdateUIEvent_Check(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUpdateUIEvent_Check(_arg0,_arg1); + wxUpdateUIEvent_Check(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5981,7 +5974,7 @@ static PyObject *_wrap_wxUpdateUIEvent_Enable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUpdateUIEvent_Enable(_arg0,_arg1); + wxUpdateUIEvent_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6010,26 +6003,13 @@ static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUpdateUIEvent_SetText(_arg0,*_arg1); + wxUpdateUIEvent_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6070,7 +6050,7 @@ static PyObject *_wrap_new_wxSysColourChangedEvent(PyObject *self, PyObject *arg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSysColourChangedEvent *)new_wxSysColourChangedEvent(); + _result = (wxSysColourChangedEvent *)new_wxSysColourChangedEvent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6122,7 +6102,7 @@ static PyObject *_wrap_new_wxNotifyEvent(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotifyEvent *)new_wxNotifyEvent(_arg0,_arg1); + _result = (wxNotifyEvent *)new_wxNotifyEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6156,7 +6136,7 @@ static PyObject *_wrap_wxNotifyEvent_IsAllowed(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotifyEvent_IsAllowed(_arg0); + _result = (bool )wxNotifyEvent_IsAllowed(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6183,7 +6163,7 @@ static PyObject *_wrap_wxNotifyEvent_Allow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotifyEvent_Allow(_arg0); + wxNotifyEvent_Allow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6211,7 +6191,7 @@ static PyObject *_wrap_wxNotifyEvent_Veto(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotifyEvent_Veto(_arg0); + wxNotifyEvent_Veto(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6248,7 +6228,7 @@ static PyObject *_wrap_new_wxDisplayChangedEvent(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDisplayChangedEvent *)new_wxDisplayChangedEvent(); + _result = (wxDisplayChangedEvent *)new_wxDisplayChangedEvent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6291,7 +6271,7 @@ static PyObject *_wrap_new_wxPaletteChangedEvent(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaletteChangedEvent *)new_wxPaletteChangedEvent(_arg0); + _result = (wxPaletteChangedEvent *)new_wxPaletteChangedEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6333,7 +6313,7 @@ static PyObject *_wrap_wxPaletteChangedEvent_SetChangedWindow(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPaletteChangedEvent_SetChangedWindow(_arg0,_arg1); + wxPaletteChangedEvent_SetChangedWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6362,7 +6342,7 @@ static PyObject *_wrap_wxPaletteChangedEvent_GetChangedWindow(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPaletteChangedEvent_GetChangedWindow(_arg0); + _result = (wxWindow *)wxPaletteChangedEvent_GetChangedWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6399,7 +6379,7 @@ static PyObject *_wrap_new_wxQueryNewPaletteEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxQueryNewPaletteEvent *)new_wxQueryNewPaletteEvent(_arg0); + _result = (wxQueryNewPaletteEvent *)new_wxQueryNewPaletteEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6435,7 +6415,7 @@ static PyObject *_wrap_wxQueryNewPaletteEvent_SetPaletteRealized(PyObject *self, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryNewPaletteEvent_SetPaletteRealized(_arg0,_arg1); + wxQueryNewPaletteEvent_SetPaletteRealized(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6464,7 +6444,7 @@ static PyObject *_wrap_wxQueryNewPaletteEvent_GetPaletteRealized(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxQueryNewPaletteEvent_GetPaletteRealized(_arg0); + _result = (bool )wxQueryNewPaletteEvent_GetPaletteRealized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6517,7 +6497,7 @@ static PyObject *_wrap_new_wxWindowCreateEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowCreateEvent *)new_wxWindowCreateEvent(_arg0); + _result = (wxWindowCreateEvent *)new_wxWindowCreateEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6551,7 +6531,7 @@ static PyObject *_wrap_wxWindowCreateEvent_GetWindow(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindowCreateEvent_GetWindow(_arg0); + _result = (wxWindow *)wxWindowCreateEvent_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6604,7 +6584,7 @@ static PyObject *_wrap_new_wxWindowDestroyEvent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowDestroyEvent *)new_wxWindowDestroyEvent(_arg0); + _result = (wxWindowDestroyEvent *)new_wxWindowDestroyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6638,7 +6618,7 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindowDestroyEvent_GetWindow(_arg0); + _result = (wxWindow *)wxWindowDestroyEvent_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6676,7 +6656,7 @@ static PyObject *_wrap_new_wxTimerEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTimerEvent *)new_wxTimerEvent(_arg0,_arg1); + _result = (wxTimerEvent *)new_wxTimerEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6710,7 +6690,7 @@ static PyObject *_wrap_wxTimerEvent_GetInterval(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimerEvent_GetInterval(_arg0); + _result = (int )wxTimerEvent_GetInterval(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6766,7 +6746,7 @@ static PyObject *_wrap_new_wxTextUrlEvent(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextUrlEvent *)new_wxTextUrlEvent(_arg0,*_arg1,_arg2,_arg3); + _result = (wxTextUrlEvent *)new_wxTextUrlEvent(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6800,7 +6780,7 @@ static PyObject *_wrap_wxTextUrlEvent_GetMouseEvent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxMouseEvent & _result_ref = wxTextUrlEvent_GetMouseEvent(_arg0); + const wxMouseEvent & _result_ref = wxTextUrlEvent_GetMouseEvent(_arg0); _result = (wxMouseEvent *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6829,7 +6809,7 @@ static PyObject *_wrap_wxTextUrlEvent_GetURLStart(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextUrlEvent_GetURLStart(_arg0); + _result = (long )wxTextUrlEvent_GetURLStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6857,7 +6837,7 @@ static PyObject *_wrap_wxTextUrlEvent_GetURLEnd(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextUrlEvent_GetURLEnd(_arg0); + _result = (long )wxTextUrlEvent_GetURLEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6894,7 +6874,7 @@ static PyObject *_wrap_new_wxPyEvent(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyEvent *)new_wxPyEvent(_arg0); + _result = (wxPyEvent *)new_wxPyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6927,7 +6907,7 @@ static PyObject *_wrap_delete_wxPyEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyEvent(_arg0); + delete_wxPyEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6960,7 +6940,7 @@ static PyObject *_wrap_wxPyEvent_SetSelf(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyEvent_SetSelf(_arg0,_arg1); + wxPyEvent_SetSelf(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6989,7 +6969,7 @@ static PyObject *_wrap_wxPyEvent_GetSelf(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyEvent_GetSelf(_arg0); + _result = (PyObject *)wxPyEvent_GetSelf(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7037,7 +7017,7 @@ static PyObject *_wrap_new_wxPyCommandEvent(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyCommandEvent *)new_wxPyCommandEvent(_arg0,_arg1); + _result = (wxPyCommandEvent *)new_wxPyCommandEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7070,7 +7050,7 @@ static PyObject *_wrap_delete_wxPyCommandEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyCommandEvent(_arg0); + delete_wxPyCommandEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7103,7 +7083,7 @@ static PyObject *_wrap_wxPyCommandEvent_SetSelf(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyCommandEvent_SetSelf(_arg0,_arg1); + wxPyCommandEvent_SetSelf(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7132,7 +7112,7 @@ static PyObject *_wrap_wxPyCommandEvent_GetSelf(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyCommandEvent_GetSelf(_arg0); + _result = (PyObject *)wxPyCommandEvent_GetSelf(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp index 0cbdf473d1..ea97c7bef9 100644 --- a/wxPython/src/msw/filesys.cpp +++ b/wxPython/src/msw/filesys.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - // wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling // the callback functions class wxPyFileSystemHandler : public wxFileSystemHandler { @@ -175,22 +169,9 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -201,7 +182,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); + __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -227,22 +208,9 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -253,7 +221,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); + __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -278,29 +246,16 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { _arg1 = _obj1; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); + __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -357,58 +312,19 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -419,7 +335,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); + _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -469,7 +385,7 @@ static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInputStream *)wxFSFile_GetStream(_arg0); + _result = (wxInputStream *)wxFSFile_GetStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -504,13 +420,17 @@ static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); + const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -535,13 +455,17 @@ static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFSFile_GetLocation(_arg0); + const wxString & _result_ref = wxFSFile_GetLocation(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -566,13 +490,17 @@ static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); + const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -598,7 +526,7 @@ static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); + _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -643,7 +571,7 @@ static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); + _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -686,7 +614,7 @@ static PyObject *_wrap_wxFileSystemHandler__setCallbackInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystemHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxFileSystemHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -716,26 +644,13 @@ static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -777,26 +692,13 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -830,31 +732,22 @@ static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -886,12 +779,16 @@ static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); + _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -920,31 +817,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -977,31 +865,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1034,31 +913,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1091,31 +961,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1148,31 +1009,22 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); + _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1204,7 +1056,7 @@ static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileSystem *)new_wxFileSystem(); + _result = (wxFileSystem *)new_wxFileSystem(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1240,27 +1092,14 @@ static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); + wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1293,12 +1132,16 @@ static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystem_GetPath(_arg0)); + _result = new wxString (wxFileSystem_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1327,26 +1170,13 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); + _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1380,31 +1210,22 @@ static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1436,12 +1257,16 @@ static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSystem_FindNext(_arg0)); + _result = new wxString (wxFileSystem_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1467,7 +1292,7 @@ static PyObject *_wrap_wxFileSystem_AddHandler(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystem::AddHandler(_arg0); + wxFileSystem::AddHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1485,7 +1310,7 @@ static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileSystem::CleanUpHandlers(); + wxFileSystem::CleanUpHandlers(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1522,7 +1347,7 @@ static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); + _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1557,26 +1382,13 @@ static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1618,26 +1430,13 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1677,7 +1476,7 @@ static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxZipFSHandler *)new_wxZipFSHandler(); + _result = (wxZipFSHandler *)new_wxZipFSHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1712,26 +1511,13 @@ static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1773,26 +1559,13 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1826,31 +1599,22 @@ static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1882,12 +1646,16 @@ static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxZipFSHandler_FindNext(_arg0)); + _result = new wxString (wxZipFSHandler_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1923,7 +1691,7 @@ static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); + _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1947,26 +1715,13 @@ static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMemoryFSHandler::RemoveFile(*_arg0); + wxMemoryFSHandler::RemoveFile(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2000,26 +1755,13 @@ static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); + _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2061,26 +1803,13 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2114,31 +1843,22 @@ static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -2170,12 +1890,16 @@ static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); + _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 645b85a740..a0f69d2014 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -149,22 +143,9 @@ static PyObject *_wrap_new_wxTopLevelWindow(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -180,7 +161,7 @@ static PyObject *_wrap_new_wxTopLevelWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTopLevelWindow *)new_wxTopLevelWindow(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxTopLevelWindow *)new_wxTopLevelWindow(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -210,7 +191,7 @@ static PyObject *_wrap_new_wxPreTopLevelWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTopLevelWindow *)new_wxPreTopLevelWindow(); + _result = (wxTopLevelWindow *)new_wxPreTopLevelWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -263,22 +244,9 @@ static PyObject *_wrap_wxTopLevelWindow_Create(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -294,7 +262,7 @@ static PyObject *_wrap_wxTopLevelWindow_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxTopLevelWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -328,7 +296,7 @@ static PyObject *_wrap_wxTopLevelWindow_Maximize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_Maximize(_arg0,_arg1); + wxTopLevelWindow_Maximize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -356,7 +324,7 @@ static PyObject *_wrap_wxTopLevelWindow_Restore(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_Restore(_arg0); + wxTopLevelWindow_Restore(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -387,7 +355,7 @@ static PyObject *_wrap_wxTopLevelWindow_Iconize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_Iconize(_arg0,_arg1); + wxTopLevelWindow_Iconize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -416,7 +384,7 @@ static PyObject *_wrap_wxTopLevelWindow_IsMaximized(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_IsMaximized(_arg0); + _result = (bool )wxTopLevelWindow_IsMaximized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -444,7 +412,7 @@ static PyObject *_wrap_wxTopLevelWindow_IsIconized(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_IsIconized(_arg0); + _result = (bool )wxTopLevelWindow_IsIconized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -473,7 +441,7 @@ static PyObject *_wrap_wxTopLevelWindow_GetIcon(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxTopLevelWindow_GetIcon(_arg0)); + _result = new wxIcon (wxTopLevelWindow_GetIcon(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -510,7 +478,7 @@ static PyObject *_wrap_wxTopLevelWindow_SetIcon(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_SetIcon(_arg0,*_arg1); + wxTopLevelWindow_SetIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -543,7 +511,7 @@ static PyObject *_wrap_wxTopLevelWindow_ShowFullScreen(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_ShowFullScreen(_arg0,_arg1,_arg2); + _result = (bool )wxTopLevelWindow_ShowFullScreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -571,7 +539,7 @@ static PyObject *_wrap_wxTopLevelWindow_IsFullScreen(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTopLevelWindow_IsFullScreen(_arg0); + _result = (bool )wxTopLevelWindow_IsFullScreen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -599,26 +567,13 @@ static PyObject *_wrap_wxTopLevelWindow_SetTitle(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTopLevelWindow_SetTitle(_arg0,*_arg1); + wxTopLevelWindow_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -651,12 +606,16 @@ static PyObject *_wrap_wxTopLevelWindow_GetTitle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTopLevelWindow_GetTitle(_arg0)); + _result = new wxString (wxTopLevelWindow_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -727,22 +686,9 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -758,7 +704,7 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -788,7 +734,7 @@ static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)new_wxPreFrame(); + _result = (wxFrame *)new_wxPreFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -841,22 +787,9 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -872,7 +805,7 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -905,7 +838,7 @@ static PyObject *_wrap_wxFrame_GetClientAreaOrigin(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); + _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -942,7 +875,7 @@ static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetMenuBar(_arg0,_arg1); + wxFrame_SetMenuBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -971,7 +904,7 @@ static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); + _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1000,7 +933,7 @@ static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_Command(_arg0,_arg1); + _result = (bool )wxFrame_Command(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1029,7 +962,7 @@ static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); + _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1061,7 +994,7 @@ static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1089,7 +1022,7 @@ static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); + _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1125,7 +1058,7 @@ static PyObject *_wrap_wxFrame_SetStatusBar(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetStatusBar(_arg0,_arg1); + wxFrame_SetStatusBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1155,26 +1088,13 @@ static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetStatusText(_arg0,*_arg1,_arg2); + wxFrame_SetStatusText(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1224,7 +1144,7 @@ static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); + wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1259,7 +1179,7 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); + _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,7 +1207,7 @@ static PyObject *_wrap_wxFrame_GetToolBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); + _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1323,7 +1243,7 @@ static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFrame_SetToolBar(_arg0,_arg1); + wxFrame_SetToolBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1395,22 +1315,9 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1426,7 +1333,7 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1456,7 +1363,7 @@ static PyObject *_wrap_new_wxPreDialog(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDialog *)new_wxPreDialog(); + _result = (wxDialog *)new_wxPreDialog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1509,22 +1416,9 @@ static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -1540,7 +1434,7 @@ static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1572,7 +1466,7 @@ static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_Centre(_arg0,_arg1); + wxDialog_Centre(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1601,7 +1495,7 @@ static PyObject *_wrap_wxDialog_EndModal(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_EndModal(_arg0,_arg1); + wxDialog_EndModal(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1632,7 +1526,7 @@ static PyObject *_wrap_wxDialog_SetModal(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_SetModal(_arg0,_arg1); + wxDialog_SetModal(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1661,7 +1555,7 @@ static PyObject *_wrap_wxDialog_IsModal(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDialog_IsModal(_arg0); + _result = (bool )wxDialog_IsModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1689,7 +1583,7 @@ static PyObject *_wrap_wxDialog_ShowModal(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDialog_ShowModal(_arg0); + _result = (int )wxDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1717,7 +1611,7 @@ static PyObject *_wrap_wxDialog_GetReturnCode(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDialog_GetReturnCode(_arg0); + _result = (int )wxDialog_GetReturnCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,7 +1639,7 @@ static PyObject *_wrap_wxDialog_SetReturnCode(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDialog_SetReturnCode(_arg0,_arg1); + wxDialog_SetReturnCode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1775,26 +1669,13 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); + _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1827,7 +1708,7 @@ static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); + _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1906,22 +1787,9 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1937,7 +1805,7 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMiniFrame *)new_wxMiniFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxMiniFrame *)new_wxMiniFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1967,7 +1835,7 @@ static PyObject *_wrap_new_wxPreMiniFrame(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMiniFrame *)new_wxPreMiniFrame(); + _result = (wxMiniFrame *)new_wxPreMiniFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2020,22 +1888,9 @@ static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -2051,7 +1906,7 @@ static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMiniFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxMiniFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2137,7 +1992,7 @@ static PyObject *_wrap_new_wxSplashScreenWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplashScreenWindow *)new_wxSplashScreenWindow(*_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); + _result = (wxSplashScreenWindow *)new_wxSplashScreenWindow(*_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2179,7 +2034,7 @@ static PyObject *_wrap_wxSplashScreenWindow_SetBitmap(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplashScreenWindow_SetBitmap(_arg0,*_arg1); + wxSplashScreenWindow_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2209,7 +2064,7 @@ static PyObject *_wrap_wxSplashScreenWindow_GetBitmap(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap & _result_ref = wxSplashScreenWindow_GetBitmap(_arg0); + wxBitmap & _result_ref = wxSplashScreenWindow_GetBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2316,7 +2171,7 @@ static PyObject *_wrap_new_wxSplashScreen(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplashScreen *)new_wxSplashScreen(*_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7); + _result = (wxSplashScreen *)new_wxSplashScreen(*_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2350,7 +2205,7 @@ static PyObject *_wrap_wxSplashScreen_GetSplashStyle(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSplashScreen_GetSplashStyle(_arg0); + _result = (long )wxSplashScreen_GetSplashStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2379,7 +2234,7 @@ static PyObject *_wrap_wxSplashScreen_GetSplashWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplashScreenWindow *)wxSplashScreen_GetSplashWindow(_arg0); + _result = (wxSplashScreenWindow *)wxSplashScreen_GetSplashWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2413,7 +2268,7 @@ static PyObject *_wrap_wxSplashScreen_GetTimeout(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplashScreen_GetTimeout(_arg0); + _result = (int )wxSplashScreen_GetTimeout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index df8157be1c..ea330cabef 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -88,12 +88,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif // Implementations of some alternate "constructors" wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { @@ -290,7 +284,7 @@ static PyObject *_wrap_wxEmptyBitmap(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); + _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -320,7 +314,7 @@ static PyObject *_wrap_wxBitmapFromXPMData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromXPMData(_arg0); + _result = (wxBitmap *)wxBitmapFromXPMData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -354,7 +348,7 @@ static PyObject *_wrap_wxBitmapFromIcon(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromIcon(*_arg0); + _result = (wxBitmap *)wxBitmapFromIcon(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -383,7 +377,7 @@ static PyObject *_wrap_wxBitmapFromBits(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3); + _result = (wxBitmap *)wxBitmapFromBits(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -425,7 +419,7 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); + _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -450,7 +444,7 @@ static PyObject *_wrap_wxEmptyIcon(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxEmptyIcon(); + _result = (wxIcon *)wxEmptyIcon(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -480,7 +474,7 @@ static PyObject *_wrap_wxIconFromXPMData(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxIconFromXPMData(_arg0); + _result = (wxIcon *)wxIconFromXPMData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -514,7 +508,7 @@ static PyObject *_wrap_wxIconFromBitmap(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxIconFromBitmap(*_arg0); + _result = (wxIcon *)wxIconFromBitmap(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -540,7 +534,7 @@ static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCursor *)wxPyStockCursor(_arg0); + _result = (wxCursor *)wxPyStockCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -566,26 +560,13 @@ static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNamedColour",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxNamedColour(*_arg0); + _result = (wxColour *)wxNamedColour(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -623,7 +604,7 @@ static PyObject *_wrap_wxMemoryDCFromDC(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); + _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1347,7 +1328,7 @@ static PyObject *_wrap_new_wxGDIObject(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGDIObject *)new_wxGDIObject(); + _result = (wxGDIObject *)new_wxGDIObject(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1380,7 +1361,7 @@ static PyObject *_wrap_delete_wxGDIObject(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGDIObject(_arg0); + delete_wxGDIObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1409,7 +1390,7 @@ static PyObject *_wrap_wxGDIObject_GetVisible(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGDIObject_GetVisible(_arg0); + _result = (bool )wxGDIObject_GetVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1439,7 +1420,7 @@ static PyObject *_wrap_wxGDIObject_SetVisible(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGDIObject_SetVisible(_arg0,_arg1); + wxGDIObject_SetVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1468,7 +1449,7 @@ static PyObject *_wrap_wxGDIObject_IsNull(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGDIObject_IsNull(_arg0); + _result = (bool )wxGDIObject_IsNull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1506,26 +1487,13 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBitmap",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); + _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1562,7 +1530,7 @@ static PyObject *_wrap_delete_wxBitmap(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBitmap(_arg0); + delete_wxBitmap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1592,7 +1560,7 @@ static PyObject *_wrap_wxBitmap_GetPalette(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPalette *)wxBitmap_GetPalette(_arg0); + _result = (wxPalette *)wxBitmap_GetPalette(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1627,7 +1595,7 @@ static PyObject *_wrap_wxBitmap_GetMask(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMask *)wxBitmap_GetMask(_arg0); + _result = (wxMask *)wxBitmap_GetMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1663,26 +1631,13 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); + _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1718,22 +1673,9 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -1744,7 +1686,7 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1784,7 +1726,7 @@ static PyObject *_wrap_wxBitmap_SetMask(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetMask(_arg0,_arg1); + wxBitmap_SetMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1821,7 +1763,7 @@ static PyObject *_wrap_wxBitmap_SetPalette(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetPalette(_arg0,*_arg1); + wxBitmap_SetPalette(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1850,7 +1792,7 @@ static PyObject *_wrap_wxBitmap_GetHandle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxBitmap_GetHandle(_arg0); + _result = (long )wxBitmap_GetHandle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1878,7 +1820,7 @@ static PyObject *_wrap_wxBitmap_SetHandle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetHandle(_arg0,_arg1); + wxBitmap_SetHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1907,7 +1849,7 @@ static PyObject *_wrap_wxBitmap_Ok(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_Ok(_arg0); + _result = (bool )wxBitmap_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1935,7 +1877,7 @@ static PyObject *_wrap_wxBitmap_GetWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetWidth(_arg0); + _result = (int )wxBitmap_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1963,7 +1905,7 @@ static PyObject *_wrap_wxBitmap_GetHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetHeight(_arg0); + _result = (int )wxBitmap_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1991,7 +1933,7 @@ static PyObject *_wrap_wxBitmap_GetDepth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetDepth(_arg0); + _result = (int )wxBitmap_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2019,7 +1961,7 @@ static PyObject *_wrap_wxBitmap_SetWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetWidth(_arg0,_arg1); + wxBitmap_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2048,7 +1990,7 @@ static PyObject *_wrap_wxBitmap_SetHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetHeight(_arg0,_arg1); + wxBitmap_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2077,7 +2019,7 @@ static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetDepth(_arg0,_arg1); + wxBitmap_SetDepth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2113,7 +2055,7 @@ static PyObject *_wrap_wxBitmap_SetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetSize(_arg0,*_arg1); + wxBitmap_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2151,7 +2093,7 @@ static PyObject *_wrap_wxBitmap_GetSubBitmap(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); + _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2189,7 +2131,7 @@ static PyObject *_wrap_wxBitmap_CopyFromIcon(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); + _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2226,7 +2168,7 @@ static PyObject *_wrap_wxBitmap_CopyFromCursor(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmap_CopyFromCursor(_arg0,*_arg1); + _result = (bool )wxBitmap_CopyFromCursor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2254,7 +2196,7 @@ static PyObject *_wrap_wxBitmap_GetQuality(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmap_GetQuality(_arg0); + _result = (int )wxBitmap_GetQuality(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2282,7 +2224,7 @@ static PyObject *_wrap_wxBitmap_SetQuality(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmap_SetQuality(_arg0,_arg1); + wxBitmap_SetQuality(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2320,7 +2262,7 @@ static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMask *)new_wxMask(*_arg0); + _result = (wxMask *)new_wxMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2353,7 +2295,7 @@ static PyObject *_wrap_wxMask_Destroy(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMask_Destroy(_arg0); + wxMask_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2394,26 +2336,13 @@ static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxIcon",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); + _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2450,7 +2379,7 @@ static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxIcon(_arg0); + delete_wxIcon(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2481,26 +2410,13 @@ static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); + _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2532,7 +2448,7 @@ static PyObject *_wrap_wxIcon_GetHandle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxIcon_GetHandle(_arg0); + _result = (long )wxIcon_GetHandle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2560,7 +2476,7 @@ static PyObject *_wrap_wxIcon_SetHandle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetHandle(_arg0,_arg1); + wxIcon_SetHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2589,7 +2505,7 @@ static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIcon_Ok(_arg0); + _result = (bool )wxIcon_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2617,7 +2533,7 @@ static PyObject *_wrap_wxIcon_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxIcon_GetWidth(_arg0); + _result = (int )wxIcon_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2645,7 +2561,7 @@ static PyObject *_wrap_wxIcon_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxIcon_GetHeight(_arg0); + _result = (int )wxIcon_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2673,7 +2589,7 @@ static PyObject *_wrap_wxIcon_GetDepth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxIcon_GetDepth(_arg0); + _result = (int )wxIcon_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2701,7 +2617,7 @@ static PyObject *_wrap_wxIcon_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetWidth(_arg0,_arg1); + wxIcon_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2730,7 +2646,7 @@ static PyObject *_wrap_wxIcon_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetHeight(_arg0,_arg1); + wxIcon_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2759,7 +2675,7 @@ static PyObject *_wrap_wxIcon_SetDepth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetDepth(_arg0,_arg1); + wxIcon_SetDepth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2795,7 +2711,7 @@ static PyObject *_wrap_wxIcon_SetSize(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_SetSize(_arg0,*_arg1); + wxIcon_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2832,7 +2748,7 @@ static PyObject *_wrap_wxIcon_CopyFromBitmap(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIcon_CopyFromBitmap(_arg0,*_arg1); + wxIcon_CopyFromBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2873,26 +2789,13 @@ static PyObject *_wrap_new_wxCursor(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxCursor",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCursor *)new_wxCursor(*_arg0,_arg1,_arg2,_arg3); + _result = (wxCursor *)new_wxCursor(*_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2929,7 +2832,7 @@ static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxCursor(_arg0); + delete_wxCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2958,7 +2861,7 @@ static PyObject *_wrap_wxCursor_GetHandle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxCursor_GetHandle(_arg0); + _result = (long )wxCursor_GetHandle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2986,7 +2889,7 @@ static PyObject *_wrap_wxCursor_SetHandle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCursor_SetHandle(_arg0,_arg1); + wxCursor_SetHandle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3015,7 +2918,7 @@ static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCursor_Ok(_arg0); + _result = (bool )wxCursor_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3043,7 +2946,7 @@ static PyObject *_wrap_wxCursor_GetWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCursor_GetWidth(_arg0); + _result = (int )wxCursor_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3071,7 +2974,7 @@ static PyObject *_wrap_wxCursor_GetHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCursor_GetHeight(_arg0); + _result = (int )wxCursor_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3099,7 +3002,7 @@ static PyObject *_wrap_wxCursor_GetDepth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCursor_GetDepth(_arg0); + _result = (int )wxCursor_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3127,7 +3030,7 @@ static PyObject *_wrap_wxCursor_SetWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCursor_SetWidth(_arg0,_arg1); + wxCursor_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3156,7 +3059,7 @@ static PyObject *_wrap_wxCursor_SetHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCursor_SetHeight(_arg0,_arg1); + wxCursor_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3185,7 +3088,7 @@ static PyObject *_wrap_wxCursor_SetDepth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCursor_SetDepth(_arg0,_arg1); + wxCursor_SetDepth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3221,7 +3124,7 @@ static PyObject *_wrap_wxCursor_SetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCursor_SetSize(_arg0,*_arg1); + wxCursor_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3242,7 +3145,7 @@ static PyObject *_wrap_new_wxNativeFontInfo(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); + _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3275,7 +3178,7 @@ static PyObject *_wrap_wxNativeFontInfo_Init(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_Init(_arg0); + wxNativeFontInfo_Init(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3304,7 +3207,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetPointSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNativeFontInfo_GetPointSize(_arg0); + _result = (int )wxNativeFontInfo_GetPointSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3332,7 +3235,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetStyle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontStyle )wxNativeFontInfo_GetStyle(_arg0); + _result = (wxFontStyle )wxNativeFontInfo_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3360,7 +3263,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetWeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontWeight )wxNativeFontInfo_GetWeight(_arg0); + _result = (wxFontWeight )wxNativeFontInfo_GetWeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3388,7 +3291,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetUnderlined(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_GetUnderlined(_arg0); + _result = (bool )wxNativeFontInfo_GetUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3416,12 +3319,16 @@ static PyObject *_wrap_wxNativeFontInfo_GetFaceName(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_GetFaceName(_arg0)); + _result = new wxString (wxNativeFontInfo_GetFaceName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3449,7 +3356,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetFamily(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontFamily )wxNativeFontInfo_GetFamily(_arg0); + _result = (wxFontFamily )wxNativeFontInfo_GetFamily(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3477,7 +3384,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetEncoding(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxNativeFontInfo_GetEncoding(_arg0); + _result = (wxFontEncoding )wxNativeFontInfo_GetEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3505,7 +3412,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetPointSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetPointSize(_arg0,_arg1); + wxNativeFontInfo_SetPointSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3534,7 +3441,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetStyle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetStyle(_arg0,_arg1); + wxNativeFontInfo_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3563,7 +3470,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetWeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetWeight(_arg0,_arg1); + wxNativeFontInfo_SetWeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3594,7 +3501,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetUnderlined(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetUnderlined(_arg0,_arg1); + wxNativeFontInfo_SetUnderlined(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3623,26 +3530,13 @@ static PyObject *_wrap_wxNativeFontInfo_SetFaceName(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetFaceName(_arg0,*_arg1); + wxNativeFontInfo_SetFaceName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3675,7 +3569,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetFamily(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetFamily(_arg0,_arg1); + wxNativeFontInfo_SetFamily(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3704,7 +3598,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetEncoding(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetEncoding(_arg0,_arg1); + wxNativeFontInfo_SetEncoding(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3734,26 +3628,13 @@ static PyObject *_wrap_wxNativeFontInfo_FromString(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromString(_arg0,*_arg1); + _result = (bool )wxNativeFontInfo_FromString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3785,12 +3666,16 @@ static PyObject *_wrap_wxNativeFontInfo_ToString(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_ToString(_arg0)); + _result = new wxString (wxNativeFontInfo_ToString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3820,12 +3705,16 @@ static PyObject *_wrap_wxNativeFontInfo___str__(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo___str__(_arg0)); + _result = new wxString (wxNativeFontInfo___str__(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3854,26 +3743,13 @@ static PyObject *_wrap_wxNativeFontInfo_FromUserString(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromUserString(_arg0,*_arg1); + _result = (bool )wxNativeFontInfo_FromUserString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3905,12 +3781,16 @@ static PyObject *_wrap_wxNativeFontInfo_ToUserString(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_ToUserString(_arg0)); + _result = new wxString (wxNativeFontInfo_ToUserString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3930,7 +3810,7 @@ static PyObject *_wrap_new_wxFontMapper(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontMapper *)new_wxFontMapper(); + _result = (wxFontMapper *)new_wxFontMapper(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3963,7 +3843,7 @@ static PyObject *_wrap_delete_wxFontMapper(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFontMapper(_arg0); + delete_wxFontMapper(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4005,27 +3885,14 @@ static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); + _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4062,26 +3929,13 @@ static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); + _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4116,27 +3970,14 @@ static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); + _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4159,12 +4000,16 @@ static PyObject *_wrap_wxFontMapper_GetEncodingName(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFontMapper::GetEncodingName(_arg0)); + _result = new wxString (wxFontMapper::GetEncodingName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4183,12 +4028,16 @@ static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFontMapper::GetEncodingDescription(_arg0)); + _result = new wxString (wxFontMapper::GetEncodingDescription(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4224,7 +4073,7 @@ static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogParent(_arg0,_arg1); + wxFontMapper_SetDialogParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4253,26 +4102,13 @@ static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogTitle(_arg0,*_arg1); + wxFontMapper_SetDialogTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4313,7 +4149,7 @@ static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfig(_arg0,_arg1); + wxFontMapper_SetConfig(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4342,26 +4178,13 @@ static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfigPath(_arg0,*_arg1); + wxFontMapper_SetConfigPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4384,7 +4207,7 @@ static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); + _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4427,7 +4250,7 @@ static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4462,7 +4285,7 @@ static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)new_wxFontFromNativeInfo(*_arg0); + _result = (wxFont *)new_wxFontFromNativeInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4495,7 +4318,7 @@ static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFont(_arg0); + delete_wxFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4524,7 +4347,7 @@ static PyObject *_wrap_wxFont_Ok(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFont_Ok(_arg0); + _result = (bool )wxFont_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4552,7 +4375,7 @@ static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetPointSize(_arg0); + _result = (int )wxFont_GetPointSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4580,7 +4403,7 @@ static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetFamily(_arg0); + _result = (int )wxFont_GetFamily(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4608,7 +4431,7 @@ static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetStyle(_arg0); + _result = (int )wxFont_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4636,7 +4459,7 @@ static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFont_GetWeight(_arg0); + _result = (int )wxFont_GetWeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4664,7 +4487,7 @@ static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFont_GetUnderlined(_arg0); + _result = (bool )wxFont_GetUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4692,12 +4515,16 @@ static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetFaceName(_arg0)); + _result = new wxString (wxFont_GetFaceName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4725,7 +4552,7 @@ static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFont_GetEncoding(_arg0); + _result = (wxFontEncoding )wxFont_GetEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4753,7 +4580,7 @@ static PyObject *_wrap_wxFont_IsFixedWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFont_IsFixedWidth(_arg0); + _result = (bool )wxFont_IsFixedWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4782,7 +4609,7 @@ static PyObject *_wrap_wxFont_GetNativeFontInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNativeFontInfo *)wxFont_GetNativeFontInfo(_arg0); + _result = (wxNativeFontInfo *)wxFont_GetNativeFontInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4816,12 +4643,16 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoDesc(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetNativeFontInfoDesc(_arg0)); + _result = new wxString (wxFont_GetNativeFontInfoDesc(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4849,12 +4680,16 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoUserDesc(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetNativeFontInfoUserDesc(_arg0)); + _result = new wxString (wxFont_GetNativeFontInfoUserDesc(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4882,7 +4717,7 @@ static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetPointSize(_arg0,_arg1); + wxFont_SetPointSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4911,7 +4746,7 @@ static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetFamily(_arg0,_arg1); + wxFont_SetFamily(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4940,7 +4775,7 @@ static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetStyle(_arg0,_arg1); + wxFont_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4969,7 +4804,7 @@ static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetWeight(_arg0,_arg1); + wxFont_SetWeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4998,26 +4833,13 @@ static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetFaceName(_arg0,*_arg1); + wxFont_SetFaceName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5052,7 +4874,7 @@ static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetUnderlined(_arg0,_arg1); + wxFont_SetUnderlined(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5081,7 +4903,7 @@ static PyObject *_wrap_wxFont_SetEncoding(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetEncoding(_arg0,_arg1); + wxFont_SetEncoding(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5118,7 +4940,7 @@ static PyObject *_wrap_wxFont_SetNativeFontInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetNativeFontInfo(_arg0,*_arg1); + wxFont_SetNativeFontInfo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5147,26 +4969,13 @@ static PyObject *_wrap_wxFont_SetNativeFontInfoUserDesc(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont_SetNativeFontInfoUserDesc(_arg0,*_arg1); + wxFont_SetNativeFontInfoUserDesc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5199,12 +5008,16 @@ static PyObject *_wrap_wxFont_GetFamilyString(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetFamilyString(_arg0)); + _result = new wxString (wxFont_GetFamilyString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5232,12 +5045,16 @@ static PyObject *_wrap_wxFont_GetStyleString(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetStyleString(_arg0)); + _result = new wxString (wxFont_GetStyleString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5265,12 +5082,16 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFont_GetWeightString(_arg0)); + _result = new wxString (wxFont_GetWeightString(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5288,7 +5109,7 @@ static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFont::GetDefaultEncoding(); + _result = (wxFontEncoding )wxFont::GetDefaultEncoding(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5306,7 +5127,7 @@ static PyObject *_wrap_wxFont_SetDefaultEncoding(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFont::SetDefaultEncoding(_arg0); + wxFont::SetDefaultEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5351,7 +5172,7 @@ static PyObject *_wrap_wxFontList_AddFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontList_AddFont(_arg0,_arg1); + wxFontList_AddFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5390,7 +5211,7 @@ static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *arg _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + _result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5432,7 +5253,7 @@ static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontList_RemoveFont(_arg0,_arg1); + wxFontList_RemoveFont(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5461,7 +5282,7 @@ static PyObject *_wrap_wxFontList_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFontList_GetCount(_arg0); + _result = (int )wxFontList_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5492,7 +5313,7 @@ static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); + _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5524,7 +5345,7 @@ static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxColour(_arg0); + delete_wxColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5552,7 +5373,7 @@ static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxColour_Red(_arg0); + _result = (unsigned char )wxColour_Red(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5579,7 +5400,7 @@ static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxColour_Green(_arg0); + _result = (unsigned char )wxColour_Green(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5606,7 +5427,7 @@ static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxColour_Blue(_arg0); + _result = (unsigned char )wxColour_Blue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5633,7 +5454,7 @@ static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxColour_Ok(_arg0); + _result = (bool )wxColour_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5662,7 +5483,7 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColour_Set(_arg0,_arg1,_arg2,_arg3); + wxColour_Set(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5696,7 +5517,7 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxColour_Get(_arg0); + _result = (PyObject *)wxColour_Get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5736,26 +5557,13 @@ static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); + _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5801,12 +5609,16 @@ static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); + _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5858,26 +5670,13 @@ static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5928,7 +5727,7 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); + _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5961,7 +5760,7 @@ static PyObject *_wrap_delete_wxPen(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPen(_arg0); + delete_wxPen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5990,7 +5789,7 @@ static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetCap(_arg0); + _result = (int )wxPen_GetCap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6019,7 +5818,7 @@ static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxPen_GetColour(_arg0)); + _result = new wxColour (wxPen_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6048,7 +5847,7 @@ static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetJoin(_arg0); + _result = (int )wxPen_GetJoin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6076,7 +5875,7 @@ static PyObject *_wrap_wxPen_GetStyle(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetStyle(_arg0); + _result = (int )wxPen_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6104,7 +5903,7 @@ static PyObject *_wrap_wxPen_GetWidth(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPen_GetWidth(_arg0); + _result = (int )wxPen_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6132,7 +5931,7 @@ static PyObject *_wrap_wxPen_Ok(PyObject *self, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPen_Ok(_arg0); + _result = (bool )wxPen_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6160,7 +5959,7 @@ static PyObject *_wrap_wxPen_SetCap(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetCap(_arg0,_arg1); + wxPen_SetCap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6196,7 +5995,7 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetColour(_arg0,*_arg1); + wxPen_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6225,7 +6024,7 @@ static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetJoin(_arg0,_arg1); + wxPen_SetJoin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6254,7 +6053,7 @@ static PyObject *_wrap_wxPen_SetStyle(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetStyle(_arg0,_arg1); + wxPen_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6283,7 +6082,7 @@ static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetWidth(_arg0,_arg1); + wxPen_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6329,7 +6128,7 @@ static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetDashes(_arg0,_arg1,_arg2); + wxPen_SetDashes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6362,7 +6161,7 @@ static PyObject *_wrap_wxPen_GetStipple(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxPen_GetStipple(_arg0); + _result = (wxBitmap *)wxPen_GetStipple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6404,7 +6203,7 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPen_SetStipple(_arg0,*_arg1); + wxPen_SetStipple(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6459,7 +6258,7 @@ static PyObject *_wrap_new_wxPyPen(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPen *)new_wxPyPen(*_arg0,_arg1,_arg2); + _result = (wxPyPen *)new_wxPyPen(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6492,7 +6291,7 @@ static PyObject *_wrap_delete_wxPyPen(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyPen(_arg0); + delete_wxPyPen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6538,7 +6337,7 @@ static PyObject *_wrap_wxPyPen_SetDashes(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPen_SetDashes(_arg0,_arg1,_arg2); + wxPyPen_SetDashes(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6586,7 +6385,7 @@ static PyObject *_wrap_wxPenList_AddPen(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPenList_AddPen(_arg0,_arg1); + wxPenList_AddPen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6626,7 +6425,7 @@ static PyObject *_wrap_wxPenList_FindOrCreatePen(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPen *)wxPenList_FindOrCreatePen(_arg0,*_arg1,_arg2,_arg3); + _result = (wxPen *)wxPenList_FindOrCreatePen(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6668,7 +6467,7 @@ static PyObject *_wrap_wxPenList_RemovePen(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPenList_RemovePen(_arg0,_arg1); + wxPenList_RemovePen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6697,7 +6496,7 @@ static PyObject *_wrap_wxPenList_GetCount(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPenList_GetCount(_arg0); + _result = (int )wxPenList_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6742,7 +6541,7 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); + _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6775,7 +6574,7 @@ static PyObject *_wrap_delete_wxBrush(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBrush(_arg0); + delete_wxBrush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6805,7 +6604,7 @@ static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxBrush_GetColour(_arg0)); + _result = new wxColour (wxBrush_GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6835,7 +6634,7 @@ static PyObject *_wrap_wxBrush_GetStipple(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBrush_GetStipple(_arg0); + _result = (wxBitmap *)wxBrush_GetStipple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6869,7 +6668,7 @@ static PyObject *_wrap_wxBrush_GetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBrush_GetStyle(_arg0); + _result = (int )wxBrush_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6897,7 +6696,7 @@ static PyObject *_wrap_wxBrush_Ok(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBrush_Ok(_arg0); + _result = (bool )wxBrush_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6932,7 +6731,7 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrush_SetColour(_arg0,*_arg1); + wxBrush_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6969,7 +6768,7 @@ static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrush_SetStipple(_arg0,*_arg1); + wxBrush_SetStipple(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6998,7 +6797,7 @@ static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrush_SetStyle(_arg0,_arg1); + wxBrush_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7043,7 +6842,7 @@ static PyObject *_wrap_wxBrushList_AddBrush(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrushList_AddBrush(_arg0,_arg1); + wxBrushList_AddBrush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7082,7 +6881,7 @@ static PyObject *_wrap_wxBrushList_FindOrCreateBrush(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); + _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7124,7 +6923,7 @@ static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBrushList_RemoveBrush(_arg0,_arg1); + wxBrushList_RemoveBrush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7153,7 +6952,7 @@ static PyObject *_wrap_wxBrushList_GetCount(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBrushList_GetCount(_arg0); + _result = (int )wxBrushList_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7188,7 +6987,7 @@ static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDC(_arg0); + delete_wxDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7216,7 +7015,7 @@ static PyObject *_wrap_wxDC_BeginDrawing(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_BeginDrawing(_arg0); + wxDC_BeginDrawing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7262,7 +7061,7 @@ static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7289,7 +7088,7 @@ static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_Clear(_arg0); + wxDC_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7319,7 +7118,7 @@ static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_CrossHair(_arg0,_arg1,_arg2); + wxDC_CrossHair(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7347,7 +7146,7 @@ static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DestroyClippingRegion(_arg0); + wxDC_DestroyClippingRegion(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7377,7 +7176,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7406,7 +7205,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7435,7 +7234,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7464,7 +7263,7 @@ static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); + _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7497,7 +7296,7 @@ static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7528,7 +7327,7 @@ static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); + wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7560,7 +7359,7 @@ static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7594,7 +7393,7 @@ static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7633,7 +7432,7 @@ static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); + wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7667,22 +7466,9 @@ static PyObject *_wrap_wxDC_DrawLabel(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { _arg2 = &temp; @@ -7691,7 +7477,7 @@ static PyObject *_wrap_wxDC_DrawLabel(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawLabel(_arg0,*_arg1,*_arg2,_arg3,_arg4); + wxDC_DrawLabel(_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7737,22 +7523,9 @@ static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -7768,7 +7541,7 @@ static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxDC_DrawImageLabel(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + _result = new wxRect (wxDC_DrawImageLabel(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7804,7 +7577,7 @@ static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7848,7 +7621,7 @@ static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7896,7 +7669,7 @@ static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7929,7 +7702,7 @@ static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawPoint(_arg0,_arg1,_arg2); + wxDC_DrawPoint(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7961,7 +7734,7 @@ static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7993,26 +7766,13 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8049,7 +7809,7 @@ static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8091,7 +7851,7 @@ static PyObject *_wrap_wxDC_DrawSpline(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawSpline(_arg0,_arg1,_arg2); + wxDC_DrawSpline(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8125,26 +7885,13 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); + wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8176,7 +7923,7 @@ static PyObject *_wrap_wxDC_EndDoc(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_EndDoc(_arg0); + wxDC_EndDoc(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8204,7 +7951,7 @@ static PyObject *_wrap_wxDC_EndDrawing(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_EndDrawing(_arg0); + wxDC_EndDrawing(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8232,7 +7979,7 @@ static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_EndPage(_arg0); + wxDC_EndPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8271,7 +8018,7 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); + wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8301,7 +8048,7 @@ static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBrush (wxDC_GetBackground(_arg0)); + _result = new wxBrush (wxDC_GetBackground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8331,7 +8078,7 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBrush (wxDC_GetBrush(_arg0)); + _result = new wxBrush (wxDC_GetBrush(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8360,7 +8107,7 @@ static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetCharHeight(_arg0); + _result = (long )wxDC_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8388,7 +8135,7 @@ static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetCharWidth(_arg0); + _result = (long )wxDC_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8435,7 +8182,7 @@ static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8485,7 +8232,7 @@ static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxDC_GetFont(_arg0)); + _result = new wxFont (wxDC_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8514,7 +8261,7 @@ static PyObject *_wrap_wxDC_GetLogicalFunction(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDC_GetLogicalFunction(_arg0); + _result = (int )wxDC_GetLogicalFunction(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8551,7 +8298,7 @@ static PyObject *_wrap_wxDC_GetLogicalScale(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetLogicalScale(_arg0,_arg1,_arg2); + wxDC_GetLogicalScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8590,7 +8337,7 @@ static PyObject *_wrap_wxDC_GetMapMode(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDC_GetMapMode(_arg0); + _result = (int )wxDC_GetMapMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8618,7 +8365,7 @@ static PyObject *_wrap_wxDC_GetOptimization(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_GetOptimization(_arg0); + _result = (bool )wxDC_GetOptimization(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8647,7 +8394,7 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPen (wxDC_GetPen(_arg0)); + _result = new wxPen (wxDC_GetPen(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8683,7 +8430,7 @@ static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); + _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8726,7 +8473,7 @@ static PyObject *_wrap_wxDC_GetSizeTuple(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetSizeTuple(_arg0,_arg1,_arg2); + wxDC_GetSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8766,7 +8513,7 @@ static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxDC_GetSize(_arg0)); + _result = new wxSize (wxDC_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8796,7 +8543,7 @@ static PyObject *_wrap_wxDC_GetSizeMM(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxDC_GetSizeMM(_arg0)); + _result = new wxSize (wxDC_GetSizeMM(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8826,7 +8573,7 @@ static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxDC_GetTextBackground(_arg0)); + _result = new wxColour (wxDC_GetTextBackground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8865,26 +8612,13 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); + wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8949,22 +8683,9 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8975,7 +8696,7 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9029,7 +8750,7 @@ static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxDC_GetTextForeground(_arg0)); + _result = new wxColour (wxDC_GetTextForeground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9067,7 +8788,7 @@ static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetUserScale(_arg0,_arg1,_arg2); + wxDC_GetUserScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9107,7 +8828,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9136,7 +8857,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9165,7 +8886,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9194,7 +8915,7 @@ static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); + _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9222,7 +8943,7 @@ static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MaxX(_arg0); + _result = (long )wxDC_MaxX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9250,7 +8971,7 @@ static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MaxY(_arg0); + _result = (long )wxDC_MaxY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9278,7 +8999,7 @@ static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MinX(_arg0); + _result = (long )wxDC_MinX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9306,7 +9027,7 @@ static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MinY(_arg0); + _result = (long )wxDC_MinY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9334,7 +9055,7 @@ static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_Ok(_arg0); + _result = (bool )wxDC_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9363,7 +9084,7 @@ static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); + wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9400,7 +9121,7 @@ static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetBackground(_arg0,*_arg1); + wxDC_SetBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9429,7 +9150,7 @@ static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetBackgroundMode(_arg0,_arg1); + wxDC_SetBackgroundMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9461,7 +9182,7 @@ static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9498,7 +9219,7 @@ static PyObject *_wrap_wxDC_SetClippingRegionAsRegion(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); + wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9535,7 +9256,7 @@ static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetPalette(_arg0,*_arg1); + wxDC_SetPalette(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9572,7 +9293,7 @@ static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetBrush(_arg0,*_arg1); + wxDC_SetBrush(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9609,7 +9330,7 @@ static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetFont(_arg0,*_arg1); + wxDC_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9638,7 +9359,7 @@ static PyObject *_wrap_wxDC_SetLogicalFunction(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetLogicalFunction(_arg0,_arg1); + wxDC_SetLogicalFunction(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9668,7 +9389,7 @@ static PyObject *_wrap_wxDC_SetLogicalScale(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetLogicalScale(_arg0,_arg1,_arg2); + wxDC_SetLogicalScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9697,7 +9418,7 @@ static PyObject *_wrap_wxDC_SetMapMode(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetMapMode(_arg0,_arg1); + wxDC_SetMapMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9728,7 +9449,7 @@ static PyObject *_wrap_wxDC_SetOptimization(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetOptimization(_arg0,_arg1); + wxDC_SetOptimization(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9765,7 +9486,7 @@ static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetPen(_arg0,*_arg1); + wxDC_SetPen(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9801,7 +9522,7 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetTextBackground(_arg0,*_arg1); + wxDC_SetTextBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9837,7 +9558,7 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetTextForeground(_arg0,*_arg1); + wxDC_SetTextForeground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9867,7 +9588,7 @@ static PyObject *_wrap_wxDC_SetUserScale(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetUserScale(_arg0,_arg1,_arg2); + wxDC_SetUserScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9897,26 +9618,13 @@ static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_StartDoc(_arg0,*_arg1); + _result = (bool )wxDC_StartDoc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9947,7 +9655,7 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_StartPage(_arg0); + wxDC_StartPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9987,7 +9695,7 @@ static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10016,7 +9724,7 @@ static PyObject *_wrap_wxDC_CanDrawBitmap(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_CanDrawBitmap(_arg0); + _result = (bool )wxDC_CanDrawBitmap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10044,7 +9752,7 @@ static PyObject *_wrap_wxDC_CanGetTextExtent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDC_CanGetTextExtent(_arg0); + _result = (bool )wxDC_CanGetTextExtent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10072,7 +9780,7 @@ static PyObject *_wrap_wxDC_GetDepth(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDC_GetDepth(_arg0); + _result = (int )wxDC_GetDepth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10101,7 +9809,7 @@ static PyObject *_wrap_wxDC_GetPPI(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxDC_GetPPI(_arg0)); + _result = new wxSize (wxDC_GetPPI(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10139,7 +9847,7 @@ static PyObject *_wrap_wxDC_GetLogicalOrigin(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetLogicalOrigin(_arg0,_arg1,_arg2); + wxDC_GetLogicalOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10179,7 +9887,7 @@ static PyObject *_wrap_wxDC_SetLogicalOrigin(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetLogicalOrigin(_arg0,_arg1,_arg2); + wxDC_SetLogicalOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10217,7 +9925,7 @@ static PyObject *_wrap_wxDC_GetDeviceOrigin(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetDeviceOrigin(_arg0,_arg1,_arg2); + wxDC_GetDeviceOrigin(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10261,7 +9969,7 @@ static PyObject *_wrap_wxDC_SetAxisOrientation(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_SetAxisOrientation(_arg0,_arg1,_arg2); + wxDC_SetAxisOrientation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10291,7 +9999,7 @@ static PyObject *_wrap_wxDC_CalcBoundingBox(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); + wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10319,7 +10027,7 @@ static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_ResetBoundingBox(_arg0); + wxDC_ResetBoundingBox(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10366,7 +10074,7 @@ static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10415,7 +10123,7 @@ static PyObject *_wrap_wxDC_GetHDC(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetHDC(_arg0); + _result = (long )wxDC_GetHDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10521,7 +10229,7 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); + _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10629,7 +10337,7 @@ static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); + _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10667,7 +10375,7 @@ static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMemoryDC *)new_wxMemoryDC(); + _result = (wxMemoryDC *)new_wxMemoryDC(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10709,7 +10417,7 @@ static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMemoryDC_SelectObject(_arg0,*_arg1); + wxMemoryDC_SelectObject(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10746,7 +10454,7 @@ static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScreenDC *)new_wxScreenDC(); + _result = (wxScreenDC *)new_wxScreenDC(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10789,7 +10497,7 @@ static PyObject *_wrap_wxScreenDC_StartDrawingOnTopWin(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScreenDC_StartDrawingOnTopWin(_arg0,_arg1); + _result = (bool )wxScreenDC_StartDrawingOnTopWin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10826,7 +10534,7 @@ static PyObject *_wrap_wxScreenDC_StartDrawingOnTop(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); + _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10854,7 +10562,7 @@ static PyObject *_wrap_wxScreenDC_EndDrawingOnTop(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); + _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10899,7 +10607,7 @@ static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxClientDC *)new_wxClientDC(_arg0); + _result = (wxClientDC *)new_wxClientDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10950,7 +10658,7 @@ static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaintDC *)new_wxPaintDC(_arg0); + _result = (wxPaintDC *)new_wxPaintDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11001,7 +10709,7 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowDC *)new_wxWindowDC(_arg0); + _result = (wxWindowDC *)new_wxWindowDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11037,26 +10745,13 @@ static PyObject *_wrap_new_wxMetaFile(PyObject *self, PyObject *args, PyObject * return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMetaFile *)new_wxMetaFile(*_arg0); + _result = (wxMetaFile *)new_wxMetaFile(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11093,7 +10788,7 @@ static PyObject *_wrap_delete_wxMetaFile(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxMetaFile(_arg0); + delete_wxMetaFile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11122,7 +10817,7 @@ static PyObject *_wrap_wxMetaFile_Ok(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMetaFile_Ok(_arg0); + _result = (bool )wxMetaFile_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11152,7 +10847,7 @@ static PyObject *_wrap_wxMetaFile_SetClipboard(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMetaFile_SetClipboard(_arg0,_arg1,_arg2); + _result = (bool )wxMetaFile_SetClipboard(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11181,7 +10876,7 @@ static PyObject *_wrap_wxMetaFile_GetSize(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxMetaFile_GetSize(_arg0)); + _result = new wxSize (wxMetaFile_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11210,7 +10905,7 @@ static PyObject *_wrap_wxMetaFile_GetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMetaFile_GetWidth(_arg0); + _result = (int )wxMetaFile_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11238,7 +10933,7 @@ static PyObject *_wrap_wxMetaFile_GetHeight(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMetaFile_GetHeight(_arg0); + _result = (int )wxMetaFile_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11266,13 +10961,17 @@ static PyObject *_wrap_wxMetaFile_GetFileName(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxMetaFile_GetFileName(_arg0); + const wxString & _result_ref = wxMetaFile_GetFileName(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -11311,45 +11010,19 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0,_arg1,_arg2,*_arg3); + _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11392,7 +11065,7 @@ static PyObject *_wrap_wxMetaFileDC_Close(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMetaFile *)wxMetaFileDC_Close(_arg0); + _result = (wxMetaFile *)wxMetaFileDC_Close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11468,7 +11141,7 @@ static PyObject *_wrap_new_wxPalette(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); + _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11510,7 +11183,7 @@ static PyObject *_wrap_delete_wxPalette(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPalette(_arg0); + delete_wxPalette(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11542,7 +11215,7 @@ static PyObject *_wrap_wxPalette_GetPixel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); + _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11586,7 +11259,7 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11629,7 +11302,7 @@ static PyObject *_wrap_wxPalette_Ok(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPalette_Ok(_arg0); + _result = (bool )wxPalette_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11661,7 +11334,7 @@ static PyObject *_wrap_new_wxImageList(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); + _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11694,7 +11367,7 @@ static PyObject *_wrap_delete_wxImageList(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxImageList(_arg0); + delete_wxImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11741,7 +11414,7 @@ static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); + _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11786,7 +11459,7 @@ static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); + _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11823,7 +11496,7 @@ static PyObject *_wrap_wxImageList_AddIcon(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_AddIcon(_arg0,*_arg1); + _result = (int )wxImageList_AddIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11870,7 +11543,7 @@ static PyObject *_wrap_wxImageList_Replace(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2,*_arg3); + _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11914,7 +11587,7 @@ static PyObject *_wrap_wxImageList_Draw(PyObject *self, PyObject *args, PyObject _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11942,7 +11615,7 @@ static PyObject *_wrap_wxImageList_GetImageCount(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImageList_GetImageCount(_arg0); + _result = (int )wxImageList_GetImageCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11971,7 +11644,7 @@ static PyObject *_wrap_wxImageList_Remove(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_Remove(_arg0,_arg1); + _result = (bool )wxImageList_Remove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11999,7 +11672,7 @@ static PyObject *_wrap_wxImageList_RemoveAll(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageList_RemoveAll(_arg0); + _result = (bool )wxImageList_RemoveAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12037,7 +11710,7 @@ static PyObject *_wrap_wxImageList_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); + wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12088,7 +11761,7 @@ static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12121,7 +11794,7 @@ static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRegion(_arg0); + delete_wxRegion(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12149,7 +11822,7 @@ static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegion_Clear(_arg0); + wxRegion_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12180,7 +11853,7 @@ static PyObject *_wrap_wxRegion_Offset(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Offset(_arg0,_arg1,_arg2); + _result = (bool )wxRegion_Offset(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12210,7 +11883,7 @@ static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); + _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12246,7 +11919,7 @@ static PyObject *_wrap_wxRegion_ContainsPoint(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); + _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12282,7 +11955,7 @@ static PyObject *_wrap_wxRegion_ContainsRect(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); + _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12314,7 +11987,7 @@ static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12343,7 +12016,7 @@ static PyObject *_wrap_wxRegion_GetBox(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRegion_GetBox(_arg0)); + _result = new wxRect (wxRegion_GetBox(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12376,7 +12049,7 @@ static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12412,7 +12085,7 @@ static PyObject *_wrap_wxRegion_IntersectRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); + _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12449,7 +12122,7 @@ static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); + _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12477,7 +12150,7 @@ static PyObject *_wrap_wxRegion_IsEmpty(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_IsEmpty(_arg0); + _result = (bool )wxRegion_IsEmpty(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12509,7 +12182,7 @@ static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12545,7 +12218,7 @@ static PyObject *_wrap_wxRegion_UnionRect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); + _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12582,7 +12255,7 @@ static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); + _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12614,7 +12287,7 @@ static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12650,7 +12323,7 @@ static PyObject *_wrap_wxRegion_SubtractRect(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); + _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12687,7 +12360,7 @@ static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); + _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12719,7 +12392,7 @@ static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12755,7 +12428,7 @@ static PyObject *_wrap_wxRegion_XorRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_XorRect(_arg0,*_arg1); + _result = (bool )wxRegion_XorRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12792,7 +12465,7 @@ static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); + _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12829,7 +12502,7 @@ static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); + _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12862,7 +12535,7 @@ static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRegionIterator(_arg0); + delete_wxRegionIterator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12891,7 +12564,7 @@ static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetX(_arg0); + _result = (long )wxRegionIterator_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12919,7 +12592,7 @@ static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetY(_arg0); + _result = (long )wxRegionIterator_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12947,7 +12620,7 @@ static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetW(_arg0); + _result = (long )wxRegionIterator_GetW(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12975,7 +12648,7 @@ static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetWidth(_arg0); + _result = (long )wxRegionIterator_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13003,7 +12676,7 @@ static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetH(_arg0); + _result = (long )wxRegionIterator_GetH(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13031,7 +12704,7 @@ static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetHeight(_arg0); + _result = (long )wxRegionIterator_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13060,7 +12733,7 @@ static PyObject *_wrap_wxRegionIterator_GetRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRegionIterator_GetRect(_arg0)); + _result = new wxRect (wxRegionIterator_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13089,7 +12762,7 @@ static PyObject *_wrap_wxRegionIterator_HaveRects(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRegionIterator_HaveRects(_arg0); + _result = (bool )wxRegionIterator_HaveRects(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13116,7 +12789,7 @@ static PyObject *_wrap_wxRegionIterator_Reset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegionIterator_Reset(_arg0); + wxRegionIterator_Reset(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13146,7 +12819,7 @@ static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegionIterator_Next(_arg0); + wxRegionIterator_Next(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index 656cddc085..e1cac9f659 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - #define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \ wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ wxGridCellAttr* rval = NULL; \ @@ -179,7 +173,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ wxString CBNAME(int a, int b) { \ wxPyBeginBlockThreads(); \ @@ -198,7 +192,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ void CBNAME(int a, int b, const wxString& c) { \ wxPyBeginBlockThreads(); \ @@ -207,7 +201,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { wxPyEndBlockThreads(); \ } - +// TODO: unicode fix #define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ wxString CBNAME(int a, int b) { \ bool found; \ @@ -232,7 +226,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ bool CBNAME(int a, int b, const wxString& c) { \ bool rval = 0; \ @@ -365,7 +359,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ wxString CBNAME(int a) { \ bool found; \ @@ -390,7 +384,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } - +// TODO: unicode fix #define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ void CBNAME(int a, const wxString& c) { \ bool found; \ @@ -730,8 +724,13 @@ public: PyObject* ro; ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); if (ro) { - PyObject* str = PyObject_Str(ro); - rval = PyString_AsString(str); +#if wxUSE_UNICODE + PyObject* str = PyObject_Unicode(ro); + rval = PyUnicode_AS_UNICODE(str); +#else + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); +#endif Py_DECREF(ro); Py_DECREF(str); } @@ -742,8 +741,13 @@ public: void SetValue(int row, int col, const wxString& val) { wxPyBeginBlockThreads(); - if (wxPyCBH_findCallback(m_myInst, "SetValue")) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { +#if wxUSE_UNICODE + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiu)",row,col,val.c_str())); +#else + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); +#endif + } wxPyEndBlockThreads(); } @@ -895,26 +899,13 @@ static PyObject *_wrap_wxGridCellRenderer_SetParameters(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_SetParameters(_arg0,*_arg1); + wxGridCellRenderer_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -946,7 +937,7 @@ static PyObject *_wrap_wxGridCellRenderer_IncRef(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_IncRef(_arg0); + wxGridCellRenderer_IncRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -974,7 +965,7 @@ static PyObject *_wrap_wxGridCellRenderer_DecRef(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_DecRef(_arg0); + wxGridCellRenderer_DecRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1042,7 +1033,7 @@ static PyObject *_wrap_wxGridCellRenderer_Draw(PyObject *self, PyObject *args, P _arg7 = (bool ) tempbool7; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellRenderer_Draw(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7); + wxGridCellRenderer_Draw(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1101,7 +1092,7 @@ static PyObject *_wrap_wxGridCellRenderer_GetBestSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGridCellRenderer_GetBestSize(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + _result = new wxSize (wxGridCellRenderer_GetBestSize(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1131,7 +1122,7 @@ static PyObject *_wrap_wxGridCellRenderer_Clone(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGridCellRenderer_Clone(_arg0); + _result = (wxGridCellRenderer *)wxGridCellRenderer_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1165,7 +1156,7 @@ static PyObject *_wrap_new_wxPyGridCellRenderer(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridCellRenderer *)new_wxPyGridCellRenderer(); + _result = (wxPyGridCellRenderer *)new_wxPyGridCellRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1208,7 +1199,7 @@ static PyObject *_wrap_wxPyGridCellRenderer__setCallbackInfo(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellRenderer__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridCellRenderer__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1237,26 +1228,13 @@ static PyObject *_wrap_wxPyGridCellRenderer_base_SetParameters(PyObject *self, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellRenderer_base_SetParameters(_arg0,*_arg1); + wxPyGridCellRenderer_base_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1289,7 +1267,7 @@ static PyObject *_wrap_new_wxGridCellStringRenderer(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellStringRenderer *)new_wxGridCellStringRenderer(); + _result = (wxGridCellStringRenderer *)new_wxGridCellStringRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1309,7 @@ static PyObject *_wrap_new_wxGridCellNumberRenderer(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellNumberRenderer *)new_wxGridCellNumberRenderer(); + _result = (wxGridCellNumberRenderer *)new_wxGridCellNumberRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1375,7 +1353,7 @@ static PyObject *_wrap_new_wxGridCellFloatRenderer(PyObject *self, PyObject *arg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellFloatRenderer *)new_wxGridCellFloatRenderer(_arg0,_arg1); + _result = (wxGridCellFloatRenderer *)new_wxGridCellFloatRenderer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1409,7 +1387,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_GetWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellFloatRenderer_GetWidth(_arg0); + _result = (int )wxGridCellFloatRenderer_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1437,7 +1415,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_SetWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellFloatRenderer_SetWidth(_arg0,_arg1); + wxGridCellFloatRenderer_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1466,7 +1444,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_GetPrecision(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellFloatRenderer_GetPrecision(_arg0); + _result = (int )wxGridCellFloatRenderer_GetPrecision(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1494,7 +1472,7 @@ static PyObject *_wrap_wxGridCellFloatRenderer_SetPrecision(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellFloatRenderer_SetPrecision(_arg0,_arg1); + wxGridCellFloatRenderer_SetPrecision(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1523,7 +1501,7 @@ static PyObject *_wrap_new_wxGridCellBoolRenderer(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellBoolRenderer *)new_wxGridCellBoolRenderer(); + _result = (wxGridCellBoolRenderer *)new_wxGridCellBoolRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1569,45 +1547,19 @@ static PyObject *_wrap_new_wxGridCellDateTimeRenderer(PyObject *self, PyObject * return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellDateTimeRenderer *)new_wxGridCellDateTimeRenderer(*_arg0,*_arg1); + _result = (wxGridCellDateTimeRenderer *)new_wxGridCellDateTimeRenderer(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1666,7 +1618,7 @@ static PyObject *_wrap_new_wxGridCellEnumRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEnumRenderer *)new_wxGridCellEnumRenderer(*_arg0); + _result = (wxGridCellEnumRenderer *)new_wxGridCellEnumRenderer(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1711,7 +1663,7 @@ static PyObject *_wrap_new_wxGridCellAutoWrapStringRenderer(PyObject *self, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAutoWrapStringRenderer *)new_wxGridCellAutoWrapStringRenderer(); + _result = (wxGridCellAutoWrapStringRenderer *)new_wxGridCellAutoWrapStringRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,7 +1697,7 @@ static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellEditor_IsCreated(_arg0); + _result = (bool )wxGridCellEditor_IsCreated(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1773,7 +1725,7 @@ static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); + _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1809,7 +1761,7 @@ static PyObject *_wrap_wxGridCellEditor_SetControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_SetControl(_arg0,_arg1); + wxGridCellEditor_SetControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1838,26 +1790,13 @@ static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_SetParameters(_arg0,*_arg1); + wxGridCellEditor_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1889,7 +1828,7 @@ static PyObject *_wrap_wxGridCellEditor_IncRef(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_IncRef(_arg0); + wxGridCellEditor_IncRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1917,7 +1856,7 @@ static PyObject *_wrap_wxGridCellEditor_DecRef(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_DecRef(_arg0); + wxGridCellEditor_DecRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1964,7 +1903,7 @@ static PyObject *_wrap_wxGridCellEditor_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Create(_arg0,_arg1,_arg2,_arg3); + wxGridCellEditor_Create(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2003,7 +1942,7 @@ static PyObject *_wrap_wxGridCellEditor_BeginEdit(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_BeginEdit(_arg0,_arg1,_arg2,_arg3); + wxGridCellEditor_BeginEdit(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2043,7 +1982,7 @@ static PyObject *_wrap_wxGridCellEditor_EndEdit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellEditor_EndEdit(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGridCellEditor_EndEdit(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2070,7 +2009,7 @@ static PyObject *_wrap_wxGridCellEditor_Reset(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Reset(_arg0); + wxGridCellEditor_Reset(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2100,7 +2039,7 @@ static PyObject *_wrap_wxGridCellEditor_Clone(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGridCellEditor_Clone(_arg0); + _result = (wxGridCellEditor *)wxGridCellEditor_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2141,7 +2080,7 @@ static PyObject *_wrap_wxGridCellEditor_SetSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_SetSize(_arg0,*_arg1); + wxGridCellEditor_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2181,7 +2120,7 @@ static PyObject *_wrap_wxGridCellEditor_Show(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Show(_arg0,_arg1,_arg2); + wxGridCellEditor_Show(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2226,7 +2165,7 @@ static PyObject *_wrap_wxGridCellEditor_PaintBackground(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_PaintBackground(_arg0,*_arg1,_arg2); + wxGridCellEditor_PaintBackground(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2264,7 +2203,7 @@ static PyObject *_wrap_wxGridCellEditor_IsAcceptedKey(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellEditor_IsAcceptedKey(_arg0,*_arg1); + _result = (bool )wxGridCellEditor_IsAcceptedKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2239,7 @@ static PyObject *_wrap_wxGridCellEditor_StartingKey(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_StartingKey(_arg0,*_arg1); + wxGridCellEditor_StartingKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2328,7 +2267,7 @@ static PyObject *_wrap_wxGridCellEditor_StartingClick(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_StartingClick(_arg0); + wxGridCellEditor_StartingClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2365,7 +2304,7 @@ static PyObject *_wrap_wxGridCellEditor_HandleReturn(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_HandleReturn(_arg0,*_arg1); + wxGridCellEditor_HandleReturn(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2393,7 +2332,7 @@ static PyObject *_wrap_wxGridCellEditor_Destroy(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellEditor_Destroy(_arg0); + wxGridCellEditor_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2422,7 +2361,7 @@ static PyObject *_wrap_new_wxPyGridCellEditor(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridCellEditor *)new_wxPyGridCellEditor(); + _result = (wxPyGridCellEditor *)new_wxPyGridCellEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2465,7 +2404,7 @@ static PyObject *_wrap_wxPyGridCellEditor__setCallbackInfo(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridCellEditor__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2501,7 +2440,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_SetSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_SetSize(_arg0,*_arg1); + wxPyGridCellEditor_base_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2541,7 +2480,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_Show(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_Show(_arg0,_arg1,_arg2); + wxPyGridCellEditor_base_Show(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2586,7 +2525,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_PaintBackground(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_PaintBackground(_arg0,*_arg1,_arg2); + wxPyGridCellEditor_base_PaintBackground(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2623,7 +2562,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); + wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2660,7 +2599,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_StartingKey(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_StartingKey(_arg0,*_arg1); + wxPyGridCellEditor_base_StartingKey(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2688,7 +2627,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_StartingClick(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_StartingClick(_arg0); + wxPyGridCellEditor_base_StartingClick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2725,7 +2664,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_HandleReturn(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_HandleReturn(_arg0,*_arg1); + wxPyGridCellEditor_base_HandleReturn(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2753,7 +2692,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_Destroy(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_Destroy(_arg0); + wxPyGridCellEditor_base_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2782,26 +2721,13 @@ static PyObject *_wrap_wxPyGridCellEditor_base_SetParameters(PyObject *self, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellEditor_base_SetParameters(_arg0,*_arg1); + wxPyGridCellEditor_base_SetParameters(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2834,7 +2760,7 @@ static PyObject *_wrap_new_wxGridCellTextEditor(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellTextEditor *)new_wxGridCellTextEditor(); + _result = (wxGridCellTextEditor *)new_wxGridCellTextEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2878,7 +2804,7 @@ static PyObject *_wrap_new_wxGridCellNumberEditor(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellNumberEditor *)new_wxGridCellNumberEditor(_arg0,_arg1); + _result = (wxGridCellNumberEditor *)new_wxGridCellNumberEditor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2920,7 +2846,7 @@ static PyObject *_wrap_new_wxGridCellFloatEditor(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellFloatEditor *)new_wxGridCellFloatEditor(); + _result = (wxGridCellFloatEditor *)new_wxGridCellFloatEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2954,7 +2880,7 @@ static PyObject *_wrap_new_wxGridCellBoolEditor(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellBoolEditor *)new_wxGridCellBoolEditor(); + _result = (wxGridCellBoolEditor *)new_wxGridCellBoolEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3009,7 +2935,7 @@ static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2); + _result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3063,7 +2989,7 @@ static PyObject *_wrap_new_wxGridCellEnumEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEnumEditor *)new_wxGridCellEnumEditor(*_arg0); + _result = (wxGridCellEnumEditor *)new_wxGridCellEnumEditor(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3108,7 +3034,7 @@ static PyObject *_wrap_new_wxGridCellAutoWrapStringEditor(PyObject *self, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAutoWrapStringEditor *)new_wxGridCellAutoWrapStringEditor(); + _result = (wxGridCellAutoWrapStringEditor *)new_wxGridCellAutoWrapStringEditor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3143,7 +3069,7 @@ static PyObject *_wrap_new_wxGridCellAttr(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)new_wxGridCellAttr(_arg0); + _result = (wxGridCellAttr *)new_wxGridCellAttr(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3178,7 +3104,7 @@ static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxGridCellAttr_Clone(_arg0); + _result = (wxGridCellAttr *)wxGridCellAttr_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3220,7 +3146,7 @@ static PyObject *_wrap_wxGridCellAttr_MergeWith(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_MergeWith(_arg0,_arg1); + wxGridCellAttr_MergeWith(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3248,7 +3174,7 @@ static PyObject *_wrap_wxGridCellAttr_IncRef(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_IncRef(_arg0); + wxGridCellAttr_IncRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3276,7 +3202,7 @@ static PyObject *_wrap_wxGridCellAttr_DecRef(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_DecRef(_arg0); + wxGridCellAttr_DecRef(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3312,7 +3238,7 @@ static PyObject *_wrap_wxGridCellAttr_SetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetTextColour(_arg0,*_arg1); + wxGridCellAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3348,7 +3274,7 @@ static PyObject *_wrap_wxGridCellAttr_SetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetBackgroundColour(_arg0,*_arg1); + wxGridCellAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3385,7 +3311,7 @@ static PyObject *_wrap_wxGridCellAttr_SetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetFont(_arg0,*_arg1); + wxGridCellAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3415,7 +3341,7 @@ static PyObject *_wrap_wxGridCellAttr_SetAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetAlignment(_arg0,_arg1,_arg2); + wxGridCellAttr_SetAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3446,7 +3372,7 @@ static PyObject *_wrap_wxGridCellAttr_SetReadOnly(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetReadOnly(_arg0,_arg1); + wxGridCellAttr_SetReadOnly(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3483,7 +3409,7 @@ static PyObject *_wrap_wxGridCellAttr_SetRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetRenderer(_arg0,_arg1); + wxGridCellAttr_SetRenderer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3520,7 +3446,7 @@ static PyObject *_wrap_wxGridCellAttr_SetEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetEditor(_arg0,_arg1); + wxGridCellAttr_SetEditor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3549,7 +3475,7 @@ static PyObject *_wrap_wxGridCellAttr_SetKind(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetKind(_arg0,_arg1); + wxGridCellAttr_SetKind(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3578,7 +3504,7 @@ static PyObject *_wrap_wxGridCellAttr_HasTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasTextColour(_arg0); + _result = (bool )wxGridCellAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3606,7 +3532,7 @@ static PyObject *_wrap_wxGridCellAttr_HasBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasBackgroundColour(_arg0); + _result = (bool )wxGridCellAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3634,7 +3560,7 @@ static PyObject *_wrap_wxGridCellAttr_HasFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasFont(_arg0); + _result = (bool )wxGridCellAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3662,7 +3588,7 @@ static PyObject *_wrap_wxGridCellAttr_HasAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasAlignment(_arg0); + _result = (bool )wxGridCellAttr_HasAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3690,7 +3616,7 @@ static PyObject *_wrap_wxGridCellAttr_HasRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasRenderer(_arg0); + _result = (bool )wxGridCellAttr_HasRenderer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3718,7 +3644,7 @@ static PyObject *_wrap_wxGridCellAttr_HasEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasEditor(_arg0); + _result = (bool )wxGridCellAttr_HasEditor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3746,7 +3672,7 @@ static PyObject *_wrap_wxGridCellAttr_HasReadWriteMode(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_HasReadWriteMode(_arg0); + _result = (bool )wxGridCellAttr_HasReadWriteMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3775,7 +3701,7 @@ static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGridCellAttr_GetTextColour(_arg0)); + _result = new wxColour (wxGridCellAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3805,7 +3731,7 @@ static PyObject *_wrap_wxGridCellAttr_GetBackgroundColour(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGridCellAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxGridCellAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3835,7 +3761,7 @@ static PyObject *_wrap_wxGridCellAttr_GetFont(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGridCellAttr_GetFont(_arg0)); + _result = new wxFont (wxGridCellAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3873,7 +3799,7 @@ static PyObject *_wrap_wxGridCellAttr_GetAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_GetAlignment(_arg0,_arg1,_arg2); + wxGridCellAttr_GetAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3924,7 +3850,7 @@ static PyObject *_wrap_wxGridCellAttr_GetRenderer(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGridCellAttr_GetRenderer(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellRenderer *)wxGridCellAttr_GetRenderer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3970,7 +3896,7 @@ static PyObject *_wrap_wxGridCellAttr_GetEditor(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGridCellAttr_GetEditor(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellEditor *)wxGridCellAttr_GetEditor(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4004,7 +3930,7 @@ static PyObject *_wrap_wxGridCellAttr_IsReadOnly(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridCellAttr_IsReadOnly(_arg0); + _result = (bool )wxGridCellAttr_IsReadOnly(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4040,7 +3966,7 @@ static PyObject *_wrap_wxGridCellAttr_SetDefAttr(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttr_SetDefAttr(_arg0,_arg1); + wxGridCellAttr_SetDefAttr(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4061,7 +3987,7 @@ static PyObject *_wrap_new_wxGridCellAttrProvider(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttrProvider *)new_wxGridCellAttrProvider(); + _result = (wxGridCellAttrProvider *)new_wxGridCellAttrProvider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4099,7 +4025,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4143,7 +4069,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_SetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxGridCellAttrProvider_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4181,7 +4107,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_SetRowAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_SetRowAttr(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4219,7 +4145,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_SetColAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_SetColAttr(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4249,7 +4175,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrRows(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_UpdateAttrRows(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_UpdateAttrRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4279,7 +4205,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrCols(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellAttrProvider_UpdateAttrCols(_arg0,_arg1,_arg2); + wxGridCellAttrProvider_UpdateAttrCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4308,7 +4234,7 @@ static PyObject *_wrap_new_wxPyGridCellAttrProvider(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridCellAttrProvider *)new_wxPyGridCellAttrProvider(); + _result = (wxPyGridCellAttrProvider *)new_wxPyGridCellAttrProvider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4351,7 +4277,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider__setCallbackInfo(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4384,7 +4310,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4428,7 +4354,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetAttr(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxPyGridCellAttrProvider_base_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4466,7 +4392,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetRowAttr(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider_base_SetRowAttr(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider_base_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4504,7 +4430,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetColAttr(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridCellAttrProvider_base_SetColAttr(_arg0,_arg1,_arg2); + wxPyGridCellAttrProvider_base_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4549,7 +4475,7 @@ static PyObject *_wrap_wxGridTableBase_SetAttrProvider(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetAttrProvider(_arg0,_arg1); + wxGridTableBase_SetAttrProvider(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4579,7 +4505,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttrProvider(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttrProvider *)wxGridTableBase_GetAttrProvider(_arg0); + _result = (wxGridCellAttrProvider *)wxGridTableBase_GetAttrProvider(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4621,7 +4547,7 @@ static PyObject *_wrap_wxGridTableBase_SetView(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetView(_arg0,_arg1); + wxGridTableBase_SetView(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4650,7 +4576,7 @@ static PyObject *_wrap_wxGridTableBase_GetView(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGrid *)wxGridTableBase_GetView(_arg0); + _result = (wxGrid *)wxGridTableBase_GetView(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4678,7 +4604,7 @@ static PyObject *_wrap_wxGridTableBase_GetNumberRows(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableBase_GetNumberRows(_arg0); + _result = (int )wxGridTableBase_GetNumberRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4706,7 +4632,7 @@ static PyObject *_wrap_wxGridTableBase_GetNumberCols(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableBase_GetNumberCols(_arg0); + _result = (int )wxGridTableBase_GetNumberCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4736,7 +4662,7 @@ static PyObject *_wrap_wxGridTableBase_IsEmptyCell(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_IsEmptyCell(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_IsEmptyCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4766,12 +4692,16 @@ static PyObject *_wrap_wxGridTableBase_GetValue(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetValue(_arg0,_arg1,_arg2)); + _result = new wxString (wxGridTableBase_GetValue(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4801,26 +4731,13 @@ static PyObject *_wrap_wxGridTableBase_SetValue(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValue(_arg0,_arg1,_arg2,*_arg3); + wxGridTableBase_SetValue(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4855,12 +4772,16 @@ static PyObject *_wrap_wxGridTableBase_GetTypeName(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetTypeName(_arg0,_arg1,_arg2)); + _result = new wxString (wxGridTableBase_GetTypeName(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4891,26 +4812,13 @@ static PyObject *_wrap_wxGridTableBase_CanGetValueAs(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxGridTableBase_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4945,26 +4853,13 @@ static PyObject *_wrap_wxGridTableBase_CanSetValueAs(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxGridTableBase_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4998,7 +4893,7 @@ static PyObject *_wrap_wxGridTableBase_GetValueAsLong(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGridTableBase_GetValueAsLong(_arg0,_arg1,_arg2); + _result = (long )wxGridTableBase_GetValueAsLong(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5028,7 +4923,7 @@ static PyObject *_wrap_wxGridTableBase_GetValueAsDouble(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxGridTableBase_GetValueAsDouble(_arg0,_arg1,_arg2); + _result = (double )wxGridTableBase_GetValueAsDouble(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5058,7 +4953,7 @@ static PyObject *_wrap_wxGridTableBase_GetValueAsBool(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_GetValueAsBool(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_GetValueAsBool(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5088,7 +4983,7 @@ static PyObject *_wrap_wxGridTableBase_SetValueAsLong(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValueAsLong(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetValueAsLong(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5119,7 +5014,7 @@ static PyObject *_wrap_wxGridTableBase_SetValueAsDouble(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValueAsDouble(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetValueAsDouble(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5152,7 +5047,7 @@ static PyObject *_wrap_wxGridTableBase_SetValueAsBool(PyObject *self, PyObject * _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetValueAsBool(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetValueAsBool(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5180,7 +5075,7 @@ static PyObject *_wrap_wxGridTableBase_Clear(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_Clear(_arg0); + wxGridTableBase_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5211,7 +5106,7 @@ static PyObject *_wrap_wxGridTableBase_InsertRows(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_InsertRows(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_InsertRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5240,7 +5135,7 @@ static PyObject *_wrap_wxGridTableBase_AppendRows(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_AppendRows(_arg0,_arg1); + _result = (bool )wxGridTableBase_AppendRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5270,7 +5165,7 @@ static PyObject *_wrap_wxGridTableBase_DeleteRows(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_DeleteRows(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_DeleteRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5300,7 +5195,7 @@ static PyObject *_wrap_wxGridTableBase_InsertCols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_InsertCols(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_InsertCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5329,7 +5224,7 @@ static PyObject *_wrap_wxGridTableBase_AppendCols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_AppendCols(_arg0,_arg1); + _result = (bool )wxGridTableBase_AppendCols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5359,7 +5254,7 @@ static PyObject *_wrap_wxGridTableBase_DeleteCols(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_DeleteCols(_arg0,_arg1,_arg2); + _result = (bool )wxGridTableBase_DeleteCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5388,12 +5283,16 @@ static PyObject *_wrap_wxGridTableBase_GetRowLabelValue(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetRowLabelValue(_arg0,_arg1)); + _result = new wxString (wxGridTableBase_GetRowLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5422,12 +5321,16 @@ static PyObject *_wrap_wxGridTableBase_GetColLabelValue(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGridTableBase_GetColLabelValue(_arg0,_arg1)); + _result = new wxString (wxGridTableBase_GetColLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5456,26 +5359,13 @@ static PyObject *_wrap_wxGridTableBase_SetRowLabelValue(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetRowLabelValue(_arg0,_arg1,*_arg2); + wxGridTableBase_SetRowLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5509,26 +5399,13 @@ static PyObject *_wrap_wxGridTableBase_SetColLabelValue(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetColLabelValue(_arg0,_arg1,*_arg2); + wxGridTableBase_SetColLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5561,7 +5438,7 @@ static PyObject *_wrap_wxGridTableBase_CanHaveAttributes(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridTableBase_CanHaveAttributes(_arg0); + _result = (bool )wxGridTableBase_CanHaveAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5593,7 +5470,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5637,7 +5514,7 @@ static PyObject *_wrap_wxGridTableBase_SetAttr(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxGridTableBase_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5675,7 +5552,7 @@ static PyObject *_wrap_wxGridTableBase_SetRowAttr(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetRowAttr(_arg0,_arg1,_arg2); + wxGridTableBase_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5713,7 +5590,7 @@ static PyObject *_wrap_wxGridTableBase_SetColAttr(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableBase_SetColAttr(_arg0,_arg1,_arg2); + wxGridTableBase_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5750,7 +5627,7 @@ static PyObject *_wrap_new_wxPyGridTableBase(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyGridTableBase *)new_wxPyGridTableBase(); + _result = (wxPyGridTableBase *)new_wxPyGridTableBase(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5793,7 +5670,7 @@ static PyObject *_wrap_wxPyGridTableBase__setCallbackInfo(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyGridTableBase__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5821,7 +5698,7 @@ static PyObject *_wrap_wxPyGridTableBase_Destroy(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_Destroy(_arg0); + wxPyGridTableBase_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5852,12 +5729,16 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetTypeName(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyGridTableBase_base_GetTypeName(_arg0,_arg1,_arg2)); + _result = new wxString (wxPyGridTableBase_base_GetTypeName(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5888,26 +5769,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanGetValueAs(PyObject *self, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxPyGridTableBase_base_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5942,26 +5810,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanSetValueAs(PyObject *self, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxPyGridTableBase_base_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5992,7 +5847,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_Clear(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_Clear(_arg0); + wxPyGridTableBase_base_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6023,7 +5878,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_InsertRows(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_InsertRows(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_InsertRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6052,7 +5907,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_AppendRows(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_AppendRows(_arg0,_arg1); + _result = (bool )wxPyGridTableBase_base_AppendRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6082,7 +5937,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_DeleteRows(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_DeleteRows(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_DeleteRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6112,7 +5967,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_InsertCols(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_InsertCols(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_InsertCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6141,7 +5996,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_AppendCols(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_AppendCols(_arg0,_arg1); + _result = (bool )wxPyGridTableBase_base_AppendCols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6171,7 +6026,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_DeleteCols(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_DeleteCols(_arg0,_arg1,_arg2); + _result = (bool )wxPyGridTableBase_base_DeleteCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6200,12 +6055,16 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetRowLabelValue(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyGridTableBase_base_GetRowLabelValue(_arg0,_arg1)); + _result = new wxString (wxPyGridTableBase_base_GetRowLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6234,12 +6093,16 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetColLabelValue(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyGridTableBase_base_GetColLabelValue(_arg0,_arg1)); + _result = new wxString (wxPyGridTableBase_base_GetColLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6268,26 +6131,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetRowLabelValue(PyObject *self, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetRowLabelValue(_arg0,_arg1,*_arg2); + wxPyGridTableBase_base_SetRowLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6321,26 +6171,13 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetColLabelValue(PyObject *self, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetColLabelValue(_arg0,_arg1,*_arg2); + wxPyGridTableBase_base_SetColLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6373,7 +6210,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanHaveAttributes(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyGridTableBase_base_CanHaveAttributes(_arg0); + _result = (bool )wxPyGridTableBase_base_CanHaveAttributes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6405,7 +6242,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6449,7 +6286,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetAttr(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + wxPyGridTableBase_base_SetAttr(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6487,7 +6324,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetRowAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetRowAttr(_arg0,_arg1,_arg2); + wxPyGridTableBase_base_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6525,7 +6362,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetColAttr(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyGridTableBase_base_SetColAttr(_arg0,_arg1,_arg2); + wxPyGridTableBase_base_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6564,7 +6401,7 @@ static PyObject *_wrap_new_wxGridStringTable(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridStringTable *)new_wxGridStringTable(_arg0,_arg1); + _result = (wxGridStringTable *)new_wxGridStringTable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6602,7 +6439,7 @@ static PyObject *_wrap_new_wxGridTableMessage(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridTableMessage *)new_wxGridTableMessage(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridTableMessage *)new_wxGridTableMessage(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6635,7 +6472,7 @@ static PyObject *_wrap_delete_wxGridTableMessage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGridTableMessage(_arg0); + delete_wxGridTableMessage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6672,7 +6509,7 @@ static PyObject *_wrap_wxGridTableMessage_SetTableObject(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetTableObject(_arg0,_arg1); + wxGridTableMessage_SetTableObject(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6701,7 +6538,7 @@ static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); + _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6729,7 +6566,7 @@ static PyObject *_wrap_wxGridTableMessage_SetId(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetId(_arg0,_arg1); + wxGridTableMessage_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6758,7 +6595,7 @@ static PyObject *_wrap_wxGridTableMessage_GetId(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableMessage_GetId(_arg0); + _result = (int )wxGridTableMessage_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6786,7 +6623,7 @@ static PyObject *_wrap_wxGridTableMessage_SetCommandInt(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetCommandInt(_arg0,_arg1); + wxGridTableMessage_SetCommandInt(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6815,7 +6652,7 @@ static PyObject *_wrap_wxGridTableMessage_GetCommandInt(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableMessage_GetCommandInt(_arg0); + _result = (int )wxGridTableMessage_GetCommandInt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6843,7 +6680,7 @@ static PyObject *_wrap_wxGridTableMessage_SetCommandInt2(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridTableMessage_SetCommandInt2(_arg0,_arg1); + wxGridTableMessage_SetCommandInt2(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6872,7 +6709,7 @@ static PyObject *_wrap_wxGridTableMessage_GetCommandInt2(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridTableMessage_GetCommandInt2(_arg0); + _result = (int )wxGridTableMessage_GetCommandInt2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6894,7 +6731,7 @@ static PyObject *_wrap_new_wxGridCellCoords(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellCoords *)new_wxGridCellCoords(_arg0,_arg1); + _result = (wxGridCellCoords *)new_wxGridCellCoords(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6927,7 +6764,7 @@ static PyObject *_wrap_delete_wxGridCellCoords(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGridCellCoords(_arg0); + delete_wxGridCellCoords(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6956,7 +6793,7 @@ static PyObject *_wrap_wxGridCellCoords_GetRow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellCoords_GetRow(_arg0); + _result = (int )wxGridCellCoords_GetRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6984,7 +6821,7 @@ static PyObject *_wrap_wxGridCellCoords_SetRow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellCoords_SetRow(_arg0,_arg1); + wxGridCellCoords_SetRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7013,7 +6850,7 @@ static PyObject *_wrap_wxGridCellCoords_GetCol(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellCoords_GetCol(_arg0); + _result = (int )wxGridCellCoords_GetCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7041,7 +6878,7 @@ static PyObject *_wrap_wxGridCellCoords_SetCol(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellCoords_SetCol(_arg0,_arg1); + wxGridCellCoords_SetCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7071,7 +6908,7 @@ static PyObject *_wrap_wxGridCellCoords_Set(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridCellCoords_Set(_arg0,_arg1,_arg2); + wxGridCellCoords_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7105,7 +6942,7 @@ static PyObject *_wrap_wxGridCellCoords_asTuple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxGridCellCoords_asTuple(_arg0); + _result = (PyObject *)wxGridCellCoords_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7146,7 +6983,7 @@ static PyObject *_wrap_wxGridCellCoords___cmp__(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridCellCoords___cmp__(_arg0,*_arg1); + _result = (int )wxGridCellCoords___cmp__(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7236,7 +7073,7 @@ static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7273,7 +7110,7 @@ static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7301,7 +7138,7 @@ static PyObject *_wrap_wxGrid_SetSelectionMode(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetSelectionMode(_arg0,_arg1); + wxGrid_SetSelectionMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7330,7 +7167,7 @@ static PyObject *_wrap_wxGrid_GetNumberRows(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetNumberRows(_arg0); + _result = (int )wxGrid_GetNumberRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7358,7 +7195,7 @@ static PyObject *_wrap_wxGrid_GetNumberCols(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetNumberCols(_arg0); + _result = (int )wxGrid_GetNumberCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7395,7 +7232,7 @@ static PyObject *_wrap_wxGrid_ProcessTableMessage(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_ProcessTableMessage(_arg0,*_arg1); + _result = (bool )wxGrid_ProcessTableMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7423,7 +7260,7 @@ static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); + _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7464,7 +7301,7 @@ static PyObject *_wrap_wxGrid_SetTable(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_SetTable(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_SetTable(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7491,7 +7328,7 @@ static PyObject *_wrap_wxGrid_ClearGrid(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ClearGrid(_arg0); + wxGrid_ClearGrid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7525,7 +7362,7 @@ static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7557,7 +7394,7 @@ static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7590,7 +7427,7 @@ static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7623,7 +7460,7 @@ static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7655,7 +7492,7 @@ static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObjec _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7688,7 +7525,7 @@ static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7733,7 +7570,7 @@ static PyObject *_wrap_wxGrid_DrawCellHighlight(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DrawCellHighlight(_arg0,*_arg1,_arg2); + wxGrid_DrawCellHighlight(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7776,22 +7613,9 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { _arg3 = &temp; @@ -7800,7 +7624,7 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7860,15 +7684,20 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO int i, len=PySequence_Length(_obj2); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg2->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); + wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7910,7 +7739,7 @@ static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_BeginBatch(_arg0); + wxGrid_BeginBatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7938,7 +7767,7 @@ static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EndBatch(_arg0); + wxGrid_EndBatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7967,7 +7796,7 @@ static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetBatchCount(_arg0); + _result = (int )wxGrid_GetBatchCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7994,7 +7823,7 @@ static PyObject *_wrap_wxGrid_ForceRefresh(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ForceRefresh(_arg0); + wxGrid_ForceRefresh(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8023,7 +7852,7 @@ static PyObject *_wrap_wxGrid_IsEditable(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsEditable(_arg0); + _result = (bool )wxGrid_IsEditable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8053,7 +7882,7 @@ static PyObject *_wrap_wxGrid_EnableEditing(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableEditing(_arg0,_arg1); + wxGrid_EnableEditing(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8084,7 +7913,7 @@ static PyObject *_wrap_wxGrid_EnableCellEditControl(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableCellEditControl(_arg0,_arg1); + wxGrid_EnableCellEditControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8112,7 +7941,7 @@ static PyObject *_wrap_wxGrid_DisableCellEditControl(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableCellEditControl(_arg0); + wxGrid_DisableCellEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8141,7 +7970,7 @@ static PyObject *_wrap_wxGrid_CanEnableCellControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanEnableCellControl(_arg0); + _result = (bool )wxGrid_CanEnableCellControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8169,7 +7998,7 @@ static PyObject *_wrap_wxGrid_IsCellEditControlEnabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsCellEditControlEnabled(_arg0); + _result = (bool )wxGrid_IsCellEditControlEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8197,7 +8026,7 @@ static PyObject *_wrap_wxGrid_IsCellEditControlShown(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsCellEditControlShown(_arg0); + _result = (bool )wxGrid_IsCellEditControlShown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8225,7 +8054,7 @@ static PyObject *_wrap_wxGrid_IsCurrentCellReadOnly(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsCurrentCellReadOnly(_arg0); + _result = (bool )wxGrid_IsCurrentCellReadOnly(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8252,7 +8081,7 @@ static PyObject *_wrap_wxGrid_ShowCellEditControl(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ShowCellEditControl(_arg0); + wxGrid_ShowCellEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8280,7 +8109,7 @@ static PyObject *_wrap_wxGrid_HideCellEditControl(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_HideCellEditControl(_arg0); + wxGrid_HideCellEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8308,7 +8137,7 @@ static PyObject *_wrap_wxGrid_SaveEditControlValue(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SaveEditControlValue(_arg0); + wxGrid_SaveEditControlValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8344,7 +8173,7 @@ static PyObject *_wrap_wxGrid_XYToCell(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellCoords *)wxGrid_XYToCell(_arg0,_arg1,_arg2); + _result = (wxGridCellCoords *)wxGrid_XYToCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8379,7 +8208,7 @@ static PyObject *_wrap_wxGrid_YToRow(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_YToRow(_arg0,_arg1); + _result = (int )wxGrid_YToRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8408,7 +8237,7 @@ static PyObject *_wrap_wxGrid_XToCol(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_XToCol(_arg0,_arg1); + _result = (int )wxGrid_XToCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8437,7 +8266,7 @@ static PyObject *_wrap_wxGrid_YToEdgeOfRow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_YToEdgeOfRow(_arg0,_arg1); + _result = (int )wxGrid_YToEdgeOfRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8466,7 +8295,7 @@ static PyObject *_wrap_wxGrid_XToEdgeOfCol(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_XToEdgeOfCol(_arg0,_arg1); + _result = (int )wxGrid_XToEdgeOfCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8497,7 +8326,7 @@ static PyObject *_wrap_wxGrid_CellToRect(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxGrid_CellToRect(_arg0,_arg1,_arg2)); + _result = new wxRect (wxGrid_CellToRect(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8526,7 +8355,7 @@ static PyObject *_wrap_wxGrid_GetGridCursorRow(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetGridCursorRow(_arg0); + _result = (int )wxGrid_GetGridCursorRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8554,7 +8383,7 @@ static PyObject *_wrap_wxGrid_GetGridCursorCol(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetGridCursorCol(_arg0); + _result = (int )wxGrid_GetGridCursorCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8587,7 +8416,7 @@ static PyObject *_wrap_wxGrid_IsVisible(PyObject *self, PyObject *args, PyObject _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsVisible(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxGrid_IsVisible(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8616,7 +8445,7 @@ static PyObject *_wrap_wxGrid_MakeCellVisible(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_MakeCellVisible(_arg0,_arg1,_arg2); + wxGrid_MakeCellVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8646,7 +8475,7 @@ static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetGridCursor(_arg0,_arg1,_arg2); + wxGrid_SetGridCursor(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8678,7 +8507,7 @@ static PyObject *_wrap_wxGrid_MoveCursorUp(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorUp(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorUp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8709,7 +8538,7 @@ static PyObject *_wrap_wxGrid_MoveCursorDown(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorDown(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorDown(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8740,7 +8569,7 @@ static PyObject *_wrap_wxGrid_MoveCursorLeft(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorLeft(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8771,7 +8600,7 @@ static PyObject *_wrap_wxGrid_MoveCursorRight(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorRight(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8799,7 +8628,7 @@ static PyObject *_wrap_wxGrid_MovePageDown(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MovePageDown(_arg0); + _result = (bool )wxGrid_MovePageDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8827,7 +8656,7 @@ static PyObject *_wrap_wxGrid_MovePageUp(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MovePageUp(_arg0); + _result = (bool )wxGrid_MovePageUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8858,7 +8687,7 @@ static PyObject *_wrap_wxGrid_MoveCursorUpBlock(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorUpBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorUpBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8889,7 +8718,7 @@ static PyObject *_wrap_wxGrid_MoveCursorDownBlock(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorDownBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorDownBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8920,7 +8749,7 @@ static PyObject *_wrap_wxGrid_MoveCursorLeftBlock(PyObject *self, PyObject *args _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorLeftBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorLeftBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8951,7 +8780,7 @@ static PyObject *_wrap_wxGrid_MoveCursorRightBlock(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_MoveCursorRightBlock(_arg0,_arg1); + _result = (bool )wxGrid_MoveCursorRightBlock(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8979,7 +8808,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRowLabelSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultRowLabelSize(_arg0); + _result = (int )wxGrid_GetDefaultRowLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9007,7 +8836,7 @@ static PyObject *_wrap_wxGrid_GetRowLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetRowLabelSize(_arg0); + _result = (int )wxGrid_GetRowLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9035,7 +8864,7 @@ static PyObject *_wrap_wxGrid_GetDefaultColLabelSize(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultColLabelSize(_arg0); + _result = (int )wxGrid_GetDefaultColLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9063,7 +8892,7 @@ static PyObject *_wrap_wxGrid_GetColLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetColLabelSize(_arg0); + _result = (int )wxGrid_GetColLabelSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9092,7 +8921,7 @@ static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetLabelBackgroundColour(_arg0)); + _result = new wxColour (wxGrid_GetLabelBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9122,7 +8951,7 @@ static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetLabelTextColour(_arg0)); + _result = new wxColour (wxGrid_GetLabelTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9152,7 +8981,7 @@ static PyObject *_wrap_wxGrid_GetLabelFont(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGrid_GetLabelFont(_arg0)); + _result = new wxFont (wxGrid_GetLabelFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9190,7 +9019,7 @@ static PyObject *_wrap_wxGrid_GetRowLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetRowLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_GetRowLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9238,7 +9067,7 @@ static PyObject *_wrap_wxGrid_GetColLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetColLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_GetColLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9278,12 +9107,16 @@ static PyObject *_wrap_wxGrid_GetRowLabelValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGrid_GetRowLabelValue(_arg0,_arg1)); + _result = new wxString (wxGrid_GetRowLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9312,12 +9145,16 @@ static PyObject *_wrap_wxGrid_GetColLabelValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGrid_GetColLabelValue(_arg0,_arg1)); + _result = new wxString (wxGrid_GetColLabelValue(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9346,7 +9183,7 @@ static PyObject *_wrap_wxGrid_GetGridLineColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetGridLineColour(_arg0)); + _result = new wxColour (wxGrid_GetGridLineColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9376,7 +9213,7 @@ static PyObject *_wrap_wxGrid_GetCellHighlightColour(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetCellHighlightColour(_arg0)); + _result = new wxColour (wxGrid_GetCellHighlightColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9405,7 +9242,7 @@ static PyObject *_wrap_wxGrid_GetCellHighlightPenWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetCellHighlightPenWidth(_arg0); + _result = (int )wxGrid_GetCellHighlightPenWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9433,7 +9270,7 @@ static PyObject *_wrap_wxGrid_GetCellHighlightROPenWidth(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetCellHighlightROPenWidth(_arg0); + _result = (int )wxGrid_GetCellHighlightROPenWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9461,7 +9298,7 @@ static PyObject *_wrap_wxGrid_SetRowLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowLabelSize(_arg0,_arg1); + wxGrid_SetRowLabelSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9490,7 +9327,7 @@ static PyObject *_wrap_wxGrid_SetColLabelSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColLabelSize(_arg0,_arg1); + wxGrid_SetColLabelSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9526,7 +9363,7 @@ static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); + wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9562,7 +9399,7 @@ static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetLabelTextColour(_arg0,*_arg1); + wxGrid_SetLabelTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9599,7 +9436,7 @@ static PyObject *_wrap_wxGrid_SetLabelFont(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetLabelFont(_arg0,*_arg1); + wxGrid_SetLabelFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9629,7 +9466,7 @@ static PyObject *_wrap_wxGrid_SetRowLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_SetRowLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9659,7 +9496,7 @@ static PyObject *_wrap_wxGrid_SetColLabelAlignment(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColLabelAlignment(_arg0,_arg1,_arg2); + wxGrid_SetColLabelAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9689,26 +9526,13 @@ static PyObject *_wrap_wxGrid_SetRowLabelValue(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowLabelValue(_arg0,_arg1,*_arg2); + wxGrid_SetRowLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9742,26 +9566,13 @@ static PyObject *_wrap_wxGrid_SetColLabelValue(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColLabelValue(_arg0,_arg1,*_arg2); + wxGrid_SetColLabelValue(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9801,7 +9612,7 @@ static PyObject *_wrap_wxGrid_SetGridLineColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetGridLineColour(_arg0,*_arg1); + wxGrid_SetGridLineColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9837,7 +9648,7 @@ static PyObject *_wrap_wxGrid_SetCellHighlightColour(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellHighlightColour(_arg0,*_arg1); + wxGrid_SetCellHighlightColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9866,7 +9677,7 @@ static PyObject *_wrap_wxGrid_SetCellHighlightPenWidth(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellHighlightPenWidth(_arg0,_arg1); + wxGrid_SetCellHighlightPenWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9895,7 +9706,7 @@ static PyObject *_wrap_wxGrid_SetCellHighlightROPenWidth(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellHighlightROPenWidth(_arg0,_arg1); + wxGrid_SetCellHighlightROPenWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9926,7 +9737,7 @@ static PyObject *_wrap_wxGrid_EnableDragRowSize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableDragRowSize(_arg0,_arg1); + wxGrid_EnableDragRowSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9954,7 +9765,7 @@ static PyObject *_wrap_wxGrid_DisableDragRowSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableDragRowSize(_arg0); + wxGrid_DisableDragRowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9983,7 +9794,7 @@ static PyObject *_wrap_wxGrid_CanDragRowSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanDragRowSize(_arg0); + _result = (bool )wxGrid_CanDragRowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10013,7 +9824,7 @@ static PyObject *_wrap_wxGrid_EnableDragColSize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableDragColSize(_arg0,_arg1); + wxGrid_EnableDragColSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10041,7 +9852,7 @@ static PyObject *_wrap_wxGrid_DisableDragColSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableDragColSize(_arg0); + wxGrid_DisableDragColSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10070,7 +9881,7 @@ static PyObject *_wrap_wxGrid_CanDragColSize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanDragColSize(_arg0); + _result = (bool )wxGrid_CanDragColSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10100,7 +9911,7 @@ static PyObject *_wrap_wxGrid_EnableDragGridSize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableDragGridSize(_arg0,_arg1); + wxGrid_EnableDragGridSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10128,7 +9939,7 @@ static PyObject *_wrap_wxGrid_DisableDragGridSize(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DisableDragGridSize(_arg0); + wxGrid_DisableDragGridSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10157,7 +9968,7 @@ static PyObject *_wrap_wxGrid_CanDragGridSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_CanDragGridSize(_arg0); + _result = (bool )wxGrid_CanDragGridSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10194,7 +10005,7 @@ static PyObject *_wrap_wxGrid_SetRowAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowAttr(_arg0,_arg1,_arg2); + wxGrid_SetRowAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10232,7 +10043,7 @@ static PyObject *_wrap_wxGrid_SetColAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColAttr(_arg0,_arg1,_arg2); + wxGrid_SetColAttr(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10261,7 +10072,7 @@ static PyObject *_wrap_wxGrid_SetColFormatBool(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatBool(_arg0,_arg1); + wxGrid_SetColFormatBool(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10290,7 +10101,7 @@ static PyObject *_wrap_wxGrid_SetColFormatNumber(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatNumber(_arg0,_arg1); + wxGrid_SetColFormatNumber(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10321,7 +10132,7 @@ static PyObject *_wrap_wxGrid_SetColFormatFloat(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatFloat(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetColFormatFloat(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10351,26 +10162,13 @@ static PyObject *_wrap_wxGrid_SetColFormatCustom(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColFormatCustom(_arg0,_arg1,*_arg2); + wxGrid_SetColFormatCustom(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10405,7 +10203,7 @@ static PyObject *_wrap_wxGrid_EnableGridLines(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_EnableGridLines(_arg0,_arg1); + wxGrid_EnableGridLines(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10434,7 +10232,7 @@ static PyObject *_wrap_wxGrid_GridLinesEnabled(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_GridLinesEnabled(_arg0); + _result = (bool )wxGrid_GridLinesEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10462,7 +10260,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRowSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultRowSize(_arg0); + _result = (int )wxGrid_GetDefaultRowSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10491,7 +10289,7 @@ static PyObject *_wrap_wxGrid_GetRowSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetRowSize(_arg0,_arg1); + _result = (int )wxGrid_GetRowSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10519,7 +10317,7 @@ static PyObject *_wrap_wxGrid_GetDefaultColSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetDefaultColSize(_arg0); + _result = (int )wxGrid_GetDefaultColSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10548,7 +10346,7 @@ static PyObject *_wrap_wxGrid_GetColSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGrid_GetColSize(_arg0,_arg1); + _result = (int )wxGrid_GetColSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10577,7 +10375,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellBackgroundColour(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetDefaultCellBackgroundColour(_arg0)); + _result = new wxColour (wxGrid_GetDefaultCellBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10609,7 +10407,7 @@ static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2)); + _result = new wxColour (wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10639,7 +10437,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetDefaultCellTextColour(_arg0)); + _result = new wxColour (wxGrid_GetDefaultCellTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10671,7 +10469,7 @@ static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetCellTextColour(_arg0,_arg1,_arg2)); + _result = new wxColour (wxGrid_GetCellTextColour(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10701,7 +10499,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGrid_GetDefaultCellFont(_arg0)); + _result = new wxFont (wxGrid_GetDefaultCellFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10733,7 +10531,7 @@ static PyObject *_wrap_wxGrid_GetCellFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxGrid_GetCellFont(_arg0,_arg1,_arg2)); + _result = new wxFont (wxGrid_GetCellFont(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10779,7 +10577,7 @@ static PyObject *_wrap_wxGrid_GetDefaultCellAlignment(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetDefaultCellAlignment(_arg0,_arg1,_arg2); + wxGrid_GetDefaultCellAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10827,7 +10625,7 @@ static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_GetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + wxGrid_GetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10859,7 +10657,7 @@ static PyObject *_wrap_wxGrid_SetDefaultRowSize(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultRowSize(_arg0,_arg1,_arg2); + wxGrid_SetDefaultRowSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10889,7 +10687,7 @@ static PyObject *_wrap_wxGrid_SetRowSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowSize(_arg0,_arg1,_arg2); + wxGrid_SetRowSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10921,7 +10719,7 @@ static PyObject *_wrap_wxGrid_SetDefaultColSize(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultColSize(_arg0,_arg1,_arg2); + wxGrid_SetDefaultColSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10951,7 +10749,7 @@ static PyObject *_wrap_wxGrid_SetColSize(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColSize(_arg0,_arg1,_arg2); + wxGrid_SetColSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10983,7 +10781,7 @@ static PyObject *_wrap_wxGrid_AutoSizeColumn(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeColumn(_arg0,_arg1,_arg2); + wxGrid_AutoSizeColumn(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11015,7 +10813,7 @@ static PyObject *_wrap_wxGrid_AutoSizeRow(PyObject *self, PyObject *args, PyObje _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeRow(_arg0,_arg1,_arg2); + wxGrid_AutoSizeRow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11046,7 +10844,7 @@ static PyObject *_wrap_wxGrid_AutoSizeColumns(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeColumns(_arg0,_arg1); + wxGrid_AutoSizeColumns(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11077,7 +10875,7 @@ static PyObject *_wrap_wxGrid_AutoSizeRows(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSizeRows(_arg0,_arg1); + wxGrid_AutoSizeRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11105,7 +10903,7 @@ static PyObject *_wrap_wxGrid_AutoSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_AutoSize(_arg0); + wxGrid_AutoSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11135,7 +10933,7 @@ static PyObject *_wrap_wxGrid_SetColMinimalWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetColMinimalWidth(_arg0,_arg1,_arg2); + wxGrid_SetColMinimalWidth(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11165,7 +10963,7 @@ static PyObject *_wrap_wxGrid_SetRowMinimalHeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetRowMinimalHeight(_arg0,_arg1,_arg2); + wxGrid_SetRowMinimalHeight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11201,7 +10999,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellBackgroundColour(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellBackgroundColour(_arg0,*_arg1); + wxGrid_SetDefaultCellBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11239,7 +11037,7 @@ static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellBackgroundColour(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellBackgroundColour(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11275,7 +11073,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellTextColour(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellTextColour(_arg0,*_arg1); + wxGrid_SetDefaultCellTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11313,7 +11111,7 @@ static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellTextColour(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellTextColour(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11350,7 +11148,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellFont(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellFont(_arg0,*_arg1); + wxGrid_SetDefaultCellFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11389,7 +11187,7 @@ static PyObject *_wrap_wxGrid_SetCellFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellFont(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellFont(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11419,7 +11217,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellAlignment(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultCellAlignment(_arg0,_arg1,_arg2); + wxGrid_SetDefaultCellAlignment(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11451,7 +11249,7 @@ static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11488,7 +11286,7 @@ static PyObject *_wrap_wxGrid_SetDefaultRenderer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultRenderer(_arg0,_arg1); + wxGrid_SetDefaultRenderer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11527,7 +11325,7 @@ static PyObject *_wrap_wxGrid_SetCellRenderer(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellRenderer(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetCellRenderer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11557,7 +11355,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRenderer(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetDefaultRenderer(_arg0); + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRenderer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11594,7 +11392,7 @@ static PyObject *_wrap_wxGrid_GetCellRenderer(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetCellRenderer(_arg0,_arg1,_arg2); + _result = (wxGridCellRenderer *)wxGrid_GetCellRenderer(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11636,7 +11434,7 @@ static PyObject *_wrap_wxGrid_SetDefaultEditor(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetDefaultEditor(_arg0,_arg1); + wxGrid_SetDefaultEditor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11675,7 +11473,7 @@ static PyObject *_wrap_wxGrid_SetCellEditor(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellEditor(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetCellEditor(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11705,7 +11503,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditor(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetDefaultEditor(_arg0); + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11742,7 +11540,7 @@ static PyObject *_wrap_wxGrid_GetCellEditor(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetCellEditor(_arg0,_arg1,_arg2); + _result = (wxGridCellEditor *)wxGrid_GetCellEditor(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11778,12 +11576,16 @@ static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGrid_GetCellValue(_arg0,_arg1,_arg2)); + _result = new wxString (wxGrid_GetCellValue(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -11813,26 +11615,13 @@ static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetCellValue(_arg0,_arg1,_arg2,*_arg3); + wxGrid_SetCellValue(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11867,7 +11656,7 @@ static PyObject *_wrap_wxGrid_IsReadOnly(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsReadOnly(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_IsReadOnly(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11899,7 +11688,7 @@ static PyObject *_wrap_wxGrid_SetReadOnly(PyObject *self, PyObject *args, PyObje _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetReadOnly(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetReadOnly(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11931,7 +11720,7 @@ static PyObject *_wrap_wxGrid_SelectRow(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectRow(_arg0,_arg1,_arg2); + wxGrid_SelectRow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11963,7 +11752,7 @@ static PyObject *_wrap_wxGrid_SelectCol(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectCol(_arg0,_arg1,_arg2); + wxGrid_SelectCol(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11998,7 +11787,7 @@ static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObje _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12026,7 +11815,7 @@ static PyObject *_wrap_wxGrid_SelectAll(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SelectAll(_arg0); + wxGrid_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12055,7 +11844,7 @@ static PyObject *_wrap_wxGrid_IsSelection(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsSelection(_arg0); + _result = (bool )wxGrid_IsSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12082,7 +11871,7 @@ static PyObject *_wrap_wxGrid_ClearSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_ClearSelection(_arg0); + wxGrid_ClearSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12113,7 +11902,7 @@ static PyObject *_wrap_wxGrid_IsInSelection(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGrid_IsInSelection(_arg0,_arg1,_arg2); + _result = (bool )wxGrid_IsInSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12158,7 +11947,7 @@ static PyObject *_wrap_wxGrid_BlockToDeviceRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxGrid_BlockToDeviceRect(_arg0,*_arg1,*_arg2)); + _result = new wxRect (wxGrid_BlockToDeviceRect(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12188,7 +11977,7 @@ static PyObject *_wrap_wxGrid_GetSelectionBackground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetSelectionBackground(_arg0)); + _result = new wxColour (wxGrid_GetSelectionBackground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12218,7 +12007,7 @@ static PyObject *_wrap_wxGrid_GetSelectionForeground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxGrid_GetSelectionForeground(_arg0)); + _result = new wxColour (wxGrid_GetSelectionForeground(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12254,7 +12043,7 @@ static PyObject *_wrap_wxGrid_SetSelectionBackground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetSelectionBackground(_arg0,*_arg1); + wxGrid_SetSelectionBackground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12290,7 +12079,7 @@ static PyObject *_wrap_wxGrid_SetSelectionForeground(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetSelectionForeground(_arg0,*_arg1); + wxGrid_SetSelectionForeground(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12323,22 +12112,9 @@ static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -12356,7 +12132,7 @@ static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_RegisterDataType(_arg0,*_arg1,_arg2,_arg3); + wxGrid_RegisterDataType(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12392,7 +12168,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForCell(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForCell(_arg0,_arg1,_arg2); + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12429,7 +12205,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForCell(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForCell(_arg0,_arg1,_arg2); + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForCell(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12465,26 +12241,13 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForType(_arg0,*_arg1); + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12524,26 +12287,13 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForType(_arg0,*_arg1); + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12582,7 +12332,7 @@ static PyObject *_wrap_wxGrid_SetMargins(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_SetMargins(_arg0,_arg1,_arg2); + wxGrid_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12611,7 +12361,7 @@ static PyObject *_wrap_wxGrid_GetGridWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12639,7 +12389,7 @@ static PyObject *_wrap_wxGrid_GetGridRowLabelWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridRowLabelWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridRowLabelWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12667,7 +12417,7 @@ static PyObject *_wrap_wxGrid_GetGridColLabelWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridColLabelWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridColLabelWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12695,7 +12445,7 @@ static PyObject *_wrap_wxGrid_GetGridCornerLabelWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGrid_GetGridCornerLabelWindow(_arg0); + _result = (wxWindow *)wxGrid_GetGridCornerLabelWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12777,7 +12527,7 @@ static PyObject *_wrap_new_wxGridEvent(PyObject *self, PyObject *args, PyObject _arg11 = (bool ) tempbool11; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridEvent *)new_wxGridEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11); + _result = (wxGridEvent *)new_wxGridEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12811,7 +12561,7 @@ static PyObject *_wrap_wxGridEvent_GetRow(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEvent_GetRow(_arg0); + _result = (int )wxGridEvent_GetRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12839,7 +12589,7 @@ static PyObject *_wrap_wxGridEvent_GetCol(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEvent_GetCol(_arg0); + _result = (int )wxGridEvent_GetCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12868,7 +12618,7 @@ static PyObject *_wrap_wxGridEvent_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); + _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12897,7 +12647,7 @@ static PyObject *_wrap_wxGridEvent_Selecting(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_Selecting(_arg0); + _result = (bool )wxGridEvent_Selecting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12925,7 +12675,7 @@ static PyObject *_wrap_wxGridEvent_ControlDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_ControlDown(_arg0); + _result = (bool )wxGridEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12953,7 +12703,7 @@ static PyObject *_wrap_wxGridEvent_MetaDown(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_MetaDown(_arg0); + _result = (bool )wxGridEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -12981,7 +12731,7 @@ static PyObject *_wrap_wxGridEvent_ShiftDown(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_ShiftDown(_arg0); + _result = (bool )wxGridEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13009,7 +12759,7 @@ static PyObject *_wrap_wxGridEvent_AltDown(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridEvent_AltDown(_arg0); + _result = (bool )wxGridEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13087,7 +12837,7 @@ static PyObject *_wrap_new_wxGridSizeEvent(PyObject *self, PyObject *args, PyObj _arg9 = (bool ) tempbool9; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridSizeEvent *)new_wxGridSizeEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxGridSizeEvent *)new_wxGridSizeEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13121,7 +12871,7 @@ static PyObject *_wrap_wxGridSizeEvent_GetRowOrCol(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizeEvent_GetRowOrCol(_arg0); + _result = (int )wxGridSizeEvent_GetRowOrCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13150,7 +12900,7 @@ static PyObject *_wrap_wxGridSizeEvent_GetPosition(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxGridSizeEvent_GetPosition(_arg0)); + _result = new wxPoint (wxGridSizeEvent_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13179,7 +12929,7 @@ static PyObject *_wrap_wxGridSizeEvent_ControlDown(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_ControlDown(_arg0); + _result = (bool )wxGridSizeEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13207,7 +12957,7 @@ static PyObject *_wrap_wxGridSizeEvent_MetaDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_MetaDown(_arg0); + _result = (bool )wxGridSizeEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13235,7 +12985,7 @@ static PyObject *_wrap_wxGridSizeEvent_ShiftDown(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_ShiftDown(_arg0); + _result = (bool )wxGridSizeEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13263,7 +13013,7 @@ static PyObject *_wrap_wxGridSizeEvent_AltDown(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridSizeEvent_AltDown(_arg0); + _result = (bool )wxGridSizeEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13357,7 +13107,7 @@ static PyObject *_wrap_new_wxGridRangeSelectEvent(PyObject *self, PyObject *args _arg9 = (bool ) tempbool9; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridRangeSelectEvent *)new_wxGridRangeSelectEvent(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxGridRangeSelectEvent *)new_wxGridRangeSelectEvent(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13392,7 +13142,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetTopLeftCoords(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetTopLeftCoords(_arg0)); + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetTopLeftCoords(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13422,7 +13172,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRightCoords(PyObject *sel } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetBottomRightCoords(_arg0)); + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetBottomRightCoords(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13451,7 +13201,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetTopRow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetTopRow(_arg0); + _result = (int )wxGridRangeSelectEvent_GetTopRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13479,7 +13229,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRow(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetBottomRow(_arg0); + _result = (int )wxGridRangeSelectEvent_GetBottomRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13507,7 +13257,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetLeftCol(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetLeftCol(_arg0); + _result = (int )wxGridRangeSelectEvent_GetLeftCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13535,7 +13285,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_GetRightCol(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridRangeSelectEvent_GetRightCol(_arg0); + _result = (int )wxGridRangeSelectEvent_GetRightCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13563,7 +13313,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_Selecting(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_Selecting(_arg0); + _result = (bool )wxGridRangeSelectEvent_Selecting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13591,7 +13341,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_ControlDown(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_ControlDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_ControlDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13619,7 +13369,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_MetaDown(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_MetaDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_MetaDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13647,7 +13397,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_ShiftDown(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_ShiftDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_ShiftDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13675,7 +13425,7 @@ static PyObject *_wrap_wxGridRangeSelectEvent_AltDown(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGridRangeSelectEvent_AltDown(_arg0); + _result = (bool )wxGridRangeSelectEvent_AltDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13741,7 +13491,7 @@ static PyObject *_wrap_new_wxGridEditorCreatedEvent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridEditorCreatedEvent *)new_wxGridEditorCreatedEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + _result = (wxGridEditorCreatedEvent *)new_wxGridEditorCreatedEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13775,7 +13525,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_GetRow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEditorCreatedEvent_GetRow(_arg0); + _result = (int )wxGridEditorCreatedEvent_GetRow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13803,7 +13553,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_GetCol(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridEditorCreatedEvent_GetCol(_arg0); + _result = (int )wxGridEditorCreatedEvent_GetCol(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13831,7 +13581,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_GetControl(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)wxGridEditorCreatedEvent_GetControl(_arg0); + _result = (wxControl *)wxGridEditorCreatedEvent_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13859,7 +13609,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_SetRow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridEditorCreatedEvent_SetRow(_arg0,_arg1); + wxGridEditorCreatedEvent_SetRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13888,7 +13638,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_SetCol(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridEditorCreatedEvent_SetCol(_arg0,_arg1); + wxGridEditorCreatedEvent_SetCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -13925,7 +13675,7 @@ static PyObject *_wrap_wxGridEditorCreatedEvent_SetControl(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridEditorCreatedEvent_SetControl(_arg0,_arg1); + wxGridEditorCreatedEvent_SetControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/help.cpp b/wxPython/src/msw/help.cpp index b8d3f2f353..5115a5c680 100644 --- a/wxPython/src/msw/help.cpp +++ b/wxPython/src/msw/help.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -140,7 +134,7 @@ static PyObject *_wrap_new_wxHelpEvent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHelpEvent *)new_wxHelpEvent(_arg0,_arg1,*_arg2); + _result = (wxHelpEvent *)new_wxHelpEvent(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -175,7 +169,7 @@ static PyObject *_wrap_wxHelpEvent_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxPoint & _result_ref = wxHelpEvent_GetPosition(_arg0); + const wxPoint & _result_ref = wxHelpEvent_GetPosition(_arg0); _result = (wxPoint *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -217,7 +211,7 @@ static PyObject *_wrap_wxHelpEvent_SetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpEvent_SetPosition(_arg0,*_arg1); + wxHelpEvent_SetPosition(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -246,13 +240,17 @@ static PyObject *_wrap_wxHelpEvent_GetLink(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxHelpEvent_GetLink(_arg0); + const wxString & _result_ref = wxHelpEvent_GetLink(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -277,26 +275,13 @@ static PyObject *_wrap_wxHelpEvent_SetLink(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpEvent_SetLink(_arg0,*_arg1); + wxHelpEvent_SetLink(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -329,13 +314,17 @@ static PyObject *_wrap_wxHelpEvent_GetTarget(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxHelpEvent_GetTarget(_arg0); + const wxString & _result_ref = wxHelpEvent_GetTarget(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -360,26 +349,13 @@ static PyObject *_wrap_wxHelpEvent_SetTarget(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpEvent_SetTarget(_arg0,*_arg1); + wxHelpEvent_SetTarget(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -439,7 +415,7 @@ static PyObject *_wrap_new_wxContextMenuEvent(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextMenuEvent *)new_wxContextMenuEvent(_arg0,_arg1,*_arg2); + _result = (wxContextMenuEvent *)new_wxContextMenuEvent(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -474,7 +450,7 @@ static PyObject *_wrap_wxContextMenuEvent_GetPosition(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxPoint & _result_ref = wxContextMenuEvent_GetPosition(_arg0); + const wxPoint & _result_ref = wxContextMenuEvent_GetPosition(_arg0); _result = (wxPoint *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -516,7 +492,7 @@ static PyObject *_wrap_wxContextMenuEvent_SetPosition(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxContextMenuEvent_SetPosition(_arg0,*_arg1); + wxContextMenuEvent_SetPosition(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -557,7 +533,7 @@ static PyObject *_wrap_new_wxContextHelp(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextHelp *)new_wxContextHelp(_arg0,_arg1); + _result = (wxContextHelp *)new_wxContextHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -590,7 +566,7 @@ static PyObject *_wrap_delete_wxContextHelp(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxContextHelp(_arg0); + delete_wxContextHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -628,7 +604,7 @@ static PyObject *_wrap_wxContextHelp_BeginContextHelp(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxContextHelp_BeginContextHelp(_arg0,_arg1); + _result = (bool )wxContextHelp_BeginContextHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -656,7 +632,7 @@ static PyObject *_wrap_wxContextHelp_EndContextHelp(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxContextHelp_EndContextHelp(_arg0); + _result = (bool )wxContextHelp_EndContextHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -753,7 +729,7 @@ static PyObject *_wrap_new_wxContextHelpButton(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextHelpButton *)new_wxContextHelpButton(_arg0,_arg1,*_arg2,*_arg3,_arg4); + _result = (wxContextHelpButton *)new_wxContextHelpButton(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -787,7 +763,7 @@ static PyObject *_wrap_wxHelpProvider_Set(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHelpProvider *)wxHelpProvider::Set(_arg0); + _result = (wxHelpProvider *)wxHelpProvider::Set(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -812,7 +788,7 @@ static PyObject *_wrap_wxHelpProvider_Get(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHelpProvider *)wxHelpProvider::Get(); + _result = (wxHelpProvider *)wxHelpProvider::Get(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -855,12 +831,16 @@ static PyObject *_wrap_wxHelpProvider_GetHelp(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHelpProvider_GetHelp(_arg0,_arg1)); + _result = new wxString (wxHelpProvider_GetHelp(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -897,7 +877,7 @@ static PyObject *_wrap_wxHelpProvider_ShowHelp(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHelpProvider_ShowHelp(_arg0,_arg1); + _result = (bool )wxHelpProvider_ShowHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -934,26 +914,13 @@ static PyObject *_wrap_wxHelpProvider_AddHelp(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpProvider_AddHelp(_arg0,_arg1,*_arg2); + wxHelpProvider_AddHelp(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -987,26 +954,13 @@ static PyObject *_wrap_wxHelpProvider_AddHelpById(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpProvider_AddHelpById(_arg0,_arg1,*_arg2); + wxHelpProvider_AddHelpById(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1038,7 +992,7 @@ static PyObject *_wrap_wxHelpProvider_Destroy(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHelpProvider_Destroy(_arg0); + wxHelpProvider_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1067,7 +1021,7 @@ static PyObject *_wrap_new_wxSimpleHelpProvider(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSimpleHelpProvider *)new_wxSimpleHelpProvider(); + _result = (wxSimpleHelpProvider *)new_wxSimpleHelpProvider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index c61ffe4bbc..c65a556171 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -92,12 +92,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPyHtmlTagHandler : public wxHtmlTagHandler { DECLARE_DYNAMIC_CLASS(wxPyHtmlTagHandler); public: @@ -306,7 +300,7 @@ static PyObject *_wrap_wxHtmlWinParser_AddTagHandler(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_AddTagHandler(_arg0); + wxHtmlWinParser_AddTagHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -333,7 +327,7 @@ static PyObject *_wrap_wxHtmlWindow_AddFilter(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_AddFilter(_arg0); + wxHtmlWindow_AddFilter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -365,45 +359,19 @@ static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxHtmlLinkInfo",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlLinkInfo *)new_wxHtmlLinkInfo(*_arg0,*_arg1); + _result = (wxHtmlLinkInfo *)new_wxHtmlLinkInfo(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -445,12 +413,16 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetHref(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlLinkInfo_GetHref(_arg0)); + _result = new wxString (wxHtmlLinkInfo_GetHref(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -478,12 +450,16 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetTarget(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlLinkInfo_GetTarget(_arg0)); + _result = new wxString (wxHtmlLinkInfo_GetTarget(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -511,7 +487,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMouseEvent *)wxHtmlLinkInfo_GetEvent(_arg0); + _result = (wxMouseEvent *)wxHtmlLinkInfo_GetEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -540,7 +516,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetHtmlCell(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlLinkInfo_GetHtmlCell(_arg0); + _result = (wxHtmlCell *)wxHtmlLinkInfo_GetHtmlCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -582,7 +558,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_SetEvent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlLinkInfo_SetEvent(_arg0,_arg1); + wxHtmlLinkInfo_SetEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -619,7 +595,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_SetHtmlCell(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlLinkInfo_SetHtmlCell(_arg0,_arg1); + wxHtmlLinkInfo_SetHtmlCell(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -656,12 +632,16 @@ static PyObject *_wrap_wxHtmlTag_GetName(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlTag_GetName(_arg0)); + _result = new wxString (wxHtmlTag_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -690,26 +670,13 @@ static PyObject *_wrap_wxHtmlTag_HasParam(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlTag_HasParam(_arg0,*_arg1); + _result = (bool )wxHtmlTag_HasParam(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -743,31 +710,22 @@ static PyObject *_wrap_wxHtmlTag_GetParam(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlTag_GetParam(_arg0,*_arg1,_arg2)); + _result = new wxString (wxHtmlTag_GetParam(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -799,12 +757,16 @@ static PyObject *_wrap_wxHtmlTag_GetAllParams(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlTag_GetAllParams(_arg0)); + _result = new wxString (wxHtmlTag_GetAllParams(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -832,7 +794,7 @@ static PyObject *_wrap_wxHtmlTag_HasEnding(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlTag_HasEnding(_arg0); + _result = (bool )wxHtmlTag_HasEnding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -860,7 +822,7 @@ static PyObject *_wrap_wxHtmlTag_GetBeginPos(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlTag_GetBeginPos(_arg0); + _result = (int )wxHtmlTag_GetBeginPos(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -888,7 +850,7 @@ static PyObject *_wrap_wxHtmlTag_GetEndPos1(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlTag_GetEndPos1(_arg0); + _result = (int )wxHtmlTag_GetEndPos1(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -916,7 +878,7 @@ static PyObject *_wrap_wxHtmlTag_GetEndPos2(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlTag_GetEndPos2(_arg0); + _result = (int )wxHtmlTag_GetEndPos2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -960,7 +922,7 @@ static PyObject *_wrap_wxHtmlParser_SetFS(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_SetFS(_arg0,_arg1); + wxHtmlParser_SetFS(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -989,7 +951,7 @@ static PyObject *_wrap_wxHtmlParser_GetFS(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileSystem *)wxHtmlParser_GetFS(_arg0); + _result = (wxFileSystem *)wxHtmlParser_GetFS(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1018,26 +980,13 @@ static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxObject *)wxHtmlParser_Parse(_arg0,*_arg1); + _result = (wxObject *)wxHtmlParser_Parse(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1069,26 +1018,13 @@ static PyObject *_wrap_wxHtmlParser_InitParser(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_InitParser(_arg0,*_arg1); + wxHtmlParser_InitParser(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1120,7 +1056,7 @@ static PyObject *_wrap_wxHtmlParser_DoneParser(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_DoneParser(_arg0); + wxHtmlParser_DoneParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1150,7 +1086,7 @@ static PyObject *_wrap_wxHtmlParser_DoParsing(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_DoParsing(_arg0,_arg1,_arg2); + wxHtmlParser_DoParsing(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1187,7 +1123,7 @@ static PyObject *_wrap_wxHtmlParser_AddTagHandler(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_AddTagHandler(_arg0,_arg1); + wxHtmlParser_AddTagHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1216,12 +1152,16 @@ static PyObject *_wrap_wxHtmlParser_GetSource(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxHtmlParser_GetSource(_arg0); + _result = (wxString *)wxHtmlParser_GetSource(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1255,26 +1195,13 @@ static PyObject *_wrap_wxHtmlParser_PushTagHandler(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_PushTagHandler(_arg0,_arg1,*_arg2); + wxHtmlParser_PushTagHandler(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1306,7 +1233,7 @@ static PyObject *_wrap_wxHtmlParser_PopTagHandler(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlParser_PopTagHandler(_arg0); + wxHtmlParser_PopTagHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1279,7 @@ static PyObject *_wrap_new_wxHtmlWinParser(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWinParser *)new_wxHtmlWinParser(_arg0); + _result = (wxHtmlWinParser *)new_wxHtmlWinParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1394,7 +1321,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetDC(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetDC(_arg0,_arg1); + wxHtmlWinParser_SetDC(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1423,7 +1350,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetDC(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxHtmlWinParser_GetDC(_arg0); + _result = (wxDC *)wxHtmlWinParser_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1451,7 +1378,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetCharHeight(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetCharHeight(_arg0); + _result = (int )wxHtmlWinParser_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1406,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetCharWidth(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetCharWidth(_arg0); + _result = (int )wxHtmlWinParser_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1507,7 +1434,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWindow *)wxHtmlWinParser_GetWindow(_arg0); + _result = (wxHtmlWindow *)wxHtmlWinParser_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1545,47 +1472,21 @@ static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { _arg3 = _obj3; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1623,7 +1524,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetContainer(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_GetContainer(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_GetContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1658,7 +1559,7 @@ static PyObject *_wrap_wxHtmlWinParser_OpenContainer(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_OpenContainer(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_OpenContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1702,7 +1603,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetContainer(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_SetContainer(_arg0,_arg1); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_SetContainer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1737,7 +1638,7 @@ static PyObject *_wrap_wxHtmlWinParser_CloseContainer(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWinParser_CloseContainer(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWinParser_CloseContainer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1771,7 +1672,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontSize(_arg0); + _result = (int )wxHtmlWinParser_GetFontSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1799,7 +1700,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontSize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontSize(_arg0,_arg1); + wxHtmlWinParser_SetFontSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1828,7 +1729,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontBold(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontBold(_arg0); + _result = (int )wxHtmlWinParser_GetFontBold(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1856,7 +1757,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontBold(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontBold(_arg0,_arg1); + wxHtmlWinParser_SetFontBold(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1885,7 +1786,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontItalic(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontItalic(_arg0); + _result = (int )wxHtmlWinParser_GetFontItalic(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1913,7 +1814,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontItalic(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontItalic(_arg0,_arg1); + wxHtmlWinParser_SetFontItalic(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1942,7 +1843,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontUnderlined(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontUnderlined(_arg0); + _result = (int )wxHtmlWinParser_GetFontUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1970,7 +1871,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontUnderlined(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontUnderlined(_arg0,_arg1); + wxHtmlWinParser_SetFontUnderlined(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1999,7 +1900,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetFontFixed(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetFontFixed(_arg0); + _result = (int )wxHtmlWinParser_GetFontFixed(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2027,7 +1928,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFontFixed(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetFontFixed(_arg0,_arg1); + wxHtmlWinParser_SetFontFixed(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2056,7 +1957,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetAlign(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlWinParser_GetAlign(_arg0); + _result = (int )wxHtmlWinParser_GetAlign(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2084,7 +1985,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetAlign(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetAlign(_arg0,_arg1); + wxHtmlWinParser_SetAlign(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2114,7 +2015,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetLinkColor(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxHtmlWinParser_GetLinkColor(_arg0)); + _result = new wxColour (wxHtmlWinParser_GetLinkColor(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2150,7 +2051,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); + wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2180,7 +2081,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetActualColor(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxHtmlWinParser_GetActualColor(_arg0)); + _result = new wxColour (wxHtmlWinParser_GetActualColor(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2216,7 +2117,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetActualColor(_arg0,*_arg1); + wxHtmlWinParser_SetActualColor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2245,26 +2146,13 @@ static PyObject *_wrap_wxHtmlWinParser_SetLink(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinParser_SetLink(_arg0,*_arg1); + wxHtmlWinParser_SetLink(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2298,7 +2186,7 @@ static PyObject *_wrap_wxHtmlWinParser_CreateCurrentFont(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFont *)wxHtmlWinParser_CreateCurrentFont(_arg0); + _result = (wxFont *)wxHtmlWinParser_CreateCurrentFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2333,7 +2221,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetLink(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxHtmlLinkInfo (wxHtmlWinParser_GetLink(_arg0)); + _result = new wxHtmlLinkInfo (wxHtmlWinParser_GetLink(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2362,7 +2250,7 @@ static PyObject *_wrap_new_wxHtmlTagHandler(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlTagHandler *)new_wxHtmlTagHandler(); + _result = (wxPyHtmlTagHandler *)new_wxHtmlTagHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2405,7 +2293,7 @@ static PyObject *_wrap_wxHtmlTagHandler__setCallbackInfo(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxHtmlTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2442,7 +2330,7 @@ static PyObject *_wrap_wxHtmlTagHandler_SetParser(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlTagHandler_SetParser(_arg0,_arg1); + wxHtmlTagHandler_SetParser(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2472,7 +2360,7 @@ static PyObject *_wrap_wxHtmlTagHandler_GetParser(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlParser *)wxHtmlTagHandler_GetParser(_arg0); + _result = (wxHtmlParser *)wxHtmlTagHandler_GetParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2514,7 +2402,7 @@ static PyObject *_wrap_wxHtmlTagHandler_ParseInner(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlTagHandler_ParseInner(_arg0,*_arg1); + wxHtmlTagHandler_ParseInner(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2551,7 +2439,7 @@ static PyObject *_wrap_new_wxHtmlWinTagHandler(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlWinTagHandler *)new_wxHtmlWinTagHandler(); + _result = (wxPyHtmlWinTagHandler *)new_wxHtmlWinTagHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2594,7 +2482,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler__setCallbackInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); + wxHtmlWinTagHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2631,7 +2519,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_SetParser(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinTagHandler_SetParser(_arg0,_arg1); + wxHtmlWinTagHandler_SetParser(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2661,7 +2549,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_GetParser(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWinParser *)wxHtmlWinTagHandler_GetParser(_arg0); + _result = (wxHtmlWinParser *)wxHtmlWinTagHandler_GetParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2703,7 +2591,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_ParseInner(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWinTagHandler_ParseInner(_arg0,*_arg1); + wxHtmlWinTagHandler_ParseInner(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2732,7 +2620,7 @@ static PyObject *_wrap_new_wxHtmlCell(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)new_wxHtmlCell(); + _result = (wxHtmlCell *)new_wxHtmlCell(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2766,7 +2654,7 @@ static PyObject *_wrap_wxHtmlCell_GetPosX(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetPosX(_arg0); + _result = (int )wxHtmlCell_GetPosX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2794,7 +2682,7 @@ static PyObject *_wrap_wxHtmlCell_GetPosY(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetPosY(_arg0); + _result = (int )wxHtmlCell_GetPosY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2822,7 +2710,7 @@ static PyObject *_wrap_wxHtmlCell_GetWidth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetWidth(_arg0); + _result = (int )wxHtmlCell_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2850,7 +2738,7 @@ static PyObject *_wrap_wxHtmlCell_GetHeight(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetHeight(_arg0); + _result = (int )wxHtmlCell_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2878,7 +2766,7 @@ static PyObject *_wrap_wxHtmlCell_GetDescent(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlCell_GetDescent(_arg0); + _result = (int )wxHtmlCell_GetDescent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +2797,7 @@ static PyObject *_wrap_wxHtmlCell_GetLink(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlLinkInfo *)wxHtmlCell_GetLink(_arg0,_arg1,_arg2); + _result = (wxHtmlLinkInfo *)wxHtmlCell_GetLink(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2944,7 +2832,7 @@ static PyObject *_wrap_wxHtmlCell_GetNext(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlCell_GetNext(_arg0); + _result = (wxHtmlCell *)wxHtmlCell_GetNext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2979,7 +2867,7 @@ static PyObject *_wrap_wxHtmlCell_GetParent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlCell_GetParent(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlCell_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3021,7 +2909,7 @@ static PyObject *_wrap_wxHtmlCell_SetLink(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetLink(_arg0,*_arg1); + wxHtmlCell_SetLink(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3058,7 +2946,7 @@ static PyObject *_wrap_wxHtmlCell_SetNext(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetNext(_arg0,_arg1); + wxHtmlCell_SetNext(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3095,7 +2983,7 @@ static PyObject *_wrap_wxHtmlCell_SetParent(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetParent(_arg0,_arg1); + wxHtmlCell_SetParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3125,7 +3013,7 @@ static PyObject *_wrap_wxHtmlCell_SetPos(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetPos(_arg0,_arg1,_arg2); + wxHtmlCell_SetPos(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3154,7 +3042,7 @@ static PyObject *_wrap_wxHtmlCell_Layout(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_Layout(_arg0,_arg1); + wxHtmlCell_Layout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3195,7 +3083,7 @@ static PyObject *_wrap_wxHtmlCell_Draw(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_Draw(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + wxHtmlCell_Draw(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3234,7 +3122,7 @@ static PyObject *_wrap_wxHtmlCell_DrawInvisible(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_DrawInvisible(_arg0,*_arg1,_arg2,_arg3); + wxHtmlCell_DrawInvisible(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3274,7 +3162,7 @@ static PyObject *_wrap_wxHtmlCell_Find(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlCell_Find(_arg0,_arg1,_arg2); + _result = (wxHtmlCell *)wxHtmlCell_Find(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3317,7 +3205,7 @@ static PyObject *_wrap_wxHtmlCell_AdjustPagebreak(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlCell_AdjustPagebreak(_arg0,_arg1); + _result = (bool )wxHtmlCell_AdjustPagebreak(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3347,7 +3235,7 @@ static PyObject *_wrap_wxHtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlCell_SetCanLiveOnPagebreak(_arg0,_arg1); + wxHtmlCell_SetCanLiveOnPagebreak(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3387,22 +3275,9 @@ static PyObject *_wrap_new_wxHtmlWordCell(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxHtmlWordCell",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -3413,7 +3288,7 @@ static PyObject *_wrap_new_wxHtmlWordCell(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWordCell *)new_wxHtmlWordCell(*_arg0,*_arg1); + _result = (wxHtmlWordCell *)new_wxHtmlWordCell(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3468,7 +3343,7 @@ static PyObject *_wrap_new_wxHtmlContainerCell(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)new_wxHtmlContainerCell(_arg0); + _result = (wxHtmlContainerCell *)new_wxHtmlContainerCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3510,7 +3385,7 @@ static PyObject *_wrap_wxHtmlContainerCell_InsertCell(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_InsertCell(_arg0,_arg1); + wxHtmlContainerCell_InsertCell(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3539,7 +3414,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlignHor(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetAlignHor(_arg0,_arg1); + wxHtmlContainerCell_SetAlignHor(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3568,7 +3443,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetAlignHor(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetAlignHor(_arg0); + _result = (int )wxHtmlContainerCell_GetAlignHor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3596,7 +3471,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlignVer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetAlignVer(_arg0,_arg1); + wxHtmlContainerCell_SetAlignVer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3625,7 +3500,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetAlignVer(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetAlignVer(_arg0); + _result = (int )wxHtmlContainerCell_GetAlignVer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3655,7 +3530,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetIndent(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetIndent(_arg0,_arg1,_arg2,_arg3); + wxHtmlContainerCell_SetIndent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3685,7 +3560,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetIndent(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetIndent(_arg0,_arg1); + _result = (int )wxHtmlContainerCell_GetIndent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3714,7 +3589,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetIndentUnits(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContainerCell_GetIndentUnits(_arg0,_arg1); + _result = (int )wxHtmlContainerCell_GetIndentUnits(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3750,7 +3625,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlign(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetAlign(_arg0,*_arg1); + wxHtmlContainerCell_SetAlign(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3780,7 +3655,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloat(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetWidthFloat(_arg0,_arg1,_arg2); + wxHtmlContainerCell_SetWidthFloat(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3817,7 +3692,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloatFromTag(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetWidthFloatFromTag(_arg0,*_arg1); + wxHtmlContainerCell_SetWidthFloatFromTag(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3847,7 +3722,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetMinHeight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetMinHeight(_arg0,_arg1,_arg2); + wxHtmlContainerCell_SetMinHeight(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3883,7 +3758,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); + wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3927,7 +3802,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); + wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3957,7 +3832,7 @@ static PyObject *_wrap_wxHtmlContainerCell_GetFirstCell(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlCell *)wxHtmlContainerCell_GetFirstCell(_arg0); + _result = (wxHtmlCell *)wxHtmlContainerCell_GetFirstCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4008,7 +3883,7 @@ static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); + _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4059,7 +3934,7 @@ static PyObject *_wrap_new_wxHtmlFontCell(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlFontCell *)new_wxHtmlFontCell(_arg0); + _result = (wxHtmlFontCell *)new_wxHtmlFontCell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4111,7 +3986,7 @@ static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWidgetCell *)new_wxHtmlWidgetCell(_arg0,_arg1); + _result = (wxHtmlWidgetCell *)new_wxHtmlWidgetCell(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4207,7 +4082,7 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlWindow *)new_wxHtmlWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxPyHtmlWindow *)new_wxHtmlWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4233,7 +4108,7 @@ static PyObject *_wrap_new_wxPreHtmlWindow(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow(); + _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4297,7 +4172,7 @@ static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4334,7 +4209,7 @@ static PyObject *_wrap_wxHtmlWindow__setCallbackInfo(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow__setCallbackInfo(_arg0,_arg1,_arg2); + wxHtmlWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4364,26 +4239,13 @@ static PyObject *_wrap_wxHtmlWindow_SetPage(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_SetPage(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_SetPage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4416,26 +4278,13 @@ static PyObject *_wrap_wxHtmlWindow_LoadPage(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_LoadPage(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_LoadPage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4468,26 +4317,13 @@ static PyObject *_wrap_wxHtmlWindow_AppendToPage(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_AppendToPage(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_AppendToPage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4519,12 +4355,16 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPage(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlWindow_GetOpenedPage(_arg0)); + _result = new wxString (wxHtmlWindow_GetOpenedPage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4552,12 +4392,16 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedAnchor(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlWindow_GetOpenedAnchor(_arg0)); + _result = new wxString (wxHtmlWindow_GetOpenedAnchor(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4585,12 +4429,16 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPageTitle(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlWindow_GetOpenedPageTitle(_arg0)); + _result = new wxString (wxHtmlWindow_GetOpenedPageTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4627,7 +4475,7 @@ static PyObject *_wrap_wxHtmlWindow_SetRelatedFrame(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetRelatedFrame(_arg0,_arg1,_arg2); + wxHtmlWindow_SetRelatedFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4656,7 +4504,7 @@ static PyObject *_wrap_wxHtmlWindow_GetRelatedFrame(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxHtmlWindow_GetRelatedFrame(_arg0); + _result = (wxFrame *)wxHtmlWindow_GetRelatedFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4684,7 +4532,7 @@ static PyObject *_wrap_wxHtmlWindow_SetRelatedStatusBar(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetRelatedStatusBar(_arg0,_arg1); + wxHtmlWindow_SetRelatedStatusBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4723,47 +4571,21 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { _arg3 = _obj3; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4800,26 +4622,13 @@ static PyObject *_wrap_wxHtmlWindow_SetTitle(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetTitle(_arg0,*_arg1); + wxHtmlWindow_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4852,7 +4661,7 @@ static PyObject *_wrap_wxHtmlWindow_SetBorders(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_SetBorders(_arg0,_arg1); + wxHtmlWindow_SetBorders(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4891,26 +4700,13 @@ static PyObject *_wrap_wxHtmlWindow_ReadCustomization(PyObject *self, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_ReadCustomization(_arg0,_arg1,*_arg2); + wxHtmlWindow_ReadCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4953,26 +4749,13 @@ static PyObject *_wrap_wxHtmlWindow_WriteCustomization(PyObject *self, PyObject } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_WriteCustomization(_arg0,_arg1,*_arg2); + wxHtmlWindow_WriteCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5005,7 +4788,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryBack(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryBack(_arg0); + _result = (bool )wxHtmlWindow_HistoryBack(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5033,7 +4816,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryForward(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryForward(_arg0); + _result = (bool )wxHtmlWindow_HistoryForward(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5061,7 +4844,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryCanBack(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryCanBack(_arg0); + _result = (bool )wxHtmlWindow_HistoryCanBack(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5089,7 +4872,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryCanForward(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HistoryCanForward(_arg0); + _result = (bool )wxHtmlWindow_HistoryCanForward(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5116,7 +4899,7 @@ static PyObject *_wrap_wxHtmlWindow_HistoryClear(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_HistoryClear(_arg0); + wxHtmlWindow_HistoryClear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5146,7 +4929,7 @@ static PyObject *_wrap_wxHtmlWindow_GetInternalRepresentation(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContainerCell *)wxHtmlWindow_GetInternalRepresentation(_arg0); + _result = (wxHtmlContainerCell *)wxHtmlWindow_GetInternalRepresentation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5181,7 +4964,7 @@ static PyObject *_wrap_wxHtmlWindow_GetParser(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlWinParser *)wxHtmlWindow_GetParser(_arg0); + _result = (wxHtmlWinParser *)wxHtmlWindow_GetParser(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5216,26 +4999,13 @@ static PyObject *_wrap_wxHtmlWindow_ScrollToAnchor(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_ScrollToAnchor(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_ScrollToAnchor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5268,26 +5038,13 @@ static PyObject *_wrap_wxHtmlWindow_HasAnchor(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlWindow_HasAnchor(_arg0,*_arg1); + _result = (bool )wxHtmlWindow_HasAnchor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5327,7 +5084,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnLinkClicked(_arg0,*_arg1); + wxHtmlWindow_base_OnLinkClicked(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5356,7 +5113,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnSetTitle(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnSetTitle(_arg0,_arg1); + wxHtmlWindow_base_OnSetTitle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5395,7 +5152,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnCellMouseHover(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnCellMouseHover(_arg0,_arg1,_arg2,_arg3); + wxHtmlWindow_base_OnCellMouseHover(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5443,7 +5200,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnCellClicked(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_base_OnCellClicked(_arg0,_arg1,_arg2,_arg3,*_arg4); + wxHtmlWindow_base_OnCellClicked(_arg0,_arg1,_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5472,7 +5229,7 @@ static PyObject *_wrap_new_wxHtmlDCRenderer(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlDCRenderer *)new_wxHtmlDCRenderer(); + _result = (wxHtmlDCRenderer *)new_wxHtmlDCRenderer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5505,7 +5262,7 @@ static PyObject *_wrap_delete_wxHtmlDCRenderer(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlDCRenderer(_arg0); + delete_wxHtmlDCRenderer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5543,7 +5300,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetDC(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlDCRenderer_SetDC(_arg0,_arg1,_arg2); + wxHtmlDCRenderer_SetDC(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5573,7 +5330,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlDCRenderer_SetSize(_arg0,_arg1,_arg2); + wxHtmlDCRenderer_SetSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5606,46 +5363,20 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlDCRenderer_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); + wxHtmlDCRenderer_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5686,7 +5417,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_Render(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5714,7 +5445,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_GetTotalHeight(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlDCRenderer_GetTotalHeight(_arg0); + _result = (int )wxHtmlDCRenderer_GetTotalHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5751,7 +5482,7 @@ static PyObject *_wrap_new_wxHtmlPrintout(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlPrintout *)new_wxHtmlPrintout(_arg0); + _result = (wxHtmlPrintout *)new_wxHtmlPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5789,46 +5520,20 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlText(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); + wxHtmlPrintout_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5865,26 +5570,13 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlFile(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetHtmlFile(_arg0,*_arg1); + wxHtmlPrintout_SetHtmlFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5918,26 +5610,13 @@ static PyObject *_wrap_wxHtmlPrintout_SetHeader(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetHeader(_arg0,*_arg1,_arg2); + wxHtmlPrintout_SetHeader(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5971,26 +5650,13 @@ static PyObject *_wrap_wxHtmlPrintout_SetFooter(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetFooter(_arg0,*_arg1,_arg2); + wxHtmlPrintout_SetFooter(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6027,7 +5693,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlPrintout_SetMargins(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxHtmlPrintout_SetMargins(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6066,7 +5732,7 @@ static PyObject *_wrap_new_wxHtmlEasyPrinting(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlEasyPrinting *)new_wxHtmlEasyPrinting(_arg0,_arg1); + _result = (wxHtmlEasyPrinting *)new_wxHtmlEasyPrinting(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6099,7 +5765,7 @@ static PyObject *_wrap_delete_wxHtmlEasyPrinting(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlEasyPrinting(_arg0); + delete_wxHtmlEasyPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6128,26 +5794,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewFile(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PreviewFile(_arg0,*_arg1); + wxHtmlEasyPrinting_PreviewFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6182,45 +5835,19 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewText(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PreviewText(_arg0,*_arg1,*_arg2); + wxHtmlEasyPrinting_PreviewText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6257,26 +5884,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintFile(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PrintFile(_arg0,*_arg1); + wxHtmlEasyPrinting_PrintFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6311,45 +5925,19 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintText(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PrintText(_arg0,*_arg1,*_arg2); + wxHtmlEasyPrinting_PrintText(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6385,7 +5973,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrinterSetup(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PrinterSetup(_arg0); + wxHtmlEasyPrinting_PrinterSetup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6413,7 +6001,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PageSetup(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_PageSetup(_arg0); + wxHtmlEasyPrinting_PageSetup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6443,26 +6031,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetHeader(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_SetHeader(_arg0,*_arg1,_arg2); + wxHtmlEasyPrinting_SetHeader(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6496,26 +6071,13 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetFooter(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlEasyPrinting_SetFooter(_arg0,*_arg1,_arg2); + wxHtmlEasyPrinting_SetFooter(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6549,7 +6111,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_GetPrintData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxHtmlEasyPrinting_GetPrintData(_arg0); + _result = (wxPrintData *)wxHtmlEasyPrinting_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6584,7 +6146,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_GetPageSetupData(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialogData *)wxHtmlEasyPrinting_GetPageSetupData(_arg0); + _result = (wxPageSetupDialogData *)wxHtmlEasyPrinting_GetPageSetupData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/htmlhelp.cpp b/wxPython/src/msw/htmlhelp.cpp index 2d46e29bab..2f981d5b21 100644 --- a/wxPython/src/msw/htmlhelp.cpp +++ b/wxPython/src/msw/htmlhelp.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -125,80 +119,28 @@ static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:new_wxHtmlBookRecord",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlBookRecord *)new_wxHtmlBookRecord(*_arg0,*_arg1,*_arg2,*_arg3); + _result = (wxHtmlBookRecord *)new_wxHtmlBookRecord(*_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -248,12 +190,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBookFile(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetBookFile(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetBookFile(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -281,12 +227,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetTitle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetTitle(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -314,12 +264,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetStart(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetStart(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetStart(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -347,12 +301,16 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBasePath(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetBasePath(_arg0)); + _result = new wxString (wxHtmlBookRecord_GetBasePath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -381,7 +339,7 @@ static PyObject *_wrap_wxHtmlBookRecord_SetContentsRange(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetContentsRange(_arg0,_arg1,_arg2); + wxHtmlBookRecord_SetContentsRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -410,7 +368,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetContentsStart(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlBookRecord_GetContentsStart(_arg0); + _result = (int )wxHtmlBookRecord_GetContentsStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -438,7 +396,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetContentsEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlBookRecord_GetContentsEnd(_arg0); + _result = (int )wxHtmlBookRecord_GetContentsEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -466,26 +424,13 @@ static PyObject *_wrap_wxHtmlBookRecord_SetTitle(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetTitle(_arg0,*_arg1); + wxHtmlBookRecord_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -518,26 +463,13 @@ static PyObject *_wrap_wxHtmlBookRecord_SetBasePath(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetBasePath(_arg0,*_arg1); + wxHtmlBookRecord_SetBasePath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -570,26 +502,13 @@ static PyObject *_wrap_wxHtmlBookRecord_SetStart(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlBookRecord_SetStart(_arg0,*_arg1); + wxHtmlBookRecord_SetStart(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -623,31 +542,22 @@ static PyObject *_wrap_wxHtmlBookRecord_GetFullPath(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlBookRecord_GetFullPath(_arg0,*_arg1)); + _result = new wxString (wxHtmlBookRecord_GetFullPath(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -659,35 +569,6 @@ static PyObject *_wrap_wxHtmlBookRecord_GetFullPath(PyObject *self, PyObject *ar return _resultobj; } -#define wxHtmlContentsItem_m_Level_set(_swigobj,_swigval) (_swigobj->m_Level = _swigval,_swigval) -static PyObject *_wrap_wxHtmlContentsItem_m_Level_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - short _result; - wxHtmlContentsItem * _arg0; - short _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_Level", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxHtmlContentsItem_m_Level_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Level_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (short )wxHtmlContentsItem_m_Level_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("h",_result); - return _resultobj; -} - #define wxHtmlContentsItem_m_Level_get(_swigobj) ((short ) _swigobj->m_Level) static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -708,7 +589,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (short )wxHtmlContentsItem_m_Level_get(_arg0); + _result = (short )wxHtmlContentsItem_m_Level_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -716,35 +597,6 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject * return _resultobj; } -#define wxHtmlContentsItem_m_ID_set(_swigobj,_swigval) (_swigobj->m_ID = _swigval,_swigval) -static PyObject *_wrap_wxHtmlContentsItem_m_ID_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxHtmlContentsItem * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_ID", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContentsItem_m_ID_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_ID_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContentsItem_m_ID_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxHtmlContentsItem_m_ID_get(_swigobj) ((int ) _swigobj->m_ID) static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -765,7 +617,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlContentsItem_m_ID_get(_arg0); + _result = (int )wxHtmlContentsItem_m_ID_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -773,44 +625,10 @@ static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *arg return _resultobj; } -static char * wxHtmlContentsItem_m_Name_set(wxHtmlContentsItem *obj, char *val) { - if (obj->m_Name) delete [] obj->m_Name; - obj->m_Name = new char[strlen(val)+1]; - strcpy((char *)obj->m_Name,val); - return (char *) val; -} -static PyObject *_wrap_wxHtmlContentsItem_m_Name_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char * _result; - wxHtmlContentsItem * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_Name", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlContentsItem_m_Name_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Name_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Name_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -#define wxHtmlContentsItem_m_Name_get(_swigobj) ((char *) _swigobj->m_Name) +#define wxHtmlContentsItem_m_Name_get(_swigobj) ((wxChar *) _swigobj->m_Name) static PyObject *_wrap_wxHtmlContentsItem_m_Name_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxChar * _result; wxHtmlContentsItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -827,41 +645,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Name_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Name_get(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static char * wxHtmlContentsItem_m_Page_set(wxHtmlContentsItem *obj, char *val) { - if (obj->m_Page) delete [] obj->m_Page; - obj->m_Page = new char[strlen(val)+1]; - strcpy((char *)obj->m_Page,val); - return (char *) val; -} -static PyObject *_wrap_wxHtmlContentsItem_m_Page_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char * _result; - wxHtmlContentsItem * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_Page", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlContentsItem_m_Page_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Page_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Page_set(_arg0,_arg1); + _result = (wxChar *)wxHtmlContentsItem_m_Name_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -869,10 +653,10 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Page_set(PyObject *self, PyObject *a return _resultobj; } -#define wxHtmlContentsItem_m_Page_get(_swigobj) ((char *) _swigobj->m_Page) +#define wxHtmlContentsItem_m_Page_get(_swigobj) ((wxChar *) _swigobj->m_Page) static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxChar * _result; wxHtmlContentsItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -889,7 +673,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxHtmlContentsItem_m_Page_get(_arg0); + _result = (wxChar *)wxHtmlContentsItem_m_Page_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -897,50 +681,6 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *a return _resultobj; } -#define wxHtmlContentsItem_m_Book_set(_swigobj,_swigval) (_swigobj->m_Book = _swigval,_swigval) -static PyObject *_wrap_wxHtmlContentsItem_m_Book_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxHtmlBookRecord * _result; - wxHtmlContentsItem * _arg0; - wxHtmlBookRecord * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","m_Book", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContentsItem_m_Book_set",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Book_set. Expected _wxHtmlContentsItem_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlBookRecord_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContentsItem_m_Book_set. Expected _wxHtmlBookRecord_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_set(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlBookRecord_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - #define wxHtmlContentsItem_m_Book_get(_swigobj) ((wxHtmlBookRecord *) _swigobj->m_Book) static PyObject *_wrap_wxHtmlContentsItem_m_Book_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -962,7 +702,7 @@ static PyObject *_wrap_wxHtmlContentsItem_m_Book_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_get(_arg0); + _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -996,7 +736,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_Search(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlSearchStatus_Search(_arg0); + _result = (bool )wxHtmlSearchStatus_Search(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1024,7 +764,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_IsActive(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlSearchStatus_IsActive(_arg0); + _result = (bool )wxHtmlSearchStatus_IsActive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1052,7 +792,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetCurIndex(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlSearchStatus_GetCurIndex(_arg0); + _result = (int )wxHtmlSearchStatus_GetCurIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1080,7 +820,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetMaxIndex(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlSearchStatus_GetMaxIndex(_arg0); + _result = (int )wxHtmlSearchStatus_GetMaxIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1108,13 +848,17 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxHtmlSearchStatus_GetName(_arg0); + const wxString & _result_ref = wxHtmlSearchStatus_GetName(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -1140,7 +884,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetContentsItem(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContentsItem *)wxHtmlSearchStatus_GetContentsItem(_arg0); + _result = (wxHtmlContentsItem *)wxHtmlSearchStatus_GetContentsItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1166,7 +910,7 @@ static PyObject *_wrap_new_wxHtmlHelpData(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpData *)new_wxHtmlHelpData(); + _result = (wxHtmlHelpData *)new_wxHtmlHelpData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1199,7 +943,7 @@ static PyObject *_wrap_delete_wxHtmlHelpData(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlHelpData(_arg0); + delete_wxHtmlHelpData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1228,26 +972,13 @@ static PyObject *_wrap_wxHtmlHelpData_SetTempDir(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpData_SetTempDir(_arg0,*_arg1); + wxHtmlHelpData_SetTempDir(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1281,26 +1012,13 @@ static PyObject *_wrap_wxHtmlHelpData_AddBook(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpData_AddBook(_arg0,*_arg1); + _result = (bool )wxHtmlHelpData_AddBook(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1333,31 +1051,22 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlHelpData_FindPageByName(_arg0,*_arg1)); + _result = new wxString (wxHtmlHelpData_FindPageByName(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1390,12 +1099,16 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageById(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxHtmlHelpData_FindPageById(_arg0,_arg1)); + _result = new wxString (wxHtmlHelpData_FindPageById(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1424,7 +1137,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetBookRecArray(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxHtmlBookRecArray & _result_ref = wxHtmlHelpData_GetBookRecArray(_arg0); + const wxHtmlBookRecArray & _result_ref = wxHtmlHelpData_GetBookRecArray(_arg0); _result = (wxHtmlBookRecArray *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1460,7 +1173,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetContents(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetContents(_arg0); + _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetContents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1494,7 +1207,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetContentsCnt(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlHelpData_GetContentsCnt(_arg0); + _result = (int )wxHtmlHelpData_GetContentsCnt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1523,7 +1236,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetIndex(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetIndex(_arg0); + _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1557,7 +1270,7 @@ static PyObject *_wrap_wxHtmlHelpData_GetIndexCnt(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlHelpData_GetIndexCnt(_arg0); + _result = (int )wxHtmlHelpData_GetIndexCnt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1632,22 +1345,9 @@ static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObj } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -1658,7 +1358,7 @@ static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpFrame *)new_wxHtmlHelpFrame(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (wxHtmlHelpFrame *)new_wxHtmlHelpFrame(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1697,7 +1397,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_GetData(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpData *)wxHtmlHelpFrame_GetData(_arg0); + _result = (wxHtmlHelpData *)wxHtmlHelpFrame_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1731,26 +1431,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_SetTitleFormat(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_SetTitleFormat(_arg0,*_arg1); + wxHtmlHelpFrame_SetTitleFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1783,26 +1470,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_Display(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_Display(_arg0,*_arg1); + wxHtmlHelpFrame_Display(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1835,7 +1509,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_DisplayID(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_DisplayID(_arg0,_arg1); + wxHtmlHelpFrame_DisplayID(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1863,7 +1537,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_DisplayContents(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_DisplayContents(_arg0); + wxHtmlHelpFrame_DisplayContents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1891,7 +1565,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_DisplayIndex(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_DisplayIndex(_arg0); + wxHtmlHelpFrame_DisplayIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1921,26 +1595,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_KeywordSearch(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpFrame_KeywordSearch(_arg0,*_arg1); + _result = (bool )wxHtmlHelpFrame_KeywordSearch(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1982,26 +1643,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_UseConfig(PyObject *self, PyObject *args, } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_UseConfig(_arg0,_arg1,*_arg2); + wxHtmlHelpFrame_UseConfig(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2044,26 +1692,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_ReadCustomization(PyObject *self, PyObjec } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_ReadCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpFrame_ReadCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2106,26 +1741,13 @@ static PyObject *_wrap_wxHtmlHelpFrame_WriteCustomization(PyObject *self, PyObje } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpFrame_WriteCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpFrame_WriteCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2167,7 +1789,7 @@ static PyObject *_wrap_new_wxHtmlHelpController(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpController *)new_wxHtmlHelpController(_arg0); + _result = (wxHtmlHelpController *)new_wxHtmlHelpController(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2200,7 +1822,7 @@ static PyObject *_wrap_delete_wxHtmlHelpController(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxHtmlHelpController(_arg0); + delete_wxHtmlHelpController(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2229,26 +1851,13 @@ static PyObject *_wrap_wxHtmlHelpController_SetTitleFormat(PyObject *self, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_SetTitleFormat(_arg0,*_arg1); + wxHtmlHelpController_SetTitleFormat(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2281,26 +1890,13 @@ static PyObject *_wrap_wxHtmlHelpController_SetTempDir(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_SetTempDir(_arg0,*_arg1); + wxHtmlHelpController_SetTempDir(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2335,26 +1931,13 @@ static PyObject *_wrap_wxHtmlHelpController_AddBook(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpController_AddBook(_arg0,*_arg1,_arg2); + _result = (bool )wxHtmlHelpController_AddBook(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2386,26 +1969,13 @@ static PyObject *_wrap_wxHtmlHelpController_Display(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_Display(_arg0,*_arg1); + wxHtmlHelpController_Display(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2438,7 +2008,7 @@ static PyObject *_wrap_wxHtmlHelpController_DisplayID(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_DisplayID(_arg0,_arg1); + wxHtmlHelpController_DisplayID(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2466,7 +2036,7 @@ static PyObject *_wrap_wxHtmlHelpController_DisplayContents(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_DisplayContents(_arg0); + wxHtmlHelpController_DisplayContents(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2494,7 +2064,7 @@ static PyObject *_wrap_wxHtmlHelpController_DisplayIndex(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_DisplayIndex(_arg0); + wxHtmlHelpController_DisplayIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2524,26 +2094,13 @@ static PyObject *_wrap_wxHtmlHelpController_KeywordSearch(PyObject *self, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlHelpController_KeywordSearch(_arg0,*_arg1); + _result = (bool )wxHtmlHelpController_KeywordSearch(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2585,26 +2142,13 @@ static PyObject *_wrap_wxHtmlHelpController_UseConfig(PyObject *self, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_UseConfig(_arg0,_arg1,*_arg2); + wxHtmlHelpController_UseConfig(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2647,26 +2191,13 @@ static PyObject *_wrap_wxHtmlHelpController_ReadCustomization(PyObject *self, Py } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_ReadCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpController_ReadCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2709,26 +2240,13 @@ static PyObject *_wrap_wxHtmlHelpController_WriteCustomization(PyObject *self, P } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlHelpController_WriteCustomization(_arg0,_arg1,*_arg2); + wxHtmlHelpController_WriteCustomization(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2762,7 +2280,7 @@ static PyObject *_wrap_wxHtmlHelpController_GetFrame(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHtmlHelpFrame *)wxHtmlHelpController_GetFrame(_arg0); + _result = (wxHtmlHelpFrame *)wxHtmlHelpController_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2820,15 +2338,10 @@ static PyMethodDef htmlhelpcMethods[] = { { "wxHtmlSearchStatus_IsActive", (PyCFunction) _wrap_wxHtmlSearchStatus_IsActive, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlSearchStatus_Search", (PyCFunction) _wrap_wxHtmlSearchStatus_Search, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Book_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Book_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Book_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Book_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Page_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Page_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Page_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Page_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Name_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Name_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Name_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Name_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_ID_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_ID_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_ID_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_ID_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContentsItem_m_Level_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Level_get, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlContentsItem_m_Level_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Level_set, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlBookRecord_GetFullPath", (PyCFunction) _wrap_wxHtmlBookRecord_GetFullPath, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlBookRecord_SetStart", (PyCFunction) _wrap_wxHtmlBookRecord_SetStart, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlBookRecord_SetBasePath", (PyCFunction) _wrap_wxHtmlBookRecord_SetBasePath, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index c06f752f68..c36af8933e 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - wxImage* wxEmptyImage(int width=0, int height=0) { if (width == 0 && height == 0) return new wxImage; @@ -158,7 +152,7 @@ static PyObject *_wrap_wxEmptyImage(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxEmptyImage(_arg0,_arg1); + _result = (wxImage *)wxEmptyImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -187,44 +181,18 @@ static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxImageFromMime",_kwnames,&_obj0,&_obj1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromMime(*_arg0,*_arg1,_arg2); + _result = (wxImage *)wxImageFromMime(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -266,7 +234,7 @@ static PyObject *_wrap_wxImageFromBitmap(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromBitmap(*_arg0); + _result = (wxImage *)wxImageFromBitmap(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -302,7 +270,7 @@ static PyObject *_wrap_wxImageFromData(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromData(_arg0,_arg1,_arg2); + _result = (wxImage *)wxImageFromData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -346,7 +314,7 @@ static PyObject *_wrap_wxImageFromStream(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromStream(*_arg0,_arg1,_arg2); + _result = (wxImage *)wxImageFromStream(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -394,26 +362,13 @@ static PyObject *_wrap_wxImageFromStreamMime(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxImageFromStreamMime(*_arg0,*_arg1,_arg2); + _result = (wxImage *)wxImageFromStreamMime(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -444,7 +399,7 @@ static PyObject *_wrap_wxInitAllImageHandlers(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInitAllImageHandlers(); + wxInitAllImageHandlers(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -489,7 +444,7 @@ static PyObject *_wrap_wxBitmapFromImage(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmap *)wxBitmapFromImage(*_arg0,_arg1); + _result = (wxBitmap *)wxBitmapFromImage(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,12 +486,16 @@ static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImageHandler_GetName(_arg0)); + _result = new wxString (wxImageHandler_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -564,12 +523,16 @@ static PyObject *_wrap_wxImageHandler_GetExtension(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImageHandler_GetExtension(_arg0)); + _result = new wxString (wxImageHandler_GetExtension(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -597,7 +560,7 @@ static PyObject *_wrap_wxImageHandler_GetType(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxImageHandler_GetType(_arg0); + _result = (long )wxImageHandler_GetType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -625,12 +588,16 @@ static PyObject *_wrap_wxImageHandler_GetMimeType(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImageHandler_GetMimeType(_arg0)); + _result = new wxString (wxImageHandler_GetMimeType(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -659,26 +626,13 @@ static PyObject *_wrap_wxImageHandler_CanRead(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImageHandler_CanRead(_arg0,*_arg1); + _result = (bool )wxImageHandler_CanRead(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -710,26 +664,13 @@ static PyObject *_wrap_wxImageHandler_SetName(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetName(_arg0,*_arg1); + wxImageHandler_SetName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -762,26 +703,13 @@ static PyObject *_wrap_wxImageHandler_SetExtension(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetExtension(_arg0,*_arg1); + wxImageHandler_SetExtension(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -814,7 +742,7 @@ static PyObject *_wrap_wxImageHandler_SetType(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetType(_arg0,_arg1); + wxImageHandler_SetType(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -843,26 +771,13 @@ static PyObject *_wrap_wxImageHandler_SetMimeType(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImageHandler_SetMimeType(_arg0,*_arg1); + wxImageHandler_SetMimeType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -903,7 +818,7 @@ static PyObject *_wrap_new_wxPNGHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPNGHandler *)new_wxPNGHandler(); + _result = (wxPNGHandler *)new_wxPNGHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -945,7 +860,7 @@ static PyObject *_wrap_new_wxJPEGHandler(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxJPEGHandler *)new_wxJPEGHandler(); + _result = (wxJPEGHandler *)new_wxJPEGHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -987,7 +902,7 @@ static PyObject *_wrap_new_wxBMPHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBMPHandler *)new_wxBMPHandler(); + _result = (wxBMPHandler *)new_wxBMPHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1037,7 +952,7 @@ static PyObject *_wrap_new_wxICOHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxICOHandler *)new_wxICOHandler(); + _result = (wxICOHandler *)new_wxICOHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1095,7 +1010,7 @@ static PyObject *_wrap_new_wxCURHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCURHandler *)new_wxCURHandler(); + _result = (wxCURHandler *)new_wxCURHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1161,7 +1076,7 @@ static PyObject *_wrap_new_wxANIHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxANIHandler *)new_wxANIHandler(); + _result = (wxANIHandler *)new_wxANIHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1203,7 +1118,7 @@ static PyObject *_wrap_new_wxGIFHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGIFHandler *)new_wxGIFHandler(); + _result = (wxGIFHandler *)new_wxGIFHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1245,7 +1160,7 @@ static PyObject *_wrap_new_wxPNMHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPNMHandler *)new_wxPNMHandler(); + _result = (wxPNMHandler *)new_wxPNMHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,7 +1202,7 @@ static PyObject *_wrap_new_wxPCXHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPCXHandler *)new_wxPCXHandler(); + _result = (wxPCXHandler *)new_wxPCXHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1329,7 +1244,7 @@ static PyObject *_wrap_new_wxTIFFHandler(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTIFFHandler *)new_wxTIFFHandler(); + _result = (wxTIFFHandler *)new_wxTIFFHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1366,26 +1281,13 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|li:new_wxImage",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)new_wxImage(*_arg0,_arg1,_arg2); + _result = (wxImage *)new_wxImage(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1422,7 +1324,7 @@ static PyObject *_wrap_delete_wxImage(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxImage(_arg0); + delete_wxImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1452,7 +1354,7 @@ static PyObject *_wrap_wxImage_ConvertToBitmap(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxImage_ConvertToBitmap(_arg0)); + _result = new wxBitmap (wxImage_ConvertToBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1482,7 +1384,7 @@ static PyObject *_wrap_wxImage_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Create(_arg0,_arg1,_arg2); + wxImage_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1510,7 +1412,7 @@ static PyObject *_wrap_wxImage_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Destroy(_arg0); + wxImage_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1542,7 +1444,7 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Scale(_arg0,_arg1,_arg2)); + _result = new wxImage (wxImage_Scale(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1574,7 +1476,7 @@ static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2); + wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2); _result = (wxImage *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1613,7 +1515,7 @@ static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetRGB(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxImage_SetRGB(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1644,7 +1546,7 @@ static PyObject *_wrap_wxImage_GetRed(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetRed(_arg0,_arg1,_arg2); + _result = (unsigned char )wxImage_GetRed(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1674,7 +1576,7 @@ static PyObject *_wrap_wxImage_GetGreen(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetGreen(_arg0,_arg1,_arg2); + _result = (unsigned char )wxImage_GetGreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1704,7 +1606,7 @@ static PyObject *_wrap_wxImage_GetBlue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetBlue(_arg0,_arg1,_arg2); + _result = (unsigned char )wxImage_GetBlue(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1723,26 +1625,13 @@ static PyObject *_wrap_wxImage_CanRead(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_CanRead",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage::CanRead(*_arg0); + _result = (bool )wxImage::CanRead(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1766,26 +1655,13 @@ static PyObject *_wrap_wxImage_GetImageCount(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxImage_GetImageCount",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage::GetImageCount(*_arg0,_arg1); + _result = (int )wxImage::GetImageCount(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1820,26 +1696,13 @@ static PyObject *_wrap_wxImage_LoadFile(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadFile(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxImage_LoadFile(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1875,44 +1738,18 @@ static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadMimeFile(_arg0,*_arg1,*_arg2,_arg3); + _result = (bool )wxImage_LoadMimeFile(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1950,26 +1787,13 @@ static PyObject *_wrap_wxImage_SaveFile(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_SaveFile(_arg0,*_arg1,_arg2); + _result = (bool )wxImage_SaveFile(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2004,44 +1828,18 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_SaveMimeFile(_arg0,*_arg1,*_arg2); + _result = (bool )wxImage_SaveMimeFile(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2084,7 +1882,7 @@ static PyObject *_wrap_wxImage_CanReadStream(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage::CanRead(*_arg0); + _result = (bool )wxImage::CanRead(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2135,7 +1933,7 @@ static PyObject *_wrap_wxImage_LoadStream(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadStream(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxImage_LoadStream(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2186,26 +1984,13 @@ static PyObject *_wrap_wxImage_LoadMimeStream(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_LoadMimeStream(_arg0,*_arg1,*_arg2,_arg3); + _result = (bool )wxImage_LoadMimeStream(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2241,7 +2026,7 @@ static PyObject *_wrap_wxImage_Ok(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_Ok(_arg0); + _result = (bool )wxImage_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2269,7 +2054,7 @@ static PyObject *_wrap_wxImage_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage_GetWidth(_arg0); + _result = (int )wxImage_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2297,7 +2082,7 @@ static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage_GetHeight(_arg0); + _result = (int )wxImage_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2334,7 +2119,7 @@ static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1)); + _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2364,7 +2149,7 @@ static PyObject *_wrap_wxImage_Copy(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Copy(_arg0)); + _result = new wxImage (wxImage_Copy(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2403,7 +2188,7 @@ static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Paste(_arg0,*_arg1,_arg2,_arg3); + wxImage_Paste(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2436,7 +2221,7 @@ static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxImage_GetData(_arg0); + _result = (PyObject *)wxImage_GetData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2482,7 +2267,7 @@ static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetData(_arg0,_arg1); + wxImage_SetData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2513,7 +2298,7 @@ static PyObject *_wrap_wxImage_SetMaskColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetMaskColour(_arg0,_arg1,_arg2,_arg3); + wxImage_SetMaskColour(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2542,7 +2327,7 @@ static PyObject *_wrap_wxImage_GetMaskRed(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetMaskRed(_arg0); + _result = (unsigned char )wxImage_GetMaskRed(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2570,7 +2355,7 @@ static PyObject *_wrap_wxImage_GetMaskGreen(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetMaskGreen(_arg0); + _result = (unsigned char )wxImage_GetMaskGreen(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2598,7 +2383,7 @@ static PyObject *_wrap_wxImage_GetMaskBlue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned char )wxImage_GetMaskBlue(_arg0); + _result = (unsigned char )wxImage_GetMaskBlue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2628,7 +2413,7 @@ static PyObject *_wrap_wxImage_SetMask(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetMask(_arg0,_arg1); + wxImage_SetMask(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2657,7 +2442,7 @@ static PyObject *_wrap_wxImage_HasMask(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_HasMask(_arg0); + _result = (bool )wxImage_HasMask(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2707,7 +2492,7 @@ static PyObject *_wrap_wxImage_Rotate(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4)); + _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2740,7 +2525,7 @@ static PyObject *_wrap_wxImage_Rotate90(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Rotate90(_arg0,_arg1)); + _result = new wxImage (wxImage_Rotate90(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2773,7 +2558,7 @@ static PyObject *_wrap_wxImage_Mirror(PyObject *self, PyObject *args, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_Mirror(_arg0,_arg1)); + _result = new wxImage (wxImage_Mirror(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2807,7 +2592,7 @@ static PyObject *_wrap_wxImage_Replace(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2840,7 +2625,7 @@ static PyObject *_wrap_wxImage_ConvertToMono(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxImage (wxImage_ConvertToMono(_arg0,_arg1,_arg2,_arg3)); + _result = new wxImage (wxImage_ConvertToMono(_arg0,_arg1,_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2871,44 +2656,18 @@ static PyObject *_wrap_wxImage_SetOption(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetOption(_arg0,*_arg1,*_arg2); + wxImage_SetOption(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2946,26 +2705,13 @@ static PyObject *_wrap_wxImage_SetOptionInt(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage_SetOptionInt(_arg0,*_arg1,_arg2); + wxImage_SetOptionInt(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2999,31 +2745,22 @@ static PyObject *_wrap_wxImage_GetOption(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxImage_GetOption(_arg0,*_arg1)); + _result = new wxString (wxImage_GetOption(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -3056,26 +2793,13 @@ static PyObject *_wrap_wxImage_GetOptionInt(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxImage_GetOptionInt(_arg0,*_arg1); + _result = (int )wxImage_GetOptionInt(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3108,26 +2832,13 @@ static PyObject *_wrap_wxImage_HasOption(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage_HasOption(_arg0,*_arg1); + _result = (bool )wxImage_HasOption(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3160,7 +2871,7 @@ static PyObject *_wrap_wxImage_CountColours(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned long )wxImage_CountColours(_arg0,_arg1); + _result = (unsigned long )wxImage_CountColours(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3186,7 +2897,7 @@ static PyObject *_wrap_wxImage_AddHandler(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage::AddHandler(_arg0); + wxImage::AddHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3213,7 +2924,7 @@ static PyObject *_wrap_wxImage_InsertHandler(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxImage::InsertHandler(_arg0); + wxImage::InsertHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3233,26 +2944,13 @@ static PyObject *_wrap_wxImage_RemoveHandler(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_RemoveHandler",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxImage::RemoveHandler(*_arg0); + _result = (bool )wxImage::RemoveHandler(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index 39f5de2f84..af583b19e7 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -83,12 +83,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -163,22 +157,9 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -194,7 +175,7 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIParentFrame *)new_wxMDIParentFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxMDIParentFrame *)new_wxMDIParentFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -224,7 +205,7 @@ static PyObject *_wrap_new_wxPreMDIParentFrame(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIParentFrame *)new_wxPreMDIParentFrame(); + _result = (wxMDIParentFrame *)new_wxPreMDIParentFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -277,22 +258,9 @@ static PyObject *_wrap_wxMDIParentFrame_Create(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -308,7 +276,7 @@ static PyObject *_wrap_wxMDIParentFrame_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMDIParentFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxMDIParentFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -339,7 +307,7 @@ static PyObject *_wrap_wxMDIParentFrame_ActivateNext(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_ActivateNext(_arg0); + wxMDIParentFrame_ActivateNext(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -367,7 +335,7 @@ static PyObject *_wrap_wxMDIParentFrame_ActivatePrevious(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_ActivatePrevious(_arg0); + wxMDIParentFrame_ActivatePrevious(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -395,7 +363,7 @@ static PyObject *_wrap_wxMDIParentFrame_ArrangeIcons(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_ArrangeIcons(_arg0); + wxMDIParentFrame_ArrangeIcons(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -423,7 +391,7 @@ static PyObject *_wrap_wxMDIParentFrame_Cascade(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_Cascade(_arg0); + wxMDIParentFrame_Cascade(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -452,7 +420,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetActiveChild(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); + _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -480,7 +448,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetClientWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); + _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -508,7 +476,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); + _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -536,7 +504,7 @@ static PyObject *_wrap_wxMDIParentFrame_GetWindowMenu(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMDIParentFrame_GetWindowMenu(_arg0); + _result = (wxMenu *)wxMDIParentFrame_GetWindowMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -572,7 +540,7 @@ static PyObject *_wrap_wxMDIParentFrame_SetWindowMenu(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_SetWindowMenu(_arg0,_arg1); + wxMDIParentFrame_SetWindowMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -609,7 +577,7 @@ static PyObject *_wrap_wxMDIParentFrame_SetToolBar(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_SetToolBar(_arg0,_arg1); + wxMDIParentFrame_SetToolBar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -637,7 +605,7 @@ static PyObject *_wrap_wxMDIParentFrame_Tile(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIParentFrame_Tile(_arg0); + wxMDIParentFrame_Tile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -717,22 +685,9 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -748,7 +703,7 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIChildFrame *)new_wxMDIChildFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxMDIChildFrame *)new_wxMDIChildFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -778,7 +733,7 @@ static PyObject *_wrap_new_wxPreMDIChildFrame(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIChildFrame *)new_wxPreMDIChildFrame(); + _result = (wxMDIChildFrame *)new_wxPreMDIChildFrame(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -831,22 +786,9 @@ static PyObject *_wrap_wxMDIChildFrame_Create(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -862,7 +804,7 @@ static PyObject *_wrap_wxMDIChildFrame_Create(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMDIChildFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxMDIChildFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -893,7 +835,7 @@ static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIChildFrame_Activate(_arg0); + wxMDIChildFrame_Activate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -924,7 +866,7 @@ static PyObject *_wrap_wxMDIChildFrame_Maximize(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIChildFrame_Maximize(_arg0,_arg1); + wxMDIChildFrame_Maximize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -952,7 +894,7 @@ static PyObject *_wrap_wxMDIChildFrame_Restore(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMDIChildFrame_Restore(_arg0); + wxMDIChildFrame_Restore(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1007,7 +949,7 @@ static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIClientWindow *)new_wxMDIClientWindow(_arg0,_arg1); + _result = (wxMDIClientWindow *)new_wxMDIClientWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1033,7 +975,7 @@ static PyObject *_wrap_new_wxPreMDIClientWindow(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMDIClientWindow *)new_wxPreMDIClientWindow(); + _result = (wxMDIClientWindow *)new_wxPreMDIClientWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1077,7 +1019,7 @@ static PyObject *_wrap_wxMDIClientWindow_Create(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMDIClientWindow_Create(_arg0,_arg1,_arg2); + _result = (bool )wxMDIClientWindow_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index c1c1f67c0f..fd5981984e 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -87,12 +87,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); @@ -116,8 +110,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return Py_None; } - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; + wxString wxGetResource(const wxString& section, const wxString& entry, + const wxString& file = wxEmptyString) { + wxChar * retval; wxGetResource(section, entry, &retval, file); return retval; } @@ -156,7 +151,7 @@ static PyObject *_wrap_wxIntersectRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxIntersectRect(_arg0,_arg1); + _result = (PyObject *)wxIntersectRect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -176,7 +171,7 @@ static PyObject *_wrap_wxNewId(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); + _result = (long )wxNewId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -194,7 +189,7 @@ static PyObject *_wrap_wxRegisterId(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); + wxRegisterId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -213,7 +208,7 @@ static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) { return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); + _result = (long )wxNewId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -231,7 +226,7 @@ static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); + wxRegisterId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -250,7 +245,7 @@ static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetCurrentId(); + _result = (long )wxGetCurrentId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -267,7 +262,7 @@ static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBell(); + wxBell(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -285,7 +280,7 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEndBusyCursor(); + wxEndBusyCursor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -307,7 +302,7 @@ static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetElapsedTime(_arg0); + _result = (long )wxGetElapsedTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -325,7 +320,7 @@ static PyObject *_wrap_wxGetFreeMemory(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetFreeMemory(); + _result = (long )wxGetFreeMemory(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -352,7 +347,7 @@ static PyObject *_wrap_wxGetMousePosition(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGetMousePosition(_arg0,_arg1); + wxGetMousePosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -381,7 +376,7 @@ static PyObject *_wrap_wxIsBusy(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIsBusy(); + _result = (bool )wxIsBusy(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -399,12 +394,16 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNow()); + _result = new wxString (wxNow()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -424,26 +423,13 @@ static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShell(*_arg0); + _result = (bool )wxShell(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -464,7 +450,7 @@ static PyObject *_wrap_wxStartTimer(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStartTimer(); + wxStartTimer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -493,7 +479,7 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetOsVersion(_arg0,_arg1); + _result = (int )wxGetOsVersion(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -521,12 +507,16 @@ static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetOsDescription()); + _result = new wxString (wxGetOsDescription()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -544,7 +534,7 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSleep(_arg0); + wxSleep(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -563,7 +553,7 @@ static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUsleep(_arg0); + wxUsleep(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -582,7 +572,7 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxYield(); + _result = (bool )wxYield(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -600,7 +590,7 @@ static PyObject *_wrap_wxYieldIfNeeded(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxYieldIfNeeded(); + _result = (bool )wxYieldIfNeeded(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -620,7 +610,7 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEnableTopLevelWindows(_arg0); + wxEnableTopLevelWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -631,22 +621,62 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1; - char * _arg2 = (char *) NULL; + wxString * _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "section","entry","file", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ss|s:wxGetResource",_kwnames,&_arg0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxGetResource",_kwnames,&_obj0,&_obj1,&_obj2)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxGetResource(_arg0,_arg1,_arg2); + _result = new wxString (wxGetResource(*_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} return _resultobj; } @@ -661,31 +691,22 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStripMenuCodes",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStripMenuCodes(*_arg0)); + _result = new wxString (wxStripMenuCodes(*_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -707,12 +728,16 @@ static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetEmailAddress()); + _result = new wxString (wxGetEmailAddress()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -730,12 +755,16 @@ static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetHostName()); + _result = new wxString (wxGetHostName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -753,12 +782,16 @@ static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetFullHostName()); + _result = new wxString (wxGetFullHostName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -776,12 +809,16 @@ static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserId()); + _result = new wxString (wxGetUserId()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -799,12 +836,16 @@ static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserName()); + _result = new wxString (wxGetUserName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -822,12 +863,16 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetHomeDir()); + _result = new wxString (wxGetHomeDir()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -846,12 +891,16 @@ static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserHome(_arg0)); + _result = new wxString (wxGetUserHome(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -871,26 +920,13 @@ static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -923,12 +959,12 @@ static PyObject *_wrap_wxNullAcceleratorTable_get() { return pyobj; } -static const char * wxObject_GetClassName(wxObject *self) { +static wxString wxObject_GetClassName(wxObject *self) { return self->GetClassInfo()->GetClassName(); } static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxString * _result; wxObject * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -945,11 +981,20 @@ static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxObject_GetClassName(_arg0); + _result = new wxString (wxObject_GetClassName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } @@ -974,7 +1019,7 @@ static PyObject *_wrap_wxObject_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxObject_Destroy(_arg0); + wxObject_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1003,7 +1048,7 @@ static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_x_set(_arg0,_arg1); + _result = (long )wxSize_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1030,7 +1075,7 @@ static PyObject *_wrap_wxSize_x_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_x_get(_arg0); + _result = (long )wxSize_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1058,7 +1103,7 @@ static PyObject *_wrap_wxSize_y_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_y_set(_arg0,_arg1); + _result = (long )wxSize_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1085,7 +1130,7 @@ static PyObject *_wrap_wxSize_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_y_get(_arg0); + _result = (long )wxSize_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1107,7 +1152,7 @@ static PyObject *_wrap_new_wxSize(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSize *)new_wxSize(_arg0,_arg1); + _result = (wxSize *)new_wxSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1139,7 +1184,7 @@ static PyObject *_wrap_delete_wxSize(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxSize(_arg0); + delete_wxSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1168,7 +1213,7 @@ static PyObject *_wrap_wxSize_Set(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_Set(_arg0,_arg1,_arg2); + wxSize_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1196,7 +1241,7 @@ static PyObject *_wrap_wxSize_GetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetX(_arg0); + _result = (long )wxSize_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1223,7 +1268,7 @@ static PyObject *_wrap_wxSize_GetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetY(_arg0); + _result = (long )wxSize_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1250,7 +1295,7 @@ static PyObject *_wrap_wxSize_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetWidth(_arg0); + _result = (long )wxSize_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1277,7 +1322,7 @@ static PyObject *_wrap_wxSize_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetHeight(_arg0); + _result = (long )wxSize_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1304,7 +1349,7 @@ static PyObject *_wrap_wxSize_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_SetWidth(_arg0,_arg1); + wxSize_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1332,7 +1377,7 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_SetHeight(_arg0,_arg1); + wxSize_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1365,7 +1410,7 @@ static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSize_asTuple(_arg0); + _result = (PyObject *)wxSize_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1406,7 +1451,7 @@ static PyObject *_wrap_wxSize___cmp__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSize___cmp__(_arg0,_arg1); + _result = (int )wxSize___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1434,7 +1479,7 @@ static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_x_set(_arg0,_arg1); + _result = (double )wxRealPoint_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1461,7 +1506,7 @@ static PyObject *_wrap_wxRealPoint_x_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_x_get(_arg0); + _result = (double )wxRealPoint_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1489,7 +1534,7 @@ static PyObject *_wrap_wxRealPoint_y_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_y_set(_arg0,_arg1); + _result = (double )wxRealPoint_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1516,7 +1561,7 @@ static PyObject *_wrap_wxRealPoint_y_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_y_get(_arg0); + _result = (double )wxRealPoint_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1538,7 +1583,7 @@ static PyObject *_wrap_new_wxRealPoint(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); + _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1570,7 +1615,7 @@ static PyObject *_wrap_delete_wxRealPoint(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRealPoint(_arg0); + delete_wxRealPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1602,7 +1647,7 @@ static PyObject *_wrap_wxRealPoint_Set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRealPoint_Set(_arg0,_arg1,_arg2); + wxRealPoint_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1635,7 +1680,7 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxRealPoint_asTuple(_arg0); + _result = (PyObject *)wxRealPoint_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1676,7 +1721,7 @@ static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1716,7 +1761,7 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1756,7 +1801,7 @@ static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1784,7 +1829,7 @@ static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_x_set(_arg0,_arg1); + _result = (long )wxPoint_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1811,7 +1856,7 @@ static PyObject *_wrap_wxPoint_x_get(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_x_get(_arg0); + _result = (long )wxPoint_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1839,7 +1884,7 @@ static PyObject *_wrap_wxPoint_y_set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_y_set(_arg0,_arg1); + _result = (long )wxPoint_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1866,7 +1911,7 @@ static PyObject *_wrap_wxPoint_y_get(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_y_get(_arg0); + _result = (long )wxPoint_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1888,7 +1933,7 @@ static PyObject *_wrap_new_wxPoint(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)new_wxPoint(_arg0,_arg1); + _result = (wxPoint *)new_wxPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1920,7 +1965,7 @@ static PyObject *_wrap_delete_wxPoint(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPoint(_arg0); + delete_wxPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1952,7 +1997,7 @@ static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPoint_Set(_arg0,_arg1,_arg2); + wxPoint_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1985,7 +2030,7 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPoint_asTuple(_arg0); + _result = (PyObject *)wxPoint_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2026,7 +2071,7 @@ static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2066,7 +2111,7 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2106,7 +2151,7 @@ static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPoint___cmp__(_arg0,_arg1); + _result = (int )wxPoint___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2130,7 +2175,7 @@ static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); + _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2162,7 +2207,7 @@ static PyObject *_wrap_delete_wxRect(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRect(_arg0); + delete_wxRect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2190,7 +2235,7 @@ static PyObject *_wrap_wxRect_GetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetX(_arg0); + _result = (int )wxRect_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2217,7 +2262,7 @@ static PyObject *_wrap_wxRect_SetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetX(_arg0,_arg1); + wxRect_SetX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2245,7 +2290,7 @@ static PyObject *_wrap_wxRect_GetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetY(_arg0); + _result = (int )wxRect_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2272,7 +2317,7 @@ static PyObject *_wrap_wxRect_SetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetY(_arg0,_arg1); + wxRect_SetY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2300,7 +2345,7 @@ static PyObject *_wrap_wxRect_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetWidth(_arg0); + _result = (int )wxRect_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2327,7 +2372,7 @@ static PyObject *_wrap_wxRect_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetWidth(_arg0,_arg1); + wxRect_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +2400,7 @@ static PyObject *_wrap_wxRect_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetHeight(_arg0); + _result = (int )wxRect_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2382,7 +2427,7 @@ static PyObject *_wrap_wxRect_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetHeight(_arg0,_arg1); + wxRect_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2411,7 +2456,7 @@ static PyObject *_wrap_wxRect_GetPosition(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxRect_GetPosition(_arg0)); + _result = new wxPoint (wxRect_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2440,7 +2485,7 @@ static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxRect_GetSize(_arg0)); + _result = new wxSize (wxRect_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2468,7 +2513,7 @@ static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetLeft(_arg0); + _result = (int )wxRect_GetLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2495,7 +2540,7 @@ static PyObject *_wrap_wxRect_GetTop(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetTop(_arg0); + _result = (int )wxRect_GetTop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2522,7 +2567,7 @@ static PyObject *_wrap_wxRect_GetBottom(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetBottom(_arg0); + _result = (int )wxRect_GetBottom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2549,7 +2594,7 @@ static PyObject *_wrap_wxRect_GetRight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetRight(_arg0); + _result = (int )wxRect_GetRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2576,7 +2621,7 @@ static PyObject *_wrap_wxRect_SetLeft(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetLeft(_arg0,_arg1); + wxRect_SetLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2604,7 +2649,7 @@ static PyObject *_wrap_wxRect_SetRight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetRight(_arg0,_arg1); + wxRect_SetRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2632,7 +2677,7 @@ static PyObject *_wrap_wxRect_SetTop(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetTop(_arg0,_arg1); + wxRect_SetTop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2660,7 +2705,7 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetBottom(_arg0,_arg1); + wxRect_SetBottom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2689,7 +2734,7 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_Inflate(_arg0,_arg1,_arg2); + wxRect_Inflate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2719,7 +2764,7 @@ static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2747,7 +2792,7 @@ static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_set(_arg0,_arg1); + _result = (int )wxRect_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2774,7 +2819,7 @@ static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_get(_arg0); + _result = (int )wxRect_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2802,7 +2847,7 @@ static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_set(_arg0,_arg1); + _result = (int )wxRect_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2829,7 +2874,7 @@ static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_get(_arg0); + _result = (int )wxRect_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2857,7 +2902,7 @@ static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_width_set(_arg0,_arg1); + _result = (int )wxRect_width_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2884,7 +2929,7 @@ static PyObject *_wrap_wxRect_width_get(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_width_get(_arg0); + _result = (int )wxRect_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2912,7 +2957,7 @@ static PyObject *_wrap_wxRect_height_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_height_set(_arg0,_arg1); + _result = (int )wxRect_height_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2939,7 +2984,7 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_height_get(_arg0); + _result = (int )wxRect_height_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2973,7 +3018,7 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxRect_asTuple(_arg0); + _result = (PyObject *)wxRect_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3014,7 +3059,7 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRect___add__(_arg0,_arg1)); + _result = new wxRect (wxRect___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3054,7 +3099,7 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect___cmp__(_arg0,_arg1); + _result = (int )wxRect___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3099,7 +3144,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3128,7 +3173,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Absolute(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); + wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3156,7 +3201,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_AsIs(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_AsIs(_arg0); + wxIndividualLayoutConstraint_AsIs(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3194,7 +3239,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Below(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3222,7 +3267,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Unconstrained(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Unconstrained(_arg0); + wxIndividualLayoutConstraint_Unconstrained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3260,7 +3305,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_LeftOf(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3299,7 +3344,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_PercentOf(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); + wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3337,7 +3382,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_RightOf(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3376,7 +3421,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_SameAs(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); + wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3417,7 +3462,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3446,7 +3491,7 @@ static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); + _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3481,7 +3526,7 @@ static PyObject *_wrap_wxLayoutConstraints_bottom_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3516,7 +3561,7 @@ static PyObject *_wrap_wxLayoutConstraints_centreX_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3551,7 +3596,7 @@ static PyObject *_wrap_wxLayoutConstraints_centreY_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3586,7 +3631,7 @@ static PyObject *_wrap_wxLayoutConstraints_height_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3621,7 +3666,7 @@ static PyObject *_wrap_wxLayoutConstraints_left_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3656,7 +3701,7 @@ static PyObject *_wrap_wxLayoutConstraints_right_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3691,7 +3736,7 @@ static PyObject *_wrap_wxLayoutConstraints_top_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3726,7 +3771,7 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3755,7 +3800,7 @@ static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); + _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3788,7 +3833,7 @@ static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxAcceleratorEntry(_arg0); + delete_wxAcceleratorEntry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3819,7 +3864,7 @@ static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); + wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3848,7 +3893,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetFlags(_arg0); + _result = (int )wxAcceleratorEntry_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3876,7 +3921,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); + _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3904,7 +3949,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetCommand(_arg0); + _result = (int )wxAcceleratorEntry_GetCommand(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3950,7 +3995,7 @@ static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); + _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3986,7 +4031,7 @@ static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxAcceleratorTable(_arg0); + delete_wxAcceleratorTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4016,26 +4061,13 @@ static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxBusyInfo",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); + _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4072,7 +4104,7 @@ static PyObject *_wrap_delete_wxBusyInfo(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBusyInfo(_arg0); + delete_wxBusyInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index cfd8981fb6..75cde0364a 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -101,12 +101,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - int wxCaret_GetBlinkTime() { return wxCaret::GetBlinkTime(); } @@ -162,7 +156,7 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DoLog"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(isi)", level, szString, t)); // TODO: unicode fix wxPyEndBlockThreads(); if (! found) wxLog::DoLog(level, szString, t); @@ -172,7 +166,7 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(si)", szString, t)); // TODO: unicode fix wxPyEndBlockThreads(); if (! found) wxLog::DoLogString(szString, t); @@ -293,11 +287,11 @@ extern "C" { static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; - char * _arg0; + char * _arg0 = (char *) wxFileSelectorPromptStr; char * _arg1 = (char *) NULL; char * _arg2 = (char *) NULL; char * _arg3 = (char *) NULL; - char * _arg4 = (char *) "*.*"; + char * _arg4 = (char *) wxFileSelectorDefaultWildcardStr; int _arg5 = (int ) 0; wxWindow * _arg6 = (wxWindow *) NULL; int _arg7 = (int ) -1; @@ -306,7 +300,7 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject * char *_kwnames[] = { "message","default_path","default_filename","default_extension","wildcard","flags","parent","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|ssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|sssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) return NULL; if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -317,12 +311,16 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); + _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -351,60 +349,21 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOiii:wxGetTextFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4,&_arg5,&tempbool6)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -416,12 +375,16 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec _arg6 = (bool ) tempbool6; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); + _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -458,60 +421,21 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOO:wxGetPasswordFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -522,12 +446,16 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetPasswordFromUser(*_arg0,*_arg1,*_arg2,_arg3)); + _result = new wxString (wxGetPasswordFromUser(*_arg0,*_arg1,*_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -571,40 +499,14 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj3) { @@ -631,12 +533,16 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); + _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -679,40 +585,14 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj3) { @@ -739,7 +619,7 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -776,41 +656,15 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOii:wxMessageBox",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4,&_arg5)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -821,7 +675,7 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -860,58 +714,19 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOl|llOO:wxGetNumberFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argo6,&_obj7)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -928,7 +743,7 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); + _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -958,7 +773,7 @@ static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxColourDisplay(); + _result = (bool )wxColourDisplay(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -976,7 +791,7 @@ static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDisplayDepth(); + _result = (int )wxDisplayDepth(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -994,7 +809,7 @@ static PyObject *_wrap_wxGetDisplayDepth(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetDisplayDepth(); + _result = (int )wxGetDisplayDepth(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1021,7 +836,7 @@ static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDisplaySize(_arg0,_arg1); + wxDisplaySize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1051,7 +866,7 @@ static PyObject *_wrap_wxGetDisplaySize(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGetDisplaySize()); + _result = new wxSize (wxGetDisplaySize()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1079,7 +894,7 @@ static PyObject *_wrap_wxDisplaySizeMM(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDisplaySizeMM(_arg0,_arg1); + wxDisplaySizeMM(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1109,7 +924,7 @@ static PyObject *_wrap_wxGetDisplaySizeMM(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGetDisplaySizeMM()); + _result = new wxSize (wxGetDisplaySizeMM()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1147,7 +962,7 @@ static PyObject *_wrap_wxClientDisplayRect(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxClientDisplayRect(_arg0,_arg1,_arg2,_arg3); + wxClientDisplayRect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1187,7 +1002,7 @@ static PyObject *_wrap_wxGetClientDisplayRect(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxGetClientDisplayRect()); + _result = new wxRect (wxGetClientDisplayRect()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1214,7 +1029,7 @@ static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSetCursor(*_arg0); + wxSetCursor(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1236,22 +1051,9 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -1262,7 +1064,7 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); + _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,22 +1089,9 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -1313,7 +1102,7 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); + _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1343,7 +1132,7 @@ static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBeginBusyCursor(_arg0); + wxBeginBusyCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1362,7 +1151,7 @@ static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGetActiveWindow(); + _result = (wxWindow *)wxGetActiveWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1388,7 +1177,7 @@ static PyObject *_wrap_wxGenericFindWindowAtPoint(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxGenericFindWindowAtPoint(*_arg0); + _result = (wxWindow *)wxGenericFindWindowAtPoint(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1414,7 +1203,7 @@ static PyObject *_wrap_wxFindWindowAtPoint(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxFindWindowAtPoint(*_arg0); + _result = (wxWindow *)wxFindWindowAtPoint(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1441,7 +1230,7 @@ static PyObject *_wrap_wxCheckForInterrupt(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckForInterrupt(_arg0); + _result = (bool )wxCheckForInterrupt(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1458,7 +1247,7 @@ static PyObject *_wrap_wxFlushEvents(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlushEvents(); + wxFlushEvents(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1479,7 +1268,7 @@ static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); + _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1496,7 +1285,7 @@ static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxResourceClear(); + wxResourceClear(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1517,7 +1306,7 @@ static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); + _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1538,7 +1327,7 @@ static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxResourceCreateIcon(_arg0)); + _result = new wxIcon (wxResourceCreateIcon(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1558,7 +1347,7 @@ static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); + _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1577,7 +1366,7 @@ static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxResourceGetIdentifier(_arg0); + _result = (int )wxResourceGetIdentifier(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1605,7 +1394,7 @@ static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseData(_arg0,_arg1); + _result = (bool )wxResourceParseData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1633,7 +1422,7 @@ static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseFile(_arg0,_arg1); + _result = (bool )wxResourceParseFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1661,7 +1450,7 @@ static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseString(_arg0,_arg1); + _result = (bool )wxResourceParseString(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1679,7 +1468,7 @@ static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCaret_GetBlinkTime(); + _result = (int )wxCaret_GetBlinkTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1697,7 +1486,7 @@ static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetBlinkTime(_arg0); + wxCaret_SetBlinkTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1725,7 +1514,7 @@ static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSafeYield(_arg0); + _result = (bool )wxSafeYield(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,7 +1549,7 @@ static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostEvent(_arg0,*_arg1); + wxPostEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1778,7 +1567,7 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWakeUpIdle(); + wxWakeUpIdle(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1796,7 +1585,7 @@ static PyObject *_wrap_wxWakeUpMainThread(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWakeUpMainThread(); + wxWakeUpMainThread(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1814,7 +1603,7 @@ static PyObject *_wrap_wxMutexGuiEnter(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMutexGuiEnter(); + wxMutexGuiEnter(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1832,7 +1621,7 @@ static PyObject *_wrap_wxMutexGuiLeave(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMutexGuiLeave(); + wxMutexGuiLeave(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1851,7 +1640,7 @@ static PyObject *_wrap_wxThread_IsMain(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxThread_IsMain(); + _result = (bool )wxThread_IsMain(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1890,7 +1679,7 @@ static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwarg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShowTip(_arg0,_arg1,_arg2); + _result = (bool )wxShowTip(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1911,26 +1700,13 @@ static PyObject *_wrap_wxCreateFileTipProvider(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCreateFileTipProvider",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTipProvider *)wxCreateFileTipProvider(*_arg0,_arg1); + _result = (wxTipProvider *)wxCreateFileTipProvider(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1958,7 +1734,7 @@ static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (unsigned long )wxSysErrorCode(); + _result = (unsigned long )wxSysErrorCode(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1968,7 +1744,7 @@ static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject * static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxString * _result; unsigned long _arg0 = (unsigned long ) 0; char *_kwnames[] = { "nErrCode", NULL }; @@ -1977,156 +1753,236 @@ static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxSysErrorMsg(_arg0); + _result = new wxString (wxSysErrorMsg(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } static PyObject *_wrap_wxLogFatalError(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogFatalError",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogFatalError",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogFatalError(_arg0); + wxLogFatalError(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogError(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogError",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogError",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogError(_arg0); + wxLogError(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogWarning(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogWarning",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWarning",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogWarning(_arg0); + wxLogWarning(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogMessage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogMessage",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogMessage",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogMessage(_arg0); + wxLogMessage(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogInfo",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogInfo",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogInfo(_arg0); + wxLogInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogVerbose",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogVerbose",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogVerbose(_arg0); + wxLogVerbose(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogStatus(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogStatus",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogStatus",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogStatus(_arg0); + wxLogStatus(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } static PyObject *_wrap_wxLogStatusFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFrame * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "pFrame","szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxLogStatusFrame",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxLogStatusFrame",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2135,33 +1991,52 @@ static PyObject *_wrap_wxLogStatusFrame(PyObject *self, PyObject *args, PyObject return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogStatus(_arg0,_arg1); + wxLogStatus(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } static PyObject *_wrap_wxLogSysError(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "szFormat", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogSysError",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogSysError",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogSysError(_arg0); + wxLogSysError(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} return _resultobj; } @@ -2179,22 +2054,9 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } @@ -2205,7 +2067,7 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxExecute(*_arg0,_arg1,_arg2); + _result = (long )wxExecute(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2229,26 +2091,13 @@ static PyObject *_wrap_wxWaveData(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWaveData",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWave *)wxWaveData(*_arg0); + _result = (wxWave *)wxWaveData(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2293,7 +2142,7 @@ static PyObject *_wrap_wxSystemSettings_GetColour(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxSystemSettings::GetColour(_arg0)); + _result = new wxColour (wxSystemSettings::GetColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2314,7 +2163,7 @@ static PyObject *_wrap_wxSystemSettings_GetFont(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxSystemSettings::GetFont(_arg0)); + _result = new wxFont (wxSystemSettings::GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2334,7 +2183,7 @@ static PyObject *_wrap_wxSystemSettings_GetMetric(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSystemSettings::GetMetric(_arg0); + _result = (int )wxSystemSettings::GetMetric(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2353,7 +2202,7 @@ static PyObject *_wrap_wxSystemSettings_HasFeature(PyObject *self, PyObject *arg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSystemSettings::HasFeature(_arg0); + _result = (bool )wxSystemSettings::HasFeature(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2382,26 +2231,13 @@ static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxToolTip",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolTip *)new_wxToolTip(*_arg0); + _result = (wxToolTip *)new_wxToolTip(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2439,26 +2275,13 @@ static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolTip_SetTip(_arg0,*_arg1); + wxToolTip_SetTip(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2491,12 +2314,16 @@ static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolTip_GetTip(_arg0)); + _result = new wxString (wxToolTip_GetTip(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2524,7 +2351,7 @@ static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxToolTip_GetWindow(_arg0); + _result = (wxWindow *)wxToolTip_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2544,7 +2371,7 @@ static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolTip::Enable(_arg0); + wxToolTip::Enable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2563,7 +2390,7 @@ static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolTip::SetDelay(_arg0); + wxToolTip::SetDelay(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2601,7 +2428,7 @@ static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); + _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2634,7 +2461,7 @@ static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxCaret(_arg0); + delete_wxCaret(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2663,7 +2490,7 @@ static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCaret_IsOk(_arg0); + _result = (bool )wxCaret_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2691,7 +2518,7 @@ static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCaret_IsVisible(_arg0); + _result = (bool )wxCaret_IsVisible(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2728,7 +2555,7 @@ static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); + wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2768,7 +2595,7 @@ static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxCaret_GetPosition(_arg0)); + _result = new wxPoint (wxCaret_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2806,7 +2633,7 @@ static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); + wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2846,7 +2673,7 @@ static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxCaret_GetSize(_arg0)); + _result = new wxSize (wxCaret_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2875,7 +2702,7 @@ static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxCaret_GetWindow(_arg0); + _result = (wxWindow *)wxCaret_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2904,7 +2731,7 @@ static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_MoveXY(_arg0,_arg1,_arg2); + wxCaret_MoveXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2940,7 +2767,7 @@ static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_Move(_arg0,*_arg1); + wxCaret_Move(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2970,7 +2797,7 @@ static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetSizeWH(_arg0,_arg1,_arg2); + wxCaret_SetSizeWH(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3006,7 +2833,7 @@ static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetSize(_arg0,*_arg1); + wxCaret_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3035,7 +2862,7 @@ static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_Show(_arg0,_arg1); + wxCaret_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3063,7 +2890,7 @@ static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_Hide(_arg0); + wxCaret_Hide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3084,7 +2911,7 @@ static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); + _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3117,7 +2944,7 @@ static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyFontEnumerator(_arg0); + delete_wxPyFontEnumerator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3158,7 +2985,7 @@ static PyObject *_wrap_wxFontEnumerator__setCallbackInfo(PyObject *self, PyObjec _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontEnumerator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); + wxFontEnumerator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3191,7 +3018,7 @@ static PyObject *_wrap_wxFontEnumerator_EnumerateFacenames(PyObject *self, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); + _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3220,7 +3047,7 @@ static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); + _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3251,7 +3078,7 @@ static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); + _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3284,7 +3111,7 @@ static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); + _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3315,7 +3142,7 @@ static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); + _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3348,7 +3175,7 @@ static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBusyCursor(_arg0); + delete_wxBusyCursor(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3378,7 +3205,7 @@ static PyObject *_wrap_new_wxWindowDisabler(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); + _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3411,7 +3238,7 @@ static PyObject *_wrap_delete_wxWindowDisabler(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxWindowDisabler(_arg0); + delete_wxWindowDisabler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3432,7 +3259,7 @@ static PyObject *_wrap_new_wxMutexGuiLocker(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMutexGuiLocker *)new_wxMutexGuiLocker(); + _result = (wxMutexGuiLocker *)new_wxMutexGuiLocker(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3465,7 +3292,7 @@ static PyObject *_wrap_delete_wxMutexGuiLocker(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxMutexGuiLocker(_arg0); + delete_wxMutexGuiLocker(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3493,7 +3320,7 @@ static PyObject *_wrap_delete_wxTipProvider(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTipProvider(_arg0); + delete_wxTipProvider(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3522,12 +3349,16 @@ static PyObject *_wrap_wxTipProvider_GetTip(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTipProvider_GetTip(_arg0)); + _result = new wxString (wxTipProvider_GetTip(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3555,7 +3386,7 @@ static PyObject *_wrap_wxTipProvider_GetCurrentTip(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxTipProvider_GetCurrentTip(_arg0); + _result = (size_t )wxTipProvider_GetCurrentTip(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3584,7 +3415,7 @@ static PyObject *_wrap_new_wxPyTipProvider(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTipProvider *)new_wxPyTipProvider(_arg0); + _result = (wxPyTipProvider *)new_wxPyTipProvider(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3636,7 +3467,7 @@ static PyObject *_wrap_new_wxDragImage(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragImage(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragImage(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3680,7 +3511,7 @@ static PyObject *_wrap_new_wxDragIcon(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragIcon(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragIcon(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3709,22 +3540,9 @@ static PyObject *_wrap_new_wxDragString(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxDragString",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -3735,7 +3553,7 @@ static PyObject *_wrap_new_wxDragString(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragString(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragString(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3783,7 +3601,7 @@ static PyObject *_wrap_new_wxDragTreeItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragTreeItem(*_arg0,*_arg1); + _result = (wxGenericDragImage *)new_wxDragTreeItem(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3819,7 +3637,7 @@ static PyObject *_wrap_new_wxDragListItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGenericDragImage *)new_wxDragListItem(*_arg0,_arg1); + _result = (wxGenericDragImage *)new_wxDragListItem(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3852,7 +3670,7 @@ static PyObject *_wrap_delete_wxDragImage(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxGenericDragImage(_arg0); + delete_wxGenericDragImage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3889,7 +3707,7 @@ static PyObject *_wrap_wxDragImage_SetBackingBitmap(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDragImage_SetBackingBitmap(_arg0,_arg1); + wxDragImage_SetBackingBitmap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3947,7 +3765,7 @@ static PyObject *_wrap_wxDragImage_BeginDrag(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_BeginDrag(_arg0,*_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxDragImage_BeginDrag(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4001,7 +3819,7 @@ static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4029,7 +3847,7 @@ static PyObject *_wrap_wxDragImage_EndDrag(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_EndDrag(_arg0); + _result = (bool )wxDragImage_EndDrag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4065,7 +3883,7 @@ static PyObject *_wrap_wxDragImage_Move(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_Move(_arg0,*_arg1); + _result = (bool )wxDragImage_Move(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4093,7 +3911,7 @@ static PyObject *_wrap_wxDragImage_Show(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_Show(_arg0); + _result = (bool )wxDragImage_Show(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4121,7 +3939,7 @@ static PyObject *_wrap_wxDragImage_Hide(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_Hide(_arg0); + _result = (bool )wxDragImage_Hide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4158,7 +3976,7 @@ static PyObject *_wrap_wxDragImage_GetImageRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxDragImage_GetImageRect(_arg0,*_arg1)); + _result = new wxRect (wxDragImage_GetImageRect(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4209,7 +4027,7 @@ static PyObject *_wrap_wxDragImage_RedrawImage(PyObject *self, PyObject *args, P _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_RedrawImage(_arg0,*_arg1,*_arg2,_arg3,_arg4); + _result = (bool )wxDragImage_RedrawImage(_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4242,7 +4060,7 @@ static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyTimer *)new_wxPyTimer(_arg0); + _result = (wxPyTimer *)new_wxPyTimer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4275,7 +4093,7 @@ static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyTimer(_arg0); + delete_wxPyTimer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4304,7 +4122,7 @@ static PyObject *_wrap_wxPyTimer_GetInterval(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyTimer_GetInterval(_arg0); + _result = (int )wxPyTimer_GetInterval(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4332,7 +4150,7 @@ static PyObject *_wrap_wxPyTimer_IsOneShot(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyTimer_IsOneShot(_arg0); + _result = (bool )wxPyTimer_IsOneShot(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4360,7 +4178,7 @@ static PyObject *_wrap_wxPyTimer_IsRunning(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyTimer_IsRunning(_arg0); + _result = (bool )wxPyTimer_IsRunning(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4397,7 +4215,7 @@ static PyObject *_wrap_wxPyTimer_SetOwner(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTimer_SetOwner(_arg0,_arg1,_arg2); + wxPyTimer_SetOwner(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4427,7 +4245,7 @@ static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTimer_Start(_arg0,_arg1,_arg2); + wxPyTimer_Start(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4455,7 +4273,7 @@ static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyTimer_Stop(_arg0); + wxPyTimer_Stop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4476,7 +4294,7 @@ static PyObject *_wrap_new_wxStopWatch(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStopWatch *)new_wxStopWatch(); + _result = (wxStopWatch *)new_wxStopWatch(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4509,7 +4327,7 @@ static PyObject *_wrap_delete_wxStopWatch(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxStopWatch(_arg0); + delete_wxStopWatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4538,7 +4356,7 @@ static PyObject *_wrap_wxStopWatch_Start(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStopWatch_Start(_arg0,_arg1); + wxStopWatch_Start(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4566,7 +4384,7 @@ static PyObject *_wrap_wxStopWatch_Pause(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStopWatch_Pause(_arg0); + wxStopWatch_Pause(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4594,7 +4412,7 @@ static PyObject *_wrap_wxStopWatch_Resume(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStopWatch_Resume(_arg0); + wxStopWatch_Resume(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4623,7 +4441,7 @@ static PyObject *_wrap_wxStopWatch_Time(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxStopWatch_Time(_arg0); + _result = (long )wxStopWatch_Time(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4643,7 +4461,7 @@ static PyObject *_wrap_new_wxLog(PyObject *self, PyObject *args, PyObject *kwarg return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)new_wxLog(); + _result = (wxLog *)new_wxLog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4667,7 +4485,7 @@ static PyObject *_wrap_wxLog_IsEnabled(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog::IsEnabled(); + _result = (bool )wxLog::IsEnabled(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4688,7 +4506,7 @@ static PyObject *_wrap_wxLog_EnableLogging(PyObject *self, PyObject *args, PyObj _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog::EnableLogging(_arg0); + _result = (bool )wxLog::EnableLogging(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4699,13 +4517,14 @@ static PyObject *_wrap_wxLog_EnableLogging(PyObject *self, PyObject *args, PyObj static PyObject *_wrap_wxLog_OnLog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxLogLevel * _arg0; - char * _arg1; + wxString * _arg1; int _arg2 = (int ) 0; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "level","szString","t", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|i:wxLog_OnLog",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxLog_OnLog",_kwnames,&_argo0,&_obj1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4714,14 +4533,23 @@ static PyObject *_wrap_wxLog_OnLog(PyObject *self, PyObject *args, PyObject *kwa return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::OnLog(*_arg0,_arg1,_arg2); + wxLog::OnLog(*_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -4744,7 +4572,7 @@ static PyObject *_wrap_wxLog_Flush(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog_Flush(_arg0); + wxLog_Flush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4773,7 +4601,7 @@ static PyObject *_wrap_wxLog_HasPendingMessages(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog_HasPendingMessages(_arg0); + _result = (bool )wxLog_HasPendingMessages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4790,7 +4618,7 @@ static PyObject *_wrap_wxLog_FlushActive(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::FlushActive(); + wxLog::FlushActive(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4810,7 +4638,7 @@ static PyObject *_wrap_wxLog_GetActiveTarget(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLog::GetActiveTarget(); + _result = (wxLog *)wxLog::GetActiveTarget(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4844,7 +4672,7 @@ static PyObject *_wrap_wxLog_SetActiveTarget(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLog::SetActiveTarget(_arg0); + _result = (wxLog *)wxLog::SetActiveTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4867,7 +4695,7 @@ static PyObject *_wrap_wxLog_Suspend(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::Suspend(); + wxLog::Suspend(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4885,7 +4713,7 @@ static PyObject *_wrap_wxLog_Resume(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::Resume(); + wxLog::Resume(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4916,7 +4744,7 @@ static PyObject *_wrap_wxLog_SetVerbose(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog_SetVerbose(_arg0,_arg1); + wxLog_SetVerbose(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4934,7 +4762,7 @@ static PyObject *_wrap_wxLog_DontCreateOnDemand(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::DontCreateOnDemand(); + wxLog::DontCreateOnDemand(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4961,7 +4789,7 @@ static PyObject *_wrap_wxLog_SetTraceMask(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::SetTraceMask(*_arg0); + wxLog::SetTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4980,26 +4808,13 @@ static PyObject *_wrap_wxLog_AddTraceMask(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_AddTraceMask",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::AddTraceMask(*_arg0); + wxLog::AddTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5022,26 +4837,13 @@ static PyObject *_wrap_wxLog_RemoveTraceMask(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_RemoveTraceMask",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::RemoveTraceMask(*_arg0); + wxLog::RemoveTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5063,7 +4865,7 @@ static PyObject *_wrap_wxLog_ClearTraceMasks(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::ClearTraceMasks(); + wxLog::ClearTraceMasks(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5082,7 +4884,7 @@ static PyObject *_wrap_wxLog_SetTimestamp(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLog::SetTimestamp(_arg0); + wxLog::SetTimestamp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5101,7 +4903,7 @@ static PyObject *_wrap_wxLog_GetTimestamp(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChar *)wxLog::GetTimestamp(); + _result = (wxChar *)wxLog::GetTimestamp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5129,7 +4931,7 @@ static PyObject *_wrap_wxLog_GetVerbose(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog_GetVerbose(_arg0); + _result = (bool )wxLog_GetVerbose(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5148,7 +4950,7 @@ static PyObject *_wrap_wxLog_GetTraceMask(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTraceMask (wxLog::GetTraceMask()); + _result = new wxTraceMask (wxLog::GetTraceMask()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5160,19 +4962,29 @@ static PyObject *_wrap_wxLog_GetTraceMask(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxLog_IsAllowedTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - char * _arg0; + wxString * _arg0; + PyObject * _obj0 = 0; char *_kwnames[] = { "mask", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLog_IsAllowedTraceMask",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_IsAllowedTraceMask",_kwnames,&_obj0)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLog::IsAllowedTraceMask(_arg0); + _result = (bool )wxLog::IsAllowedTraceMask(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} return _resultobj; } @@ -5200,12 +5012,16 @@ static PyObject *_wrap_wxLog_TimeStamp(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxLog_TimeStamp(_arg0)); + _result = new wxString (wxLog_TimeStamp(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5233,7 +5049,7 @@ static PyObject *_wrap_new_wxLogStderr(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogStderr *)new_wxLogStderr(); + _result = (wxLogStderr *)new_wxLogStderr(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5276,7 +5092,7 @@ static PyObject *_wrap_new_wxLogTextCtrl(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogTextCtrl *)new_wxLogTextCtrl(_arg0); + _result = (wxLogTextCtrl *)new_wxLogTextCtrl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5310,7 +5126,7 @@ static PyObject *_wrap_new_wxLogGui(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogGui *)new_wxLogGui(); + _result = (wxLogGui *)new_wxLogGui(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5337,17 +5153,18 @@ static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject PyObject * _resultobj; wxLogWindow * _result; wxFrame * _arg0; - char * _arg1; + wxString * _arg1; bool _arg2 = (bool ) TRUE; bool _arg3 = (bool ) TRUE; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; int tempbool2 = (int) TRUE; int tempbool3 = (int) TRUE; char *_kwnames[] = { "pParent","szTitle","bShow","bPassToOld", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|ii:new_wxLogWindow",_kwnames,&_argo0,&_arg1,&tempbool2,&tempbool3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|ii:new_wxLogWindow",_kwnames,&_argo0,&_obj1,&tempbool2,&tempbool3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5356,11 +5173,16 @@ static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} _arg2 = (bool ) tempbool2; _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogWindow *)new_wxLogWindow(_arg0,_arg1,_arg2,_arg3); + _result = (wxLogWindow *)new_wxLogWindow(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5371,6 +5193,10 @@ static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -5396,7 +5222,7 @@ static PyObject *_wrap_wxLogWindow_Show(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogWindow_Show(_arg0,_arg1); + wxLogWindow_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5425,7 +5251,7 @@ static PyObject *_wrap_wxLogWindow_GetFrame(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); + _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5454,7 +5280,7 @@ static PyObject *_wrap_wxLogWindow_GetOldLog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLogWindow_GetOldLog(_arg0); + _result = (wxLog *)wxLogWindow_GetOldLog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5488,7 +5314,7 @@ static PyObject *_wrap_wxLogWindow_IsPassingMessages(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLogWindow_IsPassingMessages(_arg0); + _result = (bool )wxLogWindow_IsPassingMessages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5518,7 +5344,7 @@ static PyObject *_wrap_wxLogWindow_PassMessages(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogWindow_PassMessages(_arg0,_arg1); + wxLogWindow_PassMessages(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5539,7 +5365,7 @@ static PyObject *_wrap_new_wxLogNull(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogNull *)new_wxLogNull(); + _result = (wxLogNull *)new_wxLogNull(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5572,7 +5398,7 @@ static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLogNull(_arg0); + delete_wxLogNull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5610,7 +5436,7 @@ static PyObject *_wrap_new_wxLogChain(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLogChain *)new_wxLogChain(_arg0); + _result = (wxLogChain *)new_wxLogChain(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5652,7 +5478,7 @@ static PyObject *_wrap_wxLogChain_SetLog(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogChain_SetLog(_arg0,_arg1); + wxLogChain_SetLog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5683,7 +5509,7 @@ static PyObject *_wrap_wxLogChain_PassMessages(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxLogChain_PassMessages(_arg0,_arg1); + wxLogChain_PassMessages(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5712,7 +5538,7 @@ static PyObject *_wrap_wxLogChain_IsPassingMessages(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLogChain_IsPassingMessages(_arg0); + _result = (bool )wxLogChain_IsPassingMessages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5741,7 +5567,7 @@ static PyObject *_wrap_wxLogChain_GetOldLog(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLog *)wxLogChain_GetOldLog(_arg0); + _result = (wxLog *)wxLogChain_GetOldLog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5775,7 +5601,7 @@ static PyObject *_wrap_new_wxPyLog(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyLog *)new_wxPyLog(); + _result = (wxPyLog *)new_wxPyLog(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5818,7 +5644,7 @@ static PyObject *_wrap_wxPyLog__setCallbackInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLog__setCallbackInfo(_arg0,_arg1,_arg2); + wxPyLog__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5846,7 +5672,7 @@ static PyObject *_wrap_wxPyLog_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyLog_Destroy(_arg0); + wxPyLog_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5886,7 +5712,7 @@ static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); + _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5920,7 +5746,7 @@ static PyObject *_wrap_wxProcessEvent_GetPid(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_GetPid(_arg0); + _result = (int )wxProcessEvent_GetPid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5948,7 +5774,7 @@ static PyObject *_wrap_wxProcessEvent_GetExitCode(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_GetExitCode(_arg0); + _result = (int )wxProcessEvent_GetExitCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5977,7 +5803,7 @@ static PyObject *_wrap_wxProcessEvent_m_pid_set(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); + _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6005,7 +5831,7 @@ static PyObject *_wrap_wxProcessEvent_m_pid_get(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_pid_get(_arg0); + _result = (int )wxProcessEvent_m_pid_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6034,7 +5860,7 @@ static PyObject *_wrap_wxProcessEvent_m_exitcode_set(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); + _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6062,7 +5888,7 @@ static PyObject *_wrap_wxProcessEvent_m_exitcode_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxProcessEvent_m_exitcode_get(_arg0); + _result = (int )wxProcessEvent_m_exitcode_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6108,7 +5934,7 @@ static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); + _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6141,7 +5967,7 @@ static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyProcess_Destroy(_arg0); + wxPyProcess_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6179,7 +6005,7 @@ static PyObject *_wrap_wxProcess__setCallbackInfo(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess__setCallbackInfo(_arg0,_arg1,_arg2); + wxProcess__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6209,7 +6035,7 @@ static PyObject *_wrap_wxProcess_base_OnTerminate(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); + wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6237,7 +6063,7 @@ static PyObject *_wrap_wxProcess_Redirect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_Redirect(_arg0); + wxProcess_Redirect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6266,7 +6092,7 @@ static PyObject *_wrap_wxProcess_IsRedirected(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxProcess_IsRedirected(_arg0); + _result = (bool )wxProcess_IsRedirected(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6293,7 +6119,7 @@ static PyObject *_wrap_wxProcess_Detach(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_Detach(_arg0); + wxProcess_Detach(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6322,7 +6148,7 @@ static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); + _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6357,7 +6183,7 @@ static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); + _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6393,7 +6219,7 @@ static PyObject *_wrap_wxProcess_GetOutputStream(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); + _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6426,7 +6252,7 @@ static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxProcess_CloseOutput(_arg0); + wxProcess_CloseOutput(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6456,7 +6282,7 @@ static PyObject *_wrap_new_wxJoystick(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxJoystick *)new_wxJoystick(_arg0); + _result = (wxJoystick *)new_wxJoystick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6489,7 +6315,7 @@ static PyObject *_wrap_delete_wxJoystick(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxJoystick(_arg0); + delete_wxJoystick(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6519,7 +6345,7 @@ static PyObject *_wrap_wxJoystick_GetPosition(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxJoystick_GetPosition(_arg0)); + _result = new wxPoint (wxJoystick_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6548,7 +6374,7 @@ static PyObject *_wrap_wxJoystick_GetZPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetZPosition(_arg0); + _result = (int )wxJoystick_GetZPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6576,7 +6402,7 @@ static PyObject *_wrap_wxJoystick_GetButtonState(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetButtonState(_arg0); + _result = (int )wxJoystick_GetButtonState(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6604,7 +6430,7 @@ static PyObject *_wrap_wxJoystick_GetPOVPosition(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPOVPosition(_arg0); + _result = (int )wxJoystick_GetPOVPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6632,7 +6458,7 @@ static PyObject *_wrap_wxJoystick_GetPOVCTSPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPOVCTSPosition(_arg0); + _result = (int )wxJoystick_GetPOVCTSPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6660,7 +6486,7 @@ static PyObject *_wrap_wxJoystick_GetRudderPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetRudderPosition(_arg0); + _result = (int )wxJoystick_GetRudderPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6688,7 +6514,7 @@ static PyObject *_wrap_wxJoystick_GetUPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetUPosition(_arg0); + _result = (int )wxJoystick_GetUPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6716,7 +6542,7 @@ static PyObject *_wrap_wxJoystick_GetVPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetVPosition(_arg0); + _result = (int )wxJoystick_GetVPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6744,7 +6570,7 @@ static PyObject *_wrap_wxJoystick_GetMovementThreshold(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetMovementThreshold(_arg0); + _result = (int )wxJoystick_GetMovementThreshold(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6772,7 +6598,7 @@ static PyObject *_wrap_wxJoystick_SetMovementThreshold(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxJoystick_SetMovementThreshold(_arg0,_arg1); + wxJoystick_SetMovementThreshold(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6801,7 +6627,7 @@ static PyObject *_wrap_wxJoystick_IsOk(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_IsOk(_arg0); + _result = (bool )wxJoystick_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6829,7 +6655,7 @@ static PyObject *_wrap_wxJoystick_GetNumberJoysticks(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetNumberJoysticks(_arg0); + _result = (int )wxJoystick_GetNumberJoysticks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6857,7 +6683,7 @@ static PyObject *_wrap_wxJoystick_GetManufacturerId(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetManufacturerId(_arg0); + _result = (int )wxJoystick_GetManufacturerId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6885,7 +6711,7 @@ static PyObject *_wrap_wxJoystick_GetProductId(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetProductId(_arg0); + _result = (int )wxJoystick_GetProductId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6913,12 +6739,16 @@ static PyObject *_wrap_wxJoystick_GetProductName(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxJoystick_GetProductName(_arg0)); + _result = new wxString (wxJoystick_GetProductName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6946,7 +6776,7 @@ static PyObject *_wrap_wxJoystick_GetXMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetXMin(_arg0); + _result = (int )wxJoystick_GetXMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6974,7 +6804,7 @@ static PyObject *_wrap_wxJoystick_GetYMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetYMin(_arg0); + _result = (int )wxJoystick_GetYMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7002,7 +6832,7 @@ static PyObject *_wrap_wxJoystick_GetZMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetZMin(_arg0); + _result = (int )wxJoystick_GetZMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7030,7 +6860,7 @@ static PyObject *_wrap_wxJoystick_GetXMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetXMax(_arg0); + _result = (int )wxJoystick_GetXMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7058,7 +6888,7 @@ static PyObject *_wrap_wxJoystick_GetYMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetYMax(_arg0); + _result = (int )wxJoystick_GetYMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7086,7 +6916,7 @@ static PyObject *_wrap_wxJoystick_GetZMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetZMax(_arg0); + _result = (int )wxJoystick_GetZMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7114,7 +6944,7 @@ static PyObject *_wrap_wxJoystick_GetNumberButtons(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetNumberButtons(_arg0); + _result = (int )wxJoystick_GetNumberButtons(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7142,7 +6972,7 @@ static PyObject *_wrap_wxJoystick_GetNumberAxes(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetNumberAxes(_arg0); + _result = (int )wxJoystick_GetNumberAxes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7170,7 +7000,7 @@ static PyObject *_wrap_wxJoystick_GetMaxButtons(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetMaxButtons(_arg0); + _result = (int )wxJoystick_GetMaxButtons(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7198,7 +7028,7 @@ static PyObject *_wrap_wxJoystick_GetMaxAxes(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetMaxAxes(_arg0); + _result = (int )wxJoystick_GetMaxAxes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7226,7 +7056,7 @@ static PyObject *_wrap_wxJoystick_GetPollingMin(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPollingMin(_arg0); + _result = (int )wxJoystick_GetPollingMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7254,7 +7084,7 @@ static PyObject *_wrap_wxJoystick_GetPollingMax(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetPollingMax(_arg0); + _result = (int )wxJoystick_GetPollingMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7282,7 +7112,7 @@ static PyObject *_wrap_wxJoystick_GetRudderMin(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetRudderMin(_arg0); + _result = (int )wxJoystick_GetRudderMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7310,7 +7140,7 @@ static PyObject *_wrap_wxJoystick_GetRudderMax(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetRudderMax(_arg0); + _result = (int )wxJoystick_GetRudderMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7338,7 +7168,7 @@ static PyObject *_wrap_wxJoystick_GetUMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetUMin(_arg0); + _result = (int )wxJoystick_GetUMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7366,7 +7196,7 @@ static PyObject *_wrap_wxJoystick_GetUMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetUMax(_arg0); + _result = (int )wxJoystick_GetUMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7394,7 +7224,7 @@ static PyObject *_wrap_wxJoystick_GetVMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetVMin(_arg0); + _result = (int )wxJoystick_GetVMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7422,7 +7252,7 @@ static PyObject *_wrap_wxJoystick_GetVMax(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxJoystick_GetVMax(_arg0); + _result = (int )wxJoystick_GetVMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7450,7 +7280,7 @@ static PyObject *_wrap_wxJoystick_HasRudder(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasRudder(_arg0); + _result = (bool )wxJoystick_HasRudder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7478,7 +7308,7 @@ static PyObject *_wrap_wxJoystick_HasZ(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasZ(_arg0); + _result = (bool )wxJoystick_HasZ(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7506,7 +7336,7 @@ static PyObject *_wrap_wxJoystick_HasU(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasU(_arg0); + _result = (bool )wxJoystick_HasU(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7534,7 +7364,7 @@ static PyObject *_wrap_wxJoystick_HasV(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasV(_arg0); + _result = (bool )wxJoystick_HasV(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7562,7 +7392,7 @@ static PyObject *_wrap_wxJoystick_HasPOV(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasPOV(_arg0); + _result = (bool )wxJoystick_HasPOV(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7590,7 +7420,7 @@ static PyObject *_wrap_wxJoystick_HasPOV4Dir(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasPOV4Dir(_arg0); + _result = (bool )wxJoystick_HasPOV4Dir(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7618,7 +7448,7 @@ static PyObject *_wrap_wxJoystick_HasPOVCTS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_HasPOVCTS(_arg0); + _result = (bool )wxJoystick_HasPOVCTS(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7656,7 +7486,7 @@ static PyObject *_wrap_wxJoystick_SetCapture(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_SetCapture(_arg0,_arg1,_arg2); + _result = (bool )wxJoystick_SetCapture(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7684,7 +7514,7 @@ static PyObject *_wrap_wxJoystick_ReleaseCapture(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxJoystick_ReleaseCapture(_arg0); + _result = (bool )wxJoystick_ReleaseCapture(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7715,27 +7545,14 @@ static PyObject *_wrap_new_wxWave(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxWave",_kwnames,&_obj0,&tempbool1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWave *)new_wxWave(*_arg0,_arg1); + _result = (wxWave *)new_wxWave(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7772,7 +7589,7 @@ static PyObject *_wrap_delete_wxWave(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxWave(_arg0); + delete_wxWave(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7801,7 +7618,7 @@ static PyObject *_wrap_wxWave_IsOk(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWave_IsOk(_arg0); + _result = (bool )wxWave_IsOk(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7835,7 +7652,7 @@ static PyObject *_wrap_wxWave_Play(PyObject *self, PyObject *args, PyObject *kwa _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWave_Play(_arg0,_arg1,_arg2); + _result = (bool )wxWave_Play(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7859,7 +7676,7 @@ static PyObject *_wrap_new_wxFileTypeInfo(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxFileTypeInfo(_arg0,_arg1,_arg2,_arg3); + _result = (wxFileTypeInfo *)new_wxFileTypeInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7894,15 +7711,20 @@ static PyObject *_wrap_new_wxFileTypeInfoSequence(PyObject *self, PyObject *args int i, len=PySequence_Length(_obj0); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); _arg0->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxFileTypeInfoSequence(*_arg0); + _result = (wxFileTypeInfo *)new_wxFileTypeInfoSequence(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7932,7 +7754,7 @@ static PyObject *_wrap_new_wxNullFileTypeInfo(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxNullFileTypeInfo(); + _result = (wxFileTypeInfo *)new_wxNullFileTypeInfo(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7966,7 +7788,7 @@ static PyObject *_wrap_wxFileTypeInfo_IsValid(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileTypeInfo_IsValid(_arg0); + _result = (bool )wxFileTypeInfo_IsValid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7995,26 +7817,13 @@ static PyObject *_wrap_wxFileTypeInfo_SetIcon(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileTypeInfo_SetIcon(_arg0,*_arg1,_arg2); + wxFileTypeInfo_SetIcon(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8047,26 +7856,13 @@ static PyObject *_wrap_wxFileTypeInfo_SetShortDesc(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileTypeInfo_SetShortDesc(_arg0,*_arg1); + wxFileTypeInfo_SetShortDesc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8099,13 +7895,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetMimeType(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetMimeType(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetMimeType(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8130,13 +7930,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetOpenCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetOpenCommand(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetOpenCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8161,13 +7965,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetPrintCommand(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetPrintCommand(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetPrintCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8192,13 +8000,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetShortDesc(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetShortDesc(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetShortDesc(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8223,13 +8035,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetDescription(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetDescription(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetDescription(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8257,7 +8073,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetExtensions(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileTypeInfo_GetExtensions(_arg0); + _result = (PyObject *)wxFileTypeInfo_GetExtensions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8287,7 +8103,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetExtensionsCount(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileTypeInfo_GetExtensionsCount(_arg0); + _result = (int )wxFileTypeInfo_GetExtensionsCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8315,13 +8131,17 @@ static PyObject *_wrap_wxFileTypeInfo_GetIconFile(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxFileTypeInfo_GetIconFile(_arg0); + const wxString & _result_ref = wxFileTypeInfo_GetIconFile(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -8346,7 +8166,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetIconIndex(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileTypeInfo_GetIconIndex(_arg0); + _result = (int )wxFileTypeInfo_GetIconIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8375,7 +8195,7 @@ static PyObject *_wrap_new_wxFileType(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)new_wxFileType(*_arg0); + _result = (wxFileType *)new_wxFileType(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8391,8 +8211,13 @@ static PyObject *_wrap_new_wxFileType(PyObject *self, PyObject *args, PyObject * static PyObject * wxFileType_GetMimeType(wxFileType *self) { wxString str; - if (self->GetMimeType(&str)) - return PyString_FromString(str.c_str()); + if (self->GetMimeType(&str)) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } @@ -8415,7 +8240,7 @@ static PyObject *_wrap_wxFileType_GetMimeType(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetMimeType(_arg0); + _result = (PyObject *)wxFileType_GetMimeType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8451,7 +8276,7 @@ static PyObject *_wrap_wxFileType_GetMimeTypes(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetMimeTypes(_arg0); + _result = (PyObject *)wxFileType_GetMimeTypes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8487,7 +8312,7 @@ static PyObject *_wrap_wxFileType_GetExtensions(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetExtensions(_arg0); + _result = (PyObject *)wxFileType_GetExtensions(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8524,7 +8349,7 @@ static PyObject *_wrap_wxFileType_GetIcon(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIcon *)wxFileType_GetIcon(_arg0); + _result = (wxIcon *)wxFileType_GetIcon(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8547,7 +8372,11 @@ static PyObject * wxFileType_GetIconInfo(wxFileType *self) { PyObject* tuple = PyTuple_New(3); PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon), "wxIcon", TRUE)); - PyTuple_SetItem(tuple, 1, PyString_FromString(iconFile.c_str())); +#if wxUSE_UNICODE + PyTuple_SetItem(tuple, 1, PyUnicode_FromUnicode(iconFile.c_str(), iconFile.Len())); +#else + PyTuple_SetItem(tuple, 1, PyString_FromStringAndSize(iconFile.c_str(), iconFile.Len())); +#endif PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex)); wxPyEndBlockThreads(); return tuple; @@ -8574,7 +8403,7 @@ static PyObject *_wrap_wxFileType_GetIconInfo(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetIconInfo(_arg0); + _result = (PyObject *)wxFileType_GetIconInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8586,9 +8415,13 @@ static PyObject *_wrap_wxFileType_GetIconInfo(PyObject *self, PyObject *args, Py static PyObject * wxFileType_GetDescription(wxFileType *self) { wxString str; - if (self->GetDescription(&str)) - return PyString_FromString(str.c_str()); - else + if (self->GetDescription(&str)) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -8610,7 +8443,7 @@ static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetDescription(_arg0); + _result = (PyObject *)wxFileType_GetDescription(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8622,9 +8455,13 @@ static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, static PyObject * wxFileType_GetOpenCommand(wxFileType *self,const wxString & filename,const wxString & mimetype) { wxString str; - if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) - return PyString_FromString(str.c_str()); - else + if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -8649,45 +8486,19 @@ static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetOpenCommand(_arg0,*_arg1,*_arg2); + _result = (PyObject *)wxFileType_GetOpenCommand(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8707,9 +8518,13 @@ static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, static PyObject * wxFileType_GetPrintCommand(wxFileType *self,const wxString & filename,const wxString & mimetype) { wxString str; - if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) - return PyString_FromString(str.c_str()); - else + if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { +#if wxUSE_UNICODE + return PyUnicode_FromUnicode(str.c_str(), str.Len()); +#else + return PyString_FromStringAndSize(str.c_str(), str.Len()); +#endif + } else RETURN_NONE(); } static PyObject *_wrap_wxFileType_GetPrintCommand(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -8734,45 +8549,19 @@ static PyObject *_wrap_wxFileType_GetPrintCommand(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetPrintCommand(_arg0,*_arg1,*_arg2); + _result = (PyObject *)wxFileType_GetPrintCommand(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8827,45 +8616,19 @@ static PyObject *_wrap_wxFileType_GetAllCommands(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFileType_GetAllCommands(_arg0,*_arg1,*_arg2); + _result = (PyObject *)wxFileType_GetAllCommands(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8908,45 +8671,19 @@ static PyObject *_wrap_wxFileType_SetCommand(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileType_SetCommand(_arg0,*_arg1,*_arg2,_arg3); + _result = (bool )wxFileType_SetCommand(_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8985,26 +8722,13 @@ static PyObject *_wrap_wxFileType_SetDefaultIcon(PyObject *self, PyObject *args, } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileType_SetDefaultIcon(_arg0,*_arg1,_arg2); + _result = (bool )wxFileType_SetDefaultIcon(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9036,7 +8760,7 @@ static PyObject *_wrap_wxFileType_Unassociate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFileType_Unassociate(_arg0); + _result = (bool )wxFileType_Unassociate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9057,22 +8781,9 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileType_ExpandCommand",_kwnames,&_obj0,&_argo1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } @@ -9083,12 +8794,16 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileType::ExpandCommand(*_arg0,*_arg1)); + _result = new wxString (wxFileType::ExpandCommand(*_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -9119,7 +8834,7 @@ static PyObject *_wrap_delete_wxFileType(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFileType(_arg0); + delete_wxFileType(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9141,44 +8856,18 @@ static PyObject *_wrap_wxMimeTypesManager_IsOfType(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_IsOfType",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager::IsOfType(*_arg0,*_arg1); + _result = (bool )wxMimeTypesManager::IsOfType(*_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9206,7 +8895,7 @@ static PyObject *_wrap_new_wxMimeTypesManager(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMimeTypesManager *)new_wxMimeTypesManager(); + _result = (wxMimeTypesManager *)new_wxMimeTypesManager(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9242,26 +8931,13 @@ static PyObject *_wrap_wxMimeTypesManager_Initialize(PyObject *self, PyObject *a } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMimeTypesManager_Initialize(_arg0,_arg1,*_arg2); + wxMimeTypesManager_Initialize(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9293,7 +8969,7 @@ static PyObject *_wrap_wxMimeTypesManager_ClearData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMimeTypesManager_ClearData(_arg0); + wxMimeTypesManager_ClearData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9324,26 +9000,13 @@ static PyObject *_wrap_wxMimeTypesManager_GetFileTypeFromExtension(PyObject *sel } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromExtension(_arg0,*_arg1); + _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromExtension(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9383,26 +9046,13 @@ static PyObject *_wrap_wxMimeTypesManager_GetFileTypeFromMimeType(PyObject *self } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromMimeType(_arg0,*_arg1); + _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromMimeType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9443,27 +9093,14 @@ static PyObject *_wrap_wxMimeTypesManager_ReadMailcap(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager_ReadMailcap(_arg0,*_arg1,_arg2); + _result = (bool )wxMimeTypesManager_ReadMailcap(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9496,26 +9133,13 @@ static PyObject *_wrap_wxMimeTypesManager_ReadMimeTypes(PyObject *self, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager_ReadMimeTypes(_arg0,*_arg1); + _result = (bool )wxMimeTypesManager_ReadMimeTypes(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9551,7 +9175,7 @@ static PyObject *_wrap_wxMimeTypesManager_EnumAllFileTypes(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxMimeTypesManager_EnumAllFileTypes(_arg0); + _result = (PyObject *)wxMimeTypesManager_EnumAllFileTypes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9589,7 +9213,7 @@ static PyObject *_wrap_wxMimeTypesManager_AddFallback(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMimeTypesManager_AddFallback(_arg0,*_arg1); + wxMimeTypesManager_AddFallback(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9628,7 +9252,7 @@ static PyObject *_wrap_wxMimeTypesManager_Associate(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileType *)wxMimeTypesManager_Associate(_arg0,*_arg1); + _result = (wxFileType *)wxMimeTypesManager_Associate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9671,7 +9295,7 @@ static PyObject *_wrap_wxMimeTypesManager_Unassociate(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMimeTypesManager_Unassociate(_arg0,_arg1); + _result = (bool )wxMimeTypesManager_Unassociate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9698,7 +9322,7 @@ static PyObject *_wrap_delete_wxMimeTypesManager(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxMimeTypesManager(_arg0); + delete_wxMimeTypesManager(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9728,7 +9352,7 @@ static PyObject *_wrap_new_wxFileHistory(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileHistory *)new_wxFileHistory(_arg0); + _result = (wxFileHistory *)new_wxFileHistory(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9761,7 +9385,7 @@ static PyObject *_wrap_delete_wxFileHistory(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFileHistory(_arg0); + delete_wxFileHistory(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9790,26 +9414,13 @@ static PyObject *_wrap_wxFileHistory_AddFileToHistory(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_AddFileToHistory(_arg0,*_arg1); + wxFileHistory_AddFileToHistory(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9842,7 +9453,7 @@ static PyObject *_wrap_wxFileHistory_RemoveFileFromHistory(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_RemoveFileFromHistory(_arg0,_arg1); + wxFileHistory_RemoveFileFromHistory(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9871,7 +9482,7 @@ static PyObject *_wrap_wxFileHistory_GetMaxFiles(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileHistory_GetMaxFiles(_arg0); + _result = (int )wxFileHistory_GetMaxFiles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9907,7 +9518,7 @@ static PyObject *_wrap_wxFileHistory_UseMenu(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_UseMenu(_arg0,_arg1); + wxFileHistory_UseMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9944,7 +9555,7 @@ static PyObject *_wrap_wxFileHistory_RemoveMenu(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_RemoveMenu(_arg0,_arg1); + wxFileHistory_RemoveMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9981,7 +9592,7 @@ static PyObject *_wrap_wxFileHistory_Load(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_Load(_arg0,*_arg1); + wxFileHistory_Load(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10018,7 +9629,7 @@ static PyObject *_wrap_wxFileHistory_Save(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_Save(_arg0,*_arg1); + wxFileHistory_Save(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10046,7 +9657,7 @@ static PyObject *_wrap_wxFileHistory_AddFilesToMenu(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_AddFilesToMenu(_arg0); + wxFileHistory_AddFilesToMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10083,7 +9694,7 @@ static PyObject *_wrap_wxFileHistory_AddFilesToSingleMenu(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileHistory_AddFilesToSingleMenu(_arg0,_arg1); + wxFileHistory_AddFilesToSingleMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10113,12 +9724,16 @@ static PyObject *_wrap_wxFileHistory_GetHistoryFile(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileHistory_GetHistoryFile(_arg0,_arg1)); + _result = new wxString (wxFileHistory_GetHistoryFile(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -10146,7 +9761,7 @@ static PyObject *_wrap_wxFileHistory_GetCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileHistory_GetCount(_arg0); + _result = (int )wxFileHistory_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10174,7 +9789,7 @@ static PyObject *_wrap_wxFileHistory_GetNoHistoryFiles(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileHistory_GetNoHistoryFiles(_arg0); + _result = (int )wxFileHistory_GetNoHistoryFiles(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index f9cb9e0ef4..2626eeb658 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - // Since this one would be tough and ugly to do with the Macros... @@ -175,7 +169,7 @@ static PyObject *_wrap_new_wxPrintData(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)new_wxPrintData(); + _result = (wxPrintData *)new_wxPrintData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -208,7 +202,7 @@ static PyObject *_wrap_delete_wxPrintData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrintData(_arg0); + delete_wxPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -237,7 +231,7 @@ static PyObject *_wrap_wxPrintData_GetNoCopies(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintData_GetNoCopies(_arg0); + _result = (int )wxPrintData_GetNoCopies(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -265,7 +259,7 @@ static PyObject *_wrap_wxPrintData_GetCollate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintData_GetCollate(_arg0); + _result = (bool )wxPrintData_GetCollate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -293,7 +287,7 @@ static PyObject *_wrap_wxPrintData_GetOrientation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintData_GetOrientation(_arg0); + _result = (int )wxPrintData_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -321,13 +315,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterName(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterName(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -352,7 +350,7 @@ static PyObject *_wrap_wxPrintData_GetColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintData_GetColour(_arg0); + _result = (bool )wxPrintData_GetColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -380,7 +378,7 @@ static PyObject *_wrap_wxPrintData_GetDuplex(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDuplexMode )wxPrintData_GetDuplex(_arg0); + _result = (wxDuplexMode )wxPrintData_GetDuplex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -408,7 +406,7 @@ static PyObject *_wrap_wxPrintData_GetPaperId(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaperSize )wxPrintData_GetPaperId(_arg0); + _result = (wxPaperSize )wxPrintData_GetPaperId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -437,7 +435,7 @@ static PyObject *_wrap_wxPrintData_GetPaperSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxSize & _result_ref = wxPrintData_GetPaperSize(_arg0); + const wxSize & _result_ref = wxPrintData_GetPaperSize(_arg0); _result = (wxSize *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -472,7 +470,7 @@ static PyObject *_wrap_wxPrintData_GetQuality(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintQuality )wxPrintData_GetQuality(_arg0); + _result = (wxPrintQuality )wxPrintData_GetQuality(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -500,7 +498,7 @@ static PyObject *_wrap_wxPrintData_SetNoCopies(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetNoCopies(_arg0,_arg1); + wxPrintData_SetNoCopies(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,7 +529,7 @@ static PyObject *_wrap_wxPrintData_SetCollate(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetCollate(_arg0,_arg1); + wxPrintData_SetCollate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -560,7 +558,7 @@ static PyObject *_wrap_wxPrintData_SetOrientation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetOrientation(_arg0,_arg1); + wxPrintData_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -589,26 +587,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterName(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterName(_arg0,*_arg1); + wxPrintData_SetPrinterName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -643,7 +628,7 @@ static PyObject *_wrap_wxPrintData_SetColour(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetColour(_arg0,_arg1); + wxPrintData_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -672,7 +657,7 @@ static PyObject *_wrap_wxPrintData_SetDuplex(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetDuplex(_arg0,_arg1); + wxPrintData_SetDuplex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -701,7 +686,7 @@ static PyObject *_wrap_wxPrintData_SetPaperId(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPaperId(_arg0,_arg1); + wxPrintData_SetPaperId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -737,7 +722,7 @@ static PyObject *_wrap_wxPrintData_SetPaperSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPaperSize(_arg0,*_arg1); + wxPrintData_SetPaperSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -766,7 +751,7 @@ static PyObject *_wrap_wxPrintData_SetQuality(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetQuality(_arg0,_arg1); + wxPrintData_SetQuality(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -795,13 +780,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterCommand(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -826,13 +815,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterOptions(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterOptions(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterOptions(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -857,13 +850,17 @@ static PyObject *_wrap_wxPrintData_GetPreviewCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPreviewCommand(_arg0); + const wxString & _result_ref = wxPrintData_GetPreviewCommand(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -888,13 +885,17 @@ static PyObject *_wrap_wxPrintData_GetFilename(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetFilename(_arg0); + const wxString & _result_ref = wxPrintData_GetFilename(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -919,13 +920,17 @@ static PyObject *_wrap_wxPrintData_GetFontMetricPath(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetFontMetricPath(_arg0); + const wxString & _result_ref = wxPrintData_GetFontMetricPath(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -950,7 +955,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterScaleX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPrintData_GetPrinterScaleX(_arg0); + _result = (double )wxPrintData_GetPrinterScaleX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -978,7 +983,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterScaleY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPrintData_GetPrinterScaleY(_arg0); + _result = (double )wxPrintData_GetPrinterScaleY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1006,7 +1011,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterTranslateX(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPrintData_GetPrinterTranslateX(_arg0); + _result = (long )wxPrintData_GetPrinterTranslateX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1034,7 +1039,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterTranslateY(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPrintData_GetPrinterTranslateY(_arg0); + _result = (long )wxPrintData_GetPrinterTranslateY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1063,7 +1068,7 @@ static PyObject *_wrap_wxPrintData_GetPrintMode(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPrintMode (wxPrintData_GetPrintMode(_arg0)); + _result = new wxPrintMode (wxPrintData_GetPrintMode(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1092,26 +1097,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterCommand(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterCommand(_arg0,*_arg1); + wxPrintData_SetPrinterCommand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1144,26 +1136,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterOptions(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterOptions(_arg0,*_arg1); + wxPrintData_SetPrinterOptions(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1196,26 +1175,13 @@ static PyObject *_wrap_wxPrintData_SetPreviewCommand(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPreviewCommand(_arg0,*_arg1); + wxPrintData_SetPreviewCommand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1248,26 +1214,13 @@ static PyObject *_wrap_wxPrintData_SetFilename(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetFilename(_arg0,*_arg1); + wxPrintData_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1300,26 +1253,13 @@ static PyObject *_wrap_wxPrintData_SetFontMetricPath(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetFontMetricPath(_arg0,*_arg1); + wxPrintData_SetFontMetricPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1292,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaleX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaleX(_arg0,_arg1); + wxPrintData_SetPrinterScaleX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1381,7 +1321,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaleY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaleY(_arg0,_arg1); + wxPrintData_SetPrinterScaleY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1351,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaling(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaling(_arg0,_arg1,_arg2); + wxPrintData_SetPrinterScaling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1440,7 +1380,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslateX(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslateX(_arg0,_arg1); + wxPrintData_SetPrinterTranslateX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1469,7 +1409,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslateY(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslateY(_arg0,_arg1); + wxPrintData_SetPrinterTranslateY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1499,7 +1439,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslation(_arg0,_arg1,_arg2); + wxPrintData_SetPrinterTranslation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1536,7 +1476,7 @@ static PyObject *_wrap_wxPrintData_SetPrintMode(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrintMode(_arg0,*_arg1); + wxPrintData_SetPrintMode(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1582,7 +1522,7 @@ static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0); + _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1616,63 +1556,24 @@ static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:new_wxPrinterDC2",_kwnames,&_obj0,&_obj1,&_obj2,&tempbool3,&_arg4)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrinterDC *)new_wxPrinterDC2(*_arg0,*_arg1,*_arg2,_arg3,_arg4); + _result = (wxPrinterDC *)new_wxPrinterDC2(*_arg0,*_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1735,7 +1636,7 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); + _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1766,22 +1667,9 @@ static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC2",_kwnames,&_obj0,&tempbool1,&_argo2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } _arg1 = (bool ) tempbool1; if (_argo2) { @@ -1793,7 +1681,7 @@ static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); + _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1832,7 +1720,7 @@ static PyObject *_wrap_wxPostScriptDC_GetPrintData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); + wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); _result = (wxPrintData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1875,7 +1763,7 @@ static PyObject *_wrap_wxPostScriptDC_SetPrintData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostScriptDC_SetPrintData(_arg0,*_arg1); + wxPostScriptDC_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1894,7 +1782,7 @@ static PyObject *_wrap_wxPostScriptDC_SetResolution(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostScriptDC::SetResolution(_arg0); + wxPostScriptDC::SetResolution(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1913,7 +1801,7 @@ static PyObject *_wrap_wxPostScriptDC_GetResolution(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPostScriptDC::GetResolution(); + _result = (int )wxPostScriptDC::GetResolution(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1941,7 +1829,7 @@ static PyObject *_wrap_new_wxPageSetupDialogData(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialogData *)new_wxPageSetupDialogData(); + _result = (wxPageSetupDialogData *)new_wxPageSetupDialogData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1974,7 +1862,7 @@ static PyObject *_wrap_delete_wxPageSetupDialogData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPageSetupDialogData(_arg0); + delete_wxPageSetupDialogData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2005,7 +1893,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableHelp(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableHelp(_arg0,_arg1); + wxPageSetupDialogData_EnableHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2036,7 +1924,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableMargins(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableMargins(_arg0,_arg1); + wxPageSetupDialogData_EnableMargins(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2067,7 +1955,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableOrientation(PyObject *self, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableOrientation(_arg0,_arg1); + wxPageSetupDialogData_EnableOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2098,7 +1986,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnablePaper(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnablePaper(_arg0,_arg1); + wxPageSetupDialogData_EnablePaper(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2129,7 +2017,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnablePrinter(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnablePrinter(_arg0,_arg1); + wxPageSetupDialogData_EnablePrinter(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2158,7 +2046,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetDefaultMinMargins(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetDefaultMinMargins(_arg0); + _result = (bool )wxPageSetupDialogData_GetDefaultMinMargins(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2186,7 +2074,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableMargins(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableMargins(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableMargins(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2214,7 +2102,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableOrientation(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableOrientation(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2242,7 +2130,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnablePaper(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnablePaper(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnablePaper(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2270,7 +2158,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnablePrinter(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnablePrinter(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnablePrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2298,7 +2186,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableHelp(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableHelp(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2326,7 +2214,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetDefaultInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetDefaultInfo(_arg0); + _result = (bool )wxPageSetupDialogData_GetDefaultInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +2243,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMarginTopLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMarginTopLeft(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMarginTopLeft(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2385,7 +2273,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMarginBottomRight(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMarginBottomRight(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMarginBottomRight(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2415,7 +2303,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMinMarginTopLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMinMarginTopLeft(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMinMarginTopLeft(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2445,7 +2333,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMinMarginBottomRight(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMinMarginBottomRight(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMinMarginBottomRight(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2474,7 +2362,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPaperId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaperSize )wxPageSetupDialogData_GetPaperId(_arg0); + _result = (wxPaperSize )wxPageSetupDialogData_GetPaperId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2503,7 +2391,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPaperSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxPageSetupDialogData_GetPaperSize(_arg0)); + _result = new wxSize (wxPageSetupDialogData_GetPaperSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2535,7 +2423,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPrintData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxPageSetupDialogData_GetPrintData(_arg0); + _result = (wxPrintData *)wxPageSetupDialogData_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2571,7 +2459,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetDefaultInfo(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetDefaultInfo(_arg0,_arg1); + wxPageSetupDialogData_SetDefaultInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2602,7 +2490,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetDefaultMinMargins(PyObject *self _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetDefaultMinMargins(_arg0,_arg1); + wxPageSetupDialogData_SetDefaultMinMargins(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2638,7 +2526,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMarginTopLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMarginTopLeft(_arg0,*_arg1); + wxPageSetupDialogData_SetMarginTopLeft(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2674,7 +2562,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMarginBottomRight(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMarginBottomRight(_arg0,*_arg1); + wxPageSetupDialogData_SetMarginBottomRight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2710,7 +2598,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginTopLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMinMarginTopLeft(_arg0,*_arg1); + wxPageSetupDialogData_SetMinMarginTopLeft(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2746,7 +2634,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMinMarginBottomRight(_arg0,*_arg1); + wxPageSetupDialogData_SetMinMarginBottomRight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2775,7 +2663,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPaperId(_arg0,_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2811,7 +2699,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPaperSize(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2848,7 +2736,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPrintData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPrintData(_arg0,*_arg1); + wxPageSetupDialogData_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2927,7 +2815,7 @@ static PyObject *_wrap_new_wxPageSetupDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); + _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2962,7 +2850,7 @@ static PyObject *_wrap_wxPageSetupDialog_GetPageSetupData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); + wxPageSetupDialogData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); _result = (wxPageSetupDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2997,7 +2885,7 @@ static PyObject *_wrap_wxPageSetupDialog_ShowModal(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPageSetupDialog_ShowModal(_arg0); + _result = (int )wxPageSetupDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3025,7 +2913,7 @@ static PyObject *_wrap_new_wxPrintDialogData(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintDialogData *)new_wxPrintDialogData(); + _result = (wxPrintDialogData *)new_wxPrintDialogData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3058,7 +2946,7 @@ static PyObject *_wrap_delete_wxPrintDialogData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrintDialogData(_arg0); + delete_wxPrintDialogData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3089,7 +2977,7 @@ static PyObject *_wrap_wxPrintDialogData_EnableHelp(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnableHelp(_arg0,_arg1); + wxPrintDialogData_EnableHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3120,7 +3008,7 @@ static PyObject *_wrap_wxPrintDialogData_EnablePageNumbers(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnablePageNumbers(_arg0,_arg1); + wxPrintDialogData_EnablePageNumbers(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3151,7 +3039,7 @@ static PyObject *_wrap_wxPrintDialogData_EnablePrintToFile(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnablePrintToFile(_arg0,_arg1); + wxPrintDialogData_EnablePrintToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3182,7 +3070,7 @@ static PyObject *_wrap_wxPrintDialogData_EnableSelection(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnableSelection(_arg0,_arg1); + wxPrintDialogData_EnableSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3211,7 +3099,7 @@ static PyObject *_wrap_wxPrintDialogData_GetAllPages(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetAllPages(_arg0); + _result = (bool )wxPrintDialogData_GetAllPages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3239,7 +3127,7 @@ static PyObject *_wrap_wxPrintDialogData_GetCollate(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetCollate(_arg0); + _result = (bool )wxPrintDialogData_GetCollate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3267,7 +3155,7 @@ static PyObject *_wrap_wxPrintDialogData_GetFromPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetFromPage(_arg0); + _result = (int )wxPrintDialogData_GetFromPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3295,7 +3183,7 @@ static PyObject *_wrap_wxPrintDialogData_GetMaxPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetMaxPage(_arg0); + _result = (int )wxPrintDialogData_GetMaxPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3323,7 +3211,7 @@ static PyObject *_wrap_wxPrintDialogData_GetMinPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetMinPage(_arg0); + _result = (int )wxPrintDialogData_GetMinPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3351,7 +3239,7 @@ static PyObject *_wrap_wxPrintDialogData_GetNoCopies(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetNoCopies(_arg0); + _result = (int )wxPrintDialogData_GetNoCopies(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3382,7 +3270,7 @@ static PyObject *_wrap_wxPrintDialogData_GetPrintData(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxPrintDialogData_GetPrintData(_arg0); + _result = (wxPrintData *)wxPrintDialogData_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3416,7 +3304,7 @@ static PyObject *_wrap_wxPrintDialogData_GetPrintToFile(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetPrintToFile(_arg0); + _result = (bool )wxPrintDialogData_GetPrintToFile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3444,7 +3332,7 @@ static PyObject *_wrap_wxPrintDialogData_GetToPage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetToPage(_arg0); + _result = (int )wxPrintDialogData_GetToPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3474,7 +3362,7 @@ static PyObject *_wrap_wxPrintDialogData_SetCollate(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetCollate(_arg0,_arg1); + wxPrintDialogData_SetCollate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3503,7 +3391,7 @@ static PyObject *_wrap_wxPrintDialogData_SetFromPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetFromPage(_arg0,_arg1); + wxPrintDialogData_SetFromPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3532,7 +3420,7 @@ static PyObject *_wrap_wxPrintDialogData_SetMaxPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetMaxPage(_arg0,_arg1); + wxPrintDialogData_SetMaxPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3561,7 +3449,7 @@ static PyObject *_wrap_wxPrintDialogData_SetMinPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetMinPage(_arg0,_arg1); + wxPrintDialogData_SetMinPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3590,7 +3478,7 @@ static PyObject *_wrap_wxPrintDialogData_SetNoCopies(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetNoCopies(_arg0,_arg1); + wxPrintDialogData_SetNoCopies(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3627,7 +3515,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintData(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetPrintData(_arg0,*_arg1); + wxPrintDialogData_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3658,7 +3546,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintToFile(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetPrintToFile(_arg0,_arg1); + wxPrintDialogData_SetPrintToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3689,7 +3577,7 @@ static PyObject *_wrap_wxPrintDialogData_SetSetupDialog(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetSetupDialog(_arg0,_arg1); + wxPrintDialogData_SetSetupDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3718,7 +3606,7 @@ static PyObject *_wrap_wxPrintDialogData_SetToPage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetToPage(_arg0,_arg1); + wxPrintDialogData_SetToPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3797,7 +3685,7 @@ static PyObject *_wrap_new_wxPrintDialog(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); + _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3832,7 +3720,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDialogData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrintDialog_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrintDialog_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3867,7 +3755,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDC(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); + _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3895,7 +3783,7 @@ static PyObject *_wrap_wxPrintDialog_ShowModal(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialog_ShowModal(_arg0); + _result = (int )wxPrintDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3924,7 +3812,7 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)new_wxPrintout(_arg0); + _result = (wxPyPrintout *)new_wxPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3967,7 +3855,7 @@ static PyObject *_wrap_wxPrintout__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); + wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3995,7 +3883,7 @@ static PyObject *_wrap_wxPrintout_Destroy(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPrintout_Destroy(_arg0); + wxPyPrintout_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4024,7 +3912,7 @@ static PyObject *_wrap_wxPrintout_GetDC(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrintout_GetDC(_arg0); + _result = (wxDC *)wxPrintout_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4061,7 +3949,7 @@ static PyObject *_wrap_wxPrintout_GetPageSizeMM(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPageSizeMM(_arg0,_arg1,_arg2); + wxPrintout_GetPageSizeMM(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4109,7 +3997,7 @@ static PyObject *_wrap_wxPrintout_GetPageSizePixels(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPageSizePixels(_arg0,_arg1,_arg2); + wxPrintout_GetPageSizePixels(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4157,7 +4045,7 @@ static PyObject *_wrap_wxPrintout_GetPPIPrinter(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPPIPrinter(_arg0,_arg1,_arg2); + wxPrintout_GetPPIPrinter(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4205,7 +4093,7 @@ static PyObject *_wrap_wxPrintout_GetPPIScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPPIScreen(_arg0,_arg1,_arg2); + wxPrintout_GetPPIScreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4244,7 +4132,7 @@ static PyObject *_wrap_wxPrintout_IsPreview(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_IsPreview(_arg0); + _result = (bool )wxPrintout_IsPreview(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4274,7 +4162,7 @@ static PyObject *_wrap_wxPrintout_base_OnBeginDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_base_OnBeginDocument(_arg0,_arg1,_arg2); + _result = (bool )wxPrintout_base_OnBeginDocument(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4301,7 +4189,7 @@ static PyObject *_wrap_wxPrintout_base_OnEndDocument(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnEndDocument(_arg0); + wxPrintout_base_OnEndDocument(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4329,7 +4217,7 @@ static PyObject *_wrap_wxPrintout_base_OnBeginPrinting(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnBeginPrinting(_arg0); + wxPrintout_base_OnBeginPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4357,7 +4245,7 @@ static PyObject *_wrap_wxPrintout_base_OnEndPrinting(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnEndPrinting(_arg0); + wxPrintout_base_OnEndPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4385,7 +4273,7 @@ static PyObject *_wrap_wxPrintout_base_OnPreparePrinting(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnPreparePrinting(_arg0); + wxPrintout_base_OnPreparePrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4433,7 +4321,7 @@ static PyObject *_wrap_wxPrintout_base_GetPageInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_GetPageInfo(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPrintout_base_GetPageInfo(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4483,7 +4371,7 @@ static PyObject *_wrap_wxPrintout_base_HasPage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_base_HasPage(_arg0,_arg1); + _result = (bool )wxPrintout_base_HasPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4520,7 +4408,7 @@ static PyObject *_wrap_new_wxPrinter(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrinter *)new_wxPrinter(_arg0); + _result = (wxPrinter *)new_wxPrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4553,7 +4441,7 @@ static PyObject *_wrap_delete_wxPrinter(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrinter(_arg0); + delete_wxPrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4599,7 +4487,7 @@ static PyObject *_wrap_wxPrinter_CreateAbortWindow(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrinter_CreateAbortWindow(_arg0,_arg1,_arg2); + wxPrinter_CreateAbortWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4629,7 +4517,7 @@ static PyObject *_wrap_wxPrinter_GetPrintDialogData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrinter_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrinter_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4683,7 +4571,7 @@ static PyObject *_wrap_wxPrinter_Print(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrinter_Print(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxPrinter_Print(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4720,7 +4608,7 @@ static PyObject *_wrap_wxPrinter_PrintDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); + _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4766,7 +4654,7 @@ static PyObject *_wrap_wxPrinter_ReportError(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrinter_ReportError(_arg0,_arg1,_arg2,_arg3); + wxPrinter_ReportError(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4804,7 +4692,7 @@ static PyObject *_wrap_wxPrinter_Setup(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrinter_Setup(_arg0,_arg1); + _result = (bool )wxPrinter_Setup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4859,7 +4747,7 @@ static PyObject *_wrap_new_wxPrintPreview(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintPreview *)new_wxPrintPreview(_arg0,_arg1,_arg2); + _result = (wxPrintPreview *)new_wxPrintPreview(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4893,7 +4781,7 @@ static PyObject *_wrap_wxPrintPreview_GetCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); + _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4921,7 +4809,7 @@ static PyObject *_wrap_wxPrintPreview_GetCurrentPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetCurrentPage(_arg0); + _result = (int )wxPrintPreview_GetCurrentPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4949,7 +4837,7 @@ static PyObject *_wrap_wxPrintPreview_GetFrame(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); + _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4977,7 +4865,7 @@ static PyObject *_wrap_wxPrintPreview_GetMaxPage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetMaxPage(_arg0); + _result = (int )wxPrintPreview_GetMaxPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5005,7 +4893,7 @@ static PyObject *_wrap_wxPrintPreview_GetMinPage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetMinPage(_arg0); + _result = (int )wxPrintPreview_GetMinPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5034,7 +4922,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintDialogData(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrintPreview_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrintPreview_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5069,7 +4957,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintout(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); + _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5097,7 +4985,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintoutForPrinting(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); + _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5125,7 +5013,7 @@ static PyObject *_wrap_wxPrintPreview_GetZoom(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetZoom(_arg0); + _result = (int )wxPrintPreview_GetZoom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5153,7 +5041,7 @@ static PyObject *_wrap_wxPrintPreview_Ok(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintPreview_Ok(_arg0); + _result = (bool )wxPrintPreview_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5184,7 +5072,7 @@ static PyObject *_wrap_wxPrintPreview_Print(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintPreview_Print(_arg0,_arg1); + _result = (bool )wxPrintPreview_Print(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5220,7 +5108,7 @@ static PyObject *_wrap_wxPrintPreview_SetCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetCanvas(_arg0,_arg1); + wxPrintPreview_SetCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5249,7 +5137,7 @@ static PyObject *_wrap_wxPrintPreview_SetCurrentPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetCurrentPage(_arg0,_arg1); + wxPrintPreview_SetCurrentPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5286,7 +5174,7 @@ static PyObject *_wrap_wxPrintPreview_SetFrame(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetFrame(_arg0,_arg1); + wxPrintPreview_SetFrame(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5323,7 +5211,7 @@ static PyObject *_wrap_wxPrintPreview_SetPrintout(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetPrintout(_arg0,_arg1); + wxPrintPreview_SetPrintout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5352,7 +5240,7 @@ static PyObject *_wrap_wxPrintPreview_SetZoom(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetZoom(_arg0,_arg1); + wxPrintPreview_SetZoom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5440,22 +5328,9 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -5471,7 +5346,7 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPreviewFrame *)new_wxPreviewFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxPreviewFrame *)new_wxPreviewFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5508,7 +5383,7 @@ static PyObject *_wrap_wxPreviewFrame_Initialize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPreviewFrame_Initialize(_arg0); + wxPreviewFrame_Initialize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index 83224a09b0..5bddf40caf 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPySizer : public wxSizer { DECLARE_DYNAMIC_CLASS(wxPySizer); public: @@ -137,7 +131,7 @@ static PyObject *_wrap_wxSizerItem_DeleteWindows(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_DeleteWindows(_arg0); + wxSizerItem_DeleteWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -167,7 +161,7 @@ static PyObject *_wrap_wxSizerItem_GetPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); + _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -197,7 +191,7 @@ static PyObject *_wrap_wxSizerItem_GetSize(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizerItem_GetSize(_arg0)); + _result = new wxSize (wxSizerItem_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -227,7 +221,7 @@ static PyObject *_wrap_wxSizerItem_CalcMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizerItem_CalcMin(_arg0)); + _result = new wxSize (wxSizerItem_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -271,7 +265,7 @@ static PyObject *_wrap_wxSizerItem_SetDimension(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetDimension(_arg0,*_arg1,*_arg2); + wxSizerItem_SetDimension(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -301,7 +295,7 @@ static PyObject *_wrap_wxSizerItem_SetRatioWH(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetRatioWH(_arg0,_arg1,_arg2); + wxSizerItem_SetRatioWH(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -337,7 +331,7 @@ static PyObject *_wrap_wxSizerItem_SetRatioSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetRatioSize(_arg0,*_arg1); + wxSizerItem_SetRatioSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -366,7 +360,7 @@ static PyObject *_wrap_wxSizerItem_SetRatio(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetRatio(_arg0,_arg1); + wxSizerItem_SetRatio(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -395,7 +389,7 @@ static PyObject *_wrap_wxSizerItem_GetRatio(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (float )wxSizerItem_GetRatio(_arg0); + _result = (float )wxSizerItem_GetRatio(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -423,7 +417,7 @@ static PyObject *_wrap_wxSizerItem_IsWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizerItem_IsWindow(_arg0); + _result = (bool )wxSizerItem_IsWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -451,7 +445,7 @@ static PyObject *_wrap_wxSizerItem_IsSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizerItem_IsSizer(_arg0); + _result = (bool )wxSizerItem_IsSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,7 +473,7 @@ static PyObject *_wrap_wxSizerItem_IsSpacer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizerItem_IsSpacer(_arg0); + _result = (bool )wxSizerItem_IsSpacer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -507,7 +501,7 @@ static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); + _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -543,7 +537,7 @@ static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetWindow(_arg0,_arg1); + wxSizerItem_SetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -572,7 +566,7 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); + _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -608,7 +602,7 @@ static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetSizer(_arg0,_arg1); + wxSizerItem_SetSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -637,7 +631,7 @@ static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetOption(_arg0); + _result = (int )wxSizerItem_GetOption(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -665,7 +659,7 @@ static PyObject *_wrap_wxSizerItem_GetFlag(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetFlag(_arg0); + _result = (int )wxSizerItem_GetFlag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -693,7 +687,7 @@ static PyObject *_wrap_wxSizerItem_GetBorder(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetBorder(_arg0); + _result = (int )wxSizerItem_GetBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -722,7 +716,7 @@ static PyObject *_wrap_wxSizerItem_SetInitSize(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetInitSize(_arg0,_arg1,_arg2); + wxSizerItem_SetInitSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -751,7 +745,7 @@ static PyObject *_wrap_wxSizerItem_SetOption(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetOption(_arg0,_arg1); + wxSizerItem_SetOption(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -780,7 +774,7 @@ static PyObject *_wrap_wxSizerItem_SetFlag(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetFlag(_arg0,_arg1); + wxSizerItem_SetFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -809,7 +803,7 @@ static PyObject *_wrap_wxSizerItem_SetBorder(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetBorder(_arg0,_arg1); + wxSizerItem_SetBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -847,7 +841,7 @@ static PyObject *_wrap_wxSizerItem_GetUserData(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSizerItem_GetUserData(_arg0); + _result = (PyObject *)wxSizerItem_GetUserData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -891,7 +885,7 @@ static PyObject *_wrap_wxSizer__setOORInfo(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer__setOORInfo(_arg0,_arg1); + wxSizer__setOORInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -919,7 +913,7 @@ static PyObject *_wrap_wxSizer_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Destroy(_arg0); + wxSizer_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -969,7 +963,7 @@ static PyObject *_wrap_wxSizer_AddWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_AddWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_AddWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1019,7 +1013,7 @@ static PyObject *_wrap_wxSizer_AddSizer(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_AddSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_AddSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1062,7 +1056,7 @@ static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_AddSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_AddSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1113,7 +1107,7 @@ static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_InsertWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_InsertWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1164,7 +1158,7 @@ static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_InsertSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_InsertSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1208,7 +1202,7 @@ static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_InsertSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxSizer_InsertSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1258,7 +1252,7 @@ static PyObject *_wrap_wxSizer_PrependWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_PrependWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_PrependWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1308,7 +1302,7 @@ static PyObject *_wrap_wxSizer_PrependSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_PrependSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxSizer_PrependSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1351,7 +1345,7 @@ static PyObject *_wrap_wxSizer_PrependSpacer(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_PrependSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxSizer_PrependSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1389,7 +1383,7 @@ static PyObject *_wrap_wxSizer_RemoveWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizer_RemoveWindow(_arg0,_arg1); + _result = (bool )wxSizer_RemoveWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1426,7 +1420,7 @@ static PyObject *_wrap_wxSizer_RemoveSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizer_RemoveSizer(_arg0,_arg1); + _result = (bool )wxSizer_RemoveSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1455,7 +1449,7 @@ static PyObject *_wrap_wxSizer_RemovePos(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSizer_RemovePos(_arg0,_arg1); + _result = (bool )wxSizer_RemovePos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1486,7 +1480,7 @@ static PyObject *_wrap_wxSizer_SetDimension(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetDimension(_arg0,_arg1,_arg2,_arg3,_arg4); + wxSizer_SetDimension(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1522,7 +1516,7 @@ static PyObject *_wrap_wxSizer_SetMinSize(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetMinSize(_arg0,*_arg1); + wxSizer_SetMinSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1561,7 +1555,7 @@ static PyObject *_wrap_wxSizer_SetItemMinSizeWindow(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); + wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1600,7 +1594,7 @@ static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); + wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1631,7 +1625,7 @@ static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); + wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1661,7 +1655,7 @@ static PyObject *_wrap_wxSizer_GetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizer_GetSize(_arg0)); + _result = new wxSize (wxSizer_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1691,7 +1685,7 @@ static PyObject *_wrap_wxSizer_GetPosition(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxSizer_GetPosition(_arg0)); + _result = new wxPoint (wxSizer_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1721,7 +1715,7 @@ static PyObject *_wrap_wxSizer_GetMinSize(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizer_GetMinSize(_arg0)); + _result = new wxSize (wxSizer_GetMinSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1749,7 +1743,7 @@ static PyObject *_wrap_wxSizer_Layout(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Layout(_arg0); + wxSizer_Layout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1786,7 +1780,7 @@ static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Fit(_arg0,_arg1); + wxSizer_Fit(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1823,7 +1817,7 @@ static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetSizeHints(_arg0,_arg1); + wxSizer_SetSizeHints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1854,7 +1848,7 @@ static PyObject *_wrap_wxSizer_Clear(PyObject *self, PyObject *args, PyObject *k _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Clear(_arg0,_arg1); + wxSizer_Clear(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1882,7 +1876,7 @@ static PyObject *_wrap_wxSizer_DeleteWindows(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_DeleteWindows(_arg0); + wxSizer_DeleteWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1914,7 +1908,7 @@ static PyObject *_wrap_wxSizer_GetChildren(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSizer_GetChildren(_arg0); + _result = (PyObject *)wxSizer_GetChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1952,7 +1946,7 @@ static PyObject *_wrap_new_wxPySizer(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPySizer *)new_wxPySizer(); + _result = (wxPySizer *)new_wxPySizer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1995,7 +1989,7 @@ static PyObject *_wrap_wxPySizer__setCallbackInfo(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPySizer__setCallbackInfo(_arg0,_arg1,_arg2); + wxPySizer__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2033,7 +2027,7 @@ static PyObject *_wrap_new_wxBoxSizer(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBoxSizer *)new_wxBoxSizer(_arg0); + _result = (wxBoxSizer *)new_wxBoxSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2067,7 +2061,7 @@ static PyObject *_wrap_wxBoxSizer_GetOrientation(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBoxSizer_GetOrientation(_arg0); + _result = (int )wxBoxSizer_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2094,7 +2088,7 @@ static PyObject *_wrap_wxBoxSizer_RecalcSizes(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBoxSizer_RecalcSizes(_arg0); + wxBoxSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2124,7 +2118,7 @@ static PyObject *_wrap_wxBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxBoxSizer_CalcMin(_arg0)); + _result = new wxSize (wxBoxSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2179,7 +2173,7 @@ static PyObject *_wrap_new_wxStaticBoxSizer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBoxSizer *)new_wxStaticBoxSizer(_arg0,_arg1); + _result = (wxStaticBoxSizer *)new_wxStaticBoxSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2213,7 +2207,7 @@ static PyObject *_wrap_wxStaticBoxSizer_GetStaticBox(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)wxStaticBoxSizer_GetStaticBox(_arg0); + _result = (wxStaticBox *)wxStaticBoxSizer_GetStaticBox(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2240,7 +2234,7 @@ static PyObject *_wrap_wxStaticBoxSizer_RecalcSizes(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBoxSizer_RecalcSizes(_arg0); + wxStaticBoxSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2270,7 +2264,7 @@ static PyObject *_wrap_wxStaticBoxSizer_CalcMin(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxStaticBoxSizer_CalcMin(_arg0)); + _result = new wxSize (wxStaticBoxSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2316,7 +2310,7 @@ static PyObject *_wrap_new_wxNotebookSizer(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebookSizer *)new_wxNotebookSizer(_arg0); + _result = (wxNotebookSizer *)new_wxNotebookSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2349,7 +2343,7 @@ static PyObject *_wrap_wxNotebookSizer_RecalcSizes(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookSizer_RecalcSizes(_arg0); + wxNotebookSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2379,7 +2373,7 @@ static PyObject *_wrap_wxNotebookSizer_CalcMin(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxNotebookSizer_CalcMin(_arg0)); + _result = new wxSize (wxNotebookSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2408,7 +2402,7 @@ static PyObject *_wrap_wxNotebookSizer_GetNotebook(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); + _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2448,7 +2442,7 @@ static PyObject *_wrap_new_wxGridSizer(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGridSizer *)new_wxGridSizer(_arg0,_arg1,_arg2,_arg3); + _result = (wxGridSizer *)new_wxGridSizer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2481,7 +2475,7 @@ static PyObject *_wrap_wxGridSizer_RecalcSizes(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_RecalcSizes(_arg0); + wxGridSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2511,7 +2505,7 @@ static PyObject *_wrap_wxGridSizer_CalcMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxGridSizer_CalcMin(_arg0)); + _result = new wxSize (wxGridSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2540,7 +2534,7 @@ static PyObject *_wrap_wxGridSizer_SetCols(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetCols(_arg0,_arg1); + wxGridSizer_SetCols(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2569,7 +2563,7 @@ static PyObject *_wrap_wxGridSizer_SetRows(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetRows(_arg0,_arg1); + wxGridSizer_SetRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2598,7 +2592,7 @@ static PyObject *_wrap_wxGridSizer_SetVGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetVGap(_arg0,_arg1); + wxGridSizer_SetVGap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2627,7 +2621,7 @@ static PyObject *_wrap_wxGridSizer_SetHGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGridSizer_SetHGap(_arg0,_arg1); + wxGridSizer_SetHGap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2656,7 +2650,7 @@ static PyObject *_wrap_wxGridSizer_GetCols(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetCols(_arg0); + _result = (int )wxGridSizer_GetCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2684,7 +2678,7 @@ static PyObject *_wrap_wxGridSizer_GetRows(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetRows(_arg0); + _result = (int )wxGridSizer_GetRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2712,7 +2706,7 @@ static PyObject *_wrap_wxGridSizer_GetVGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetVGap(_arg0); + _result = (int )wxGridSizer_GetVGap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2740,7 +2734,7 @@ static PyObject *_wrap_wxGridSizer_GetHGap(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGridSizer_GetHGap(_arg0); + _result = (int )wxGridSizer_GetHGap(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2788,7 +2782,7 @@ static PyObject *_wrap_new_wxFlexGridSizer(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFlexGridSizer *)new_wxFlexGridSizer(_arg0,_arg1,_arg2,_arg3); + _result = (wxFlexGridSizer *)new_wxFlexGridSizer(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2821,7 +2815,7 @@ static PyObject *_wrap_wxFlexGridSizer_RecalcSizes(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_RecalcSizes(_arg0); + wxFlexGridSizer_RecalcSizes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2851,7 +2845,7 @@ static PyObject *_wrap_wxFlexGridSizer_CalcMin(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxFlexGridSizer_CalcMin(_arg0)); + _result = new wxSize (wxFlexGridSizer_CalcMin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2880,7 +2874,7 @@ static PyObject *_wrap_wxFlexGridSizer_AddGrowableRow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); + wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +2903,7 @@ static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableRow(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_RemoveGrowableRow(_arg0,_arg1); + wxFlexGridSizer_RemoveGrowableRow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2938,7 +2932,7 @@ static PyObject *_wrap_wxFlexGridSizer_AddGrowableCol(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); + wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2967,7 +2961,7 @@ static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableCol(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_RemoveGrowableCol(_arg0,_arg1); + wxFlexGridSizer_RemoveGrowableCol(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index 9a5570d883..a964a81950 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -85,12 +85,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -142,7 +136,7 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)new_wxStatusBar(_arg0,_arg1,_arg2,_arg3); + _result = (wxStatusBar *)new_wxStatusBar(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -168,7 +162,7 @@ static PyObject *_wrap_new_wxPreStatusBar(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStatusBar *)new_wxPreStatusBar(); + _result = (wxStatusBar *)new_wxPreStatusBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -214,7 +208,7 @@ static PyObject *_wrap_wxStatusBar_Create(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStatusBar_Create(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxStatusBar_Create(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -248,7 +242,7 @@ static PyObject *_wrap_wxStatusBar_GetFieldRect(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)wxStatusBar_GetFieldRect(_arg0,_arg1); + _result = (wxRect *)wxStatusBar_GetFieldRect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -282,7 +276,7 @@ static PyObject *_wrap_wxStatusBar_GetFieldsCount(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStatusBar_GetFieldsCount(_arg0); + _result = (int )wxStatusBar_GetFieldsCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -311,12 +305,16 @@ static PyObject *_wrap_wxStatusBar_GetStatusText(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStatusBar_GetStatusText(_arg0,_arg1)); + _result = new wxString (wxStatusBar_GetStatusText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -344,7 +342,7 @@ static PyObject *_wrap_wxStatusBar_GetBorderX(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStatusBar_GetBorderX(_arg0); + _result = (int )wxStatusBar_GetBorderX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -372,7 +370,7 @@ static PyObject *_wrap_wxStatusBar_GetBorderY(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxStatusBar_GetBorderY(_arg0); + _result = (int )wxStatusBar_GetBorderY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -400,7 +398,7 @@ static PyObject *_wrap_wxStatusBar_SetFieldsCount(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetFieldsCount(_arg0,_arg1); + wxStatusBar_SetFieldsCount(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -430,26 +428,13 @@ static PyObject *_wrap_wxStatusBar_SetStatusText(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetStatusText(_arg0,*_arg1,_arg2); + wxStatusBar_SetStatusText(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -499,7 +484,7 @@ static PyObject *_wrap_wxStatusBar_SetStatusWidths(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetStatusWidths(_arg0,_arg1,_arg2); + wxStatusBar_SetStatusWidths(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,7 +516,7 @@ static PyObject *_wrap_wxStatusBar_SetMinHeight(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStatusBar_SetMinHeight(_arg0,_arg1); + wxStatusBar_SetMinHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -567,7 +552,7 @@ static PyObject *_wrap_wxToolBarToolBase_Destroy(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Destroy(_arg0); + wxToolBarToolBase_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -596,7 +581,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetId(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_GetId(_arg0); + _result = (int )wxToolBarToolBase_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -624,7 +609,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetControl(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)wxToolBarToolBase_GetControl(_arg0); + _result = (wxControl *)wxToolBarToolBase_GetControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -652,7 +637,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetToolBar(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarBase *)wxToolBarToolBase_GetToolBar(_arg0); + _result = (wxToolBarBase *)wxToolBarToolBase_GetToolBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -680,7 +665,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsButton(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_IsButton(_arg0); + _result = (int )wxToolBarToolBase_IsButton(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -708,7 +693,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_IsControl(_arg0); + _result = (int )wxToolBarToolBase_IsControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -736,7 +721,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsSeparator(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_IsSeparator(_arg0); + _result = (int )wxToolBarToolBase_IsSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -764,7 +749,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarToolBase_GetStyle(_arg0); + _result = (int )wxToolBarToolBase_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -792,7 +777,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsEnabled(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_IsEnabled(_arg0); + _result = (bool )wxToolBarToolBase_IsEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -820,7 +805,7 @@ static PyObject *_wrap_wxToolBarToolBase_IsToggled(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_IsToggled(_arg0); + _result = (bool )wxToolBarToolBase_IsToggled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -848,7 +833,7 @@ static PyObject *_wrap_wxToolBarToolBase_CanBeToggled(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_CanBeToggled(_arg0); + _result = (bool )wxToolBarToolBase_CanBeToggled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -877,7 +862,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetNormalBitmap(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxBitmap & _result_ref = wxToolBarToolBase_GetNormalBitmap(_arg0); + const wxBitmap & _result_ref = wxToolBarToolBase_GetNormalBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -913,7 +898,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetDisabledBitmap(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxBitmap & _result_ref = wxToolBarToolBase_GetDisabledBitmap(_arg0); + const wxBitmap & _result_ref = wxToolBarToolBase_GetDisabledBitmap(_arg0); _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -949,7 +934,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxToolBarToolBase_GetBitmap(_arg0)); + _result = new wxBitmap (wxToolBarToolBase_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -978,12 +963,16 @@ static PyObject *_wrap_wxToolBarToolBase_GetLabel(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarToolBase_GetLabel(_arg0)); + _result = new wxString (wxToolBarToolBase_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1011,12 +1000,16 @@ static PyObject *_wrap_wxToolBarToolBase_GetShortHelp(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarToolBase_GetShortHelp(_arg0)); + _result = new wxString (wxToolBarToolBase_GetShortHelp(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1044,12 +1037,16 @@ static PyObject *_wrap_wxToolBarToolBase_GetLongHelp(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarToolBase_GetLongHelp(_arg0)); + _result = new wxString (wxToolBarToolBase_GetLongHelp(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1080,7 +1077,7 @@ static PyObject *_wrap_wxToolBarToolBase_Enable(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_Enable(_arg0,_arg1); + _result = (bool )wxToolBarToolBase_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1107,7 +1104,7 @@ static PyObject *_wrap_wxToolBarToolBase_Toggle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Toggle(_arg0); + wxToolBarToolBase_Toggle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1139,7 +1136,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetToggle(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_SetToggle(_arg0,_arg1); + _result = (bool )wxToolBarToolBase_SetToggle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1168,26 +1165,13 @@ static PyObject *_wrap_wxToolBarToolBase_SetShortHelp(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_SetShortHelp(_arg0,*_arg1); + _result = (bool )wxToolBarToolBase_SetShortHelp(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1220,26 +1204,13 @@ static PyObject *_wrap_wxToolBarToolBase_SetLongHelp(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_SetLongHelp(_arg0,*_arg1); + _result = (bool )wxToolBarToolBase_SetLongHelp(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1279,7 +1250,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetNormalBitmap(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetNormalBitmap(_arg0,*_arg1); + wxToolBarToolBase_SetNormalBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1316,7 +1287,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetDisabledBitmap(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetDisabledBitmap(_arg0,*_arg1); + wxToolBarToolBase_SetDisabledBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1345,26 +1316,13 @@ static PyObject *_wrap_wxToolBarToolBase_SetLabel(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetLabel(_arg0,*_arg1); + wxToolBarToolBase_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1396,7 +1354,7 @@ static PyObject *_wrap_wxToolBarToolBase_Detach(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Detach(_arg0); + wxToolBarToolBase_Detach(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1433,7 +1391,7 @@ static PyObject *_wrap_wxToolBarToolBase_Attach(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_Attach(_arg0,_arg1); + wxToolBarToolBase_Attach(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1471,7 +1429,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxToolBarToolBase_GetClientData(_arg0); + _result = (PyObject *)wxToolBarToolBase_GetClientData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1507,7 +1465,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetClientData(_arg0,_arg1); + wxToolBarToolBase_SetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1604,45 +1562,19 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO } if (_obj6) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg6 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); -#endif } if (_obj7) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg7 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) return NULL; - } - _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddTool(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,*_arg6,*_arg7); + _result = (wxToolBarToolBase *)wxToolBarBase_AddTool(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1696,45 +1628,19 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg4 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) return NULL; - } - _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddSimpleTool(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5); + _result = (wxToolBarToolBase *)wxToolBarBase_AddSimpleTool(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1807,45 +1713,19 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, } if (_obj7) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg7 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) return NULL; - } - _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); -#endif } if (_obj8) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg8 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj8)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) return NULL; - } - _arg8 = new wxString(PyString_AS_STRING(_obj8), PyString_GET_SIZE(_obj8)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,*_arg7,*_arg8); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1900,45 +1780,19 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * } if (_obj4) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg4 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) return NULL; - } - _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); -#endif } if (_obj5) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj5) && !PyUnicode_Check(_obj5)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj5, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg5 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj5)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) return NULL; - } - _arg5 = new wxString(PyString_AS_STRING(_obj5), PyString_GET_SIZE(_obj5)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertSimpleTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertSimpleTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1983,7 +1837,7 @@ static PyObject *_wrap_wxToolBarBase_AddControl(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddControl(_arg0,_arg1); + _result = (wxToolBarToolBase *)wxToolBarBase_AddControl(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2021,7 +1875,7 @@ static PyObject *_wrap_wxToolBarBase_InsertControl(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertControl(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertControl(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2049,7 +1903,7 @@ static PyObject *_wrap_wxToolBarBase_AddSeparator(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_AddSeparator(_arg0); + _result = (wxToolBarToolBase *)wxToolBarBase_AddSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2078,7 +1932,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSeparator(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertSeparator(_arg0,_arg1); + _result = (wxToolBarToolBase *)wxToolBarBase_InsertSeparator(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2107,7 +1961,7 @@ static PyObject *_wrap_wxToolBarBase_RemoveTool(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_RemoveTool(_arg0,_arg1); + _result = (wxToolBarToolBase *)wxToolBarBase_RemoveTool(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2136,7 +1990,7 @@ static PyObject *_wrap_wxToolBarBase_DeleteToolByPos(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_DeleteToolByPos(_arg0,_arg1); + _result = (bool )wxToolBarBase_DeleteToolByPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2165,7 +2019,7 @@ static PyObject *_wrap_wxToolBarBase_DeleteTool(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_DeleteTool(_arg0,_arg1); + _result = (bool )wxToolBarBase_DeleteTool(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2192,7 +2046,7 @@ static PyObject *_wrap_wxToolBarBase_ClearTools(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_ClearTools(_arg0); + wxToolBarBase_ClearTools(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2221,7 +2075,7 @@ static PyObject *_wrap_wxToolBarBase_Realize(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_Realize(_arg0); + _result = (bool )wxToolBarBase_Realize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2252,7 +2106,7 @@ static PyObject *_wrap_wxToolBarBase_EnableTool(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_EnableTool(_arg0,_arg1,_arg2); + wxToolBarBase_EnableTool(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2284,7 +2138,7 @@ static PyObject *_wrap_wxToolBarBase_ToggleTool(PyObject *self, PyObject *args, _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_ToggleTool(_arg0,_arg1,_arg2); + wxToolBarBase_ToggleTool(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2316,7 +2170,7 @@ static PyObject *_wrap_wxToolBarBase_SetToggle(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToggle(_arg0,_arg1,_arg2); + wxToolBarBase_SetToggle(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +2209,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxToolBarBase_GetToolClientData(_arg0,_arg1); + _result = (PyObject *)wxToolBarBase_GetToolClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2392,7 +2246,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolClientData(_arg0,_arg1,_arg2); + wxToolBarBase_SetToolClientData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2422,7 +2276,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolState(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_GetToolState(_arg0,_arg1); + _result = (bool )wxToolBarBase_GetToolState(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2451,7 +2305,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolEnabled(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_GetToolEnabled(_arg0,_arg1); + _result = (bool )wxToolBarBase_GetToolEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2480,26 +2334,13 @@ static PyObject *_wrap_wxToolBarBase_SetToolShortHelp(PyObject *self, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolShortHelp(_arg0,_arg1,*_arg2); + wxToolBarBase_SetToolShortHelp(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2533,12 +2374,16 @@ static PyObject *_wrap_wxToolBarBase_GetToolShortHelp(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarBase_GetToolShortHelp(_arg0,_arg1)); + _result = new wxString (wxToolBarBase_GetToolShortHelp(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2567,26 +2412,13 @@ static PyObject *_wrap_wxToolBarBase_SetToolLongHelp(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolLongHelp(_arg0,_arg1,*_arg2); + wxToolBarBase_SetToolLongHelp(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2620,12 +2452,16 @@ static PyObject *_wrap_wxToolBarBase_GetToolLongHelp(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxToolBarBase_GetToolLongHelp(_arg0,_arg1)); + _result = new wxString (wxToolBarBase_GetToolLongHelp(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2654,7 +2490,7 @@ static PyObject *_wrap_wxToolBarBase_SetMarginsXY(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetMarginsXY(_arg0,_arg1,_arg2); + wxToolBarBase_SetMarginsXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2690,7 +2526,7 @@ static PyObject *_wrap_wxToolBarBase_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetMargins(_arg0,*_arg1); + wxToolBarBase_SetMargins(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2719,7 +2555,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolPacking(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolPacking(_arg0,_arg1); + wxToolBarBase_SetToolPacking(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2748,7 +2584,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolSeparation(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolSeparation(_arg0,_arg1); + wxToolBarBase_SetToolSeparation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2778,7 +2614,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolMargins(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetToolMargins(_arg0)); + _result = new wxSize (wxToolBarBase_GetToolMargins(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2808,7 +2644,7 @@ static PyObject *_wrap_wxToolBarBase_GetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetMargins(_arg0)); + _result = new wxSize (wxToolBarBase_GetMargins(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2837,7 +2673,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolPacking(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetToolPacking(_arg0); + _result = (int )wxToolBarBase_GetToolPacking(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2865,7 +2701,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolSeparation(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetToolSeparation(_arg0); + _result = (int )wxToolBarBase_GetToolSeparation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2893,7 +2729,7 @@ static PyObject *_wrap_wxToolBarBase_SetRows(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetRows(_arg0,_arg1); + wxToolBarBase_SetRows(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2923,7 +2759,7 @@ static PyObject *_wrap_wxToolBarBase_SetMaxRowsCols(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetMaxRowsCols(_arg0,_arg1,_arg2); + wxToolBarBase_SetMaxRowsCols(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2952,7 +2788,7 @@ static PyObject *_wrap_wxToolBarBase_GetMaxRows(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetMaxRows(_arg0); + _result = (int )wxToolBarBase_GetMaxRows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2980,7 +2816,7 @@ static PyObject *_wrap_wxToolBarBase_GetMaxCols(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxToolBarBase_GetMaxCols(_arg0); + _result = (int )wxToolBarBase_GetMaxCols(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3015,7 +2851,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolBitmapSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarBase_SetToolBitmapSize(_arg0,*_arg1); + wxToolBarBase_SetToolBitmapSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3045,7 +2881,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolBitmapSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetToolBitmapSize(_arg0)); + _result = new wxSize (wxToolBarBase_GetToolBitmapSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3075,7 +2911,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxToolBarBase_GetToolSize(_arg0)); + _result = new wxSize (wxToolBarBase_GetToolSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3106,7 +2942,7 @@ static PyObject *_wrap_wxToolBarBase_FindToolForPosition(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_FindToolForPosition(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBarBase_FindToolForPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3134,7 +2970,7 @@ static PyObject *_wrap_wxToolBarBase_IsVertical(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarBase_IsVertical(_arg0); + _result = (bool )wxToolBarBase_IsVertical(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3224,7 +3060,7 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)new_wxToolBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxToolBar *)new_wxToolBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3250,7 +3086,7 @@ static PyObject *_wrap_new_wxPreToolBar(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBar *)new_wxPreToolBar(); + _result = (wxToolBar *)new_wxPreToolBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3314,7 +3150,7 @@ static PyObject *_wrap_wxToolBar_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxToolBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3344,7 +3180,7 @@ static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBar_FindToolForPosition(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBar_FindToolForPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3434,7 +3270,7 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarSimple *)new_wxToolBarSimple(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxToolBarSimple *)new_wxToolBarSimple(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3460,7 +3296,7 @@ static PyObject *_wrap_new_wxPreToolBarSimple(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarSimple *)new_wxPreToolBarSimple(); + _result = (wxToolBarSimple *)new_wxPreToolBarSimple(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3524,7 +3360,7 @@ static PyObject *_wrap_wxToolBarSimple_Create(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarSimple_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxToolBarSimple_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3554,7 +3390,7 @@ static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarSimple_FindToolForPosition(_arg0,_arg1,_arg2); + _result = (wxToolBarToolBase *)wxToolBarSimple_FindToolForPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp index 95a8a66579..b2d72079bc 100644 --- a/wxPython/src/msw/streams.cpp +++ b/wxPython/src/msw/streams.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -119,7 +113,7 @@ static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); + _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -152,7 +146,7 @@ static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInputStream_close(_arg0); + wxInputStream_close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -180,7 +174,7 @@ static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInputStream_flush(_arg0); + wxInputStream_flush(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -209,7 +203,7 @@ static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxInputStream_eof(_arg0); + _result = (bool )wxInputStream_eof(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -238,12 +232,16 @@ static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxInputStream_read(_arg0,_arg1); + _result = (wxString *)wxInputStream_read(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -269,12 +267,16 @@ static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxString *)wxInputStream_readline(_arg0,_arg1); + _result = (wxString *)wxInputStream_readline(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -300,7 +302,7 @@ static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); + _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -310,7 +312,11 @@ static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, P wxStringPtrList::Node *node = _result->GetFirst(); for (int i=0; node; i++) { wxString *s = node->GetData(); +#if wxUSE_UNICODE + PyList_SetItem(_resultobj, i, PyUnicode_FromUnicode(s->c_str(), s->Len())); +#else PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len())); +#endif node = node->GetNext(); delete s; } @@ -343,7 +349,7 @@ static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInputStream_seek(_arg0,_arg1,_arg2); + wxInputStream_seek(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -372,7 +378,7 @@ static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxInputStream_tell(_arg0); + _result = (int )wxInputStream_tell(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -402,26 +408,13 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxOutputStream_write(_arg0,*_arg1); + wxOutputStream_write(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp index 475800ed28..6356d1ec79 100644 --- a/wxPython/src/msw/utils.cpp +++ b/wxPython/src/msw/utils.cpp @@ -87,17 +87,15 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { PyObject* ret = PyTuple_New(3); if (ret) { PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); - PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); +#if wxUSE_UNICODE + PyTuple_SET_ITEM(ret, 1, PyUnicode_FromUnicode(str.c_str(), str.Len())); +#else + PyTuple_SET_ITEM(ret, 1, PyString_FromStringAndSize(str.c_str(), str.Len())); +#endif PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); } return ret; @@ -117,7 +115,7 @@ static PyObject *_wrap_wxGetLocalTime(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetLocalTime(); + _result = (long )wxGetLocalTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -135,7 +133,7 @@ static PyObject *_wrap_wxGetUTCTime(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetUTCTime(); + _result = (long )wxGetUTCTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -153,7 +151,7 @@ static PyObject *_wrap_wxGetCurrentTime(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetCurrentTime(); + _result = (long )wxGetCurrentTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -171,7 +169,7 @@ static PyObject *_wrap_wxGetLocalTimeMillis(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxLongLong (wxGetLocalTimeMillis()); + _result = new wxLongLong (wxGetLocalTimeMillis()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -209,7 +207,7 @@ static PyObject *_wrap_delete_wxConfigBase(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxConfigBase(_arg0); + delete_wxConfigBase(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -238,7 +236,7 @@ static PyObject *_wrap_wxConfigBase_Set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase *)wxConfigBase::Set(_arg0); + _result = (wxConfigBase *)wxConfigBase::Set(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -266,7 +264,7 @@ static PyObject *_wrap_wxConfigBase_Get(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase *)wxConfigBase::Get(_arg0); + _result = (wxConfigBase *)wxConfigBase::Get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -291,7 +289,7 @@ static PyObject *_wrap_wxConfigBase_Create(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase *)wxConfigBase::Create(); + _result = (wxConfigBase *)wxConfigBase::Create(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -314,7 +312,7 @@ static PyObject *_wrap_wxConfigBase_DontCreateOnDemand(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase::DontCreateOnDemand(); + wxConfigBase::DontCreateOnDemand(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -343,7 +341,7 @@ static PyObject *_wrap_wxConfigBase_DeleteAll(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_DeleteAll(_arg0); + _result = (bool )wxConfigBase_DeleteAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -374,27 +372,14 @@ static PyObject *_wrap_wxConfigBase_DeleteEntry(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_DeleteEntry(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_DeleteEntry(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -427,26 +412,13 @@ static PyObject *_wrap_wxConfigBase_DeleteGroup(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_DeleteGroup(_arg0,*_arg1); + _result = (bool )wxConfigBase_DeleteGroup(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,26 +451,13 @@ static PyObject *_wrap_wxConfigBase_Exists(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_Exists(_arg0,*_arg1); + _result = (bool )wxConfigBase_Exists(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -533,7 +492,7 @@ static PyObject *_wrap_wxConfigBase_Flush(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_Flush(_arg0,_arg1); + _result = (bool )wxConfigBase_Flush(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -561,12 +520,16 @@ static PyObject *_wrap_wxConfigBase_GetAppName(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_GetAppName(_arg0)); + _result = new wxString (wxConfigBase_GetAppName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -601,7 +564,7 @@ static PyObject *_wrap_wxConfigBase_GetFirstGroup(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetFirstGroup(_arg0); + _result = (PyObject *)wxConfigBase_GetFirstGroup(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -638,7 +601,7 @@ static PyObject *_wrap_wxConfigBase_GetFirstEntry(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetFirstEntry(_arg0); + _result = (PyObject *)wxConfigBase_GetFirstEntry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -675,7 +638,7 @@ static PyObject *_wrap_wxConfigBase_GetNextGroup(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetNextGroup(_arg0,_arg1); + _result = (PyObject *)wxConfigBase_GetNextGroup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -712,7 +675,7 @@ static PyObject *_wrap_wxConfigBase_GetNextEntry(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxConfigBase_GetNextEntry(_arg0,_arg1); + _result = (PyObject *)wxConfigBase_GetNextEntry(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -745,7 +708,7 @@ static PyObject *_wrap_wxConfigBase_GetNumberOfEntries(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxConfigBase_GetNumberOfEntries(_arg0,_arg1); + _result = (int )wxConfigBase_GetNumberOfEntries(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -776,7 +739,7 @@ static PyObject *_wrap_wxConfigBase_GetNumberOfGroups(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxConfigBase_GetNumberOfGroups(_arg0,_arg1); + _result = (int )wxConfigBase_GetNumberOfGroups(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -804,12 +767,16 @@ static PyObject *_wrap_wxConfigBase_GetPath(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_GetPath(_arg0)); + _result = new wxString (wxConfigBase_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -837,12 +804,16 @@ static PyObject *_wrap_wxConfigBase_GetVendorName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_GetVendorName(_arg0)); + _result = new wxString (wxConfigBase_GetVendorName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -871,26 +842,13 @@ static PyObject *_wrap_wxConfigBase_HasEntry(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_HasEntry(_arg0,*_arg1); + _result = (bool )wxConfigBase_HasEntry(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -923,26 +881,13 @@ static PyObject *_wrap_wxConfigBase_HasGroup(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_HasGroup(_arg0,*_arg1); + _result = (bool )wxConfigBase_HasGroup(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -974,7 +919,7 @@ static PyObject *_wrap_wxConfigBase_IsExpandingEnvVars(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_IsExpandingEnvVars(_arg0); + _result = (bool )wxConfigBase_IsExpandingEnvVars(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1002,7 +947,7 @@ static PyObject *_wrap_wxConfigBase_IsRecordingDefaults(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_IsRecordingDefaults(_arg0); + _result = (bool )wxConfigBase_IsRecordingDefaults(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1033,50 +978,28 @@ static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_Read(_arg0,*_arg1,*_arg2)); + _result = new wxString (wxConfigBase_Read(_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -1118,26 +1041,13 @@ static PyObject *_wrap_wxConfigBase_ReadInt(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxConfigBase_ReadInt(_arg0,*_arg1,_arg2); + _result = (long )wxConfigBase_ReadInt(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1175,26 +1085,13 @@ static PyObject *_wrap_wxConfigBase_ReadFloat(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxConfigBase_ReadFloat(_arg0,*_arg1,_arg2); + _result = (double )wxConfigBase_ReadFloat(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1233,27 +1130,14 @@ static PyObject *_wrap_wxConfigBase_ReadBool(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_ReadBool(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_ReadBool(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1287,7 +1171,7 @@ static PyObject *_wrap_wxConfigBase_SetExpandEnvVars(PyObject *self, PyObject *a _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetExpandEnvVars(_arg0,_arg1); + wxConfigBase_SetExpandEnvVars(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1316,26 +1200,13 @@ static PyObject *_wrap_wxConfigBase_SetPath(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetPath(_arg0,*_arg1); + wxConfigBase_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1241,7 @@ static PyObject *_wrap_wxConfigBase_SetRecordDefaults(PyObject *self, PyObject * _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetRecordDefaults(_arg0,_arg1); + wxConfigBase_SetRecordDefaults(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1399,26 +1270,13 @@ static PyObject *_wrap_wxConfigBase_SetAppName(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetAppName(_arg0,*_arg1); + wxConfigBase_SetAppName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1451,26 +1309,13 @@ static PyObject *_wrap_wxConfigBase_SetVendorName(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetVendorName(_arg0,*_arg1); + wxConfigBase_SetVendorName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1503,7 +1348,7 @@ static PyObject *_wrap_wxConfigBase_SetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxConfigBase_SetStyle(_arg0,_arg1); + wxConfigBase_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1532,7 +1377,7 @@ static PyObject *_wrap_wxConfigBase_GetStyle(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxConfigBase_GetStyle(_arg0); + _result = (long )wxConfigBase_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1563,44 +1408,18 @@ static PyObject *_wrap_wxConfigBase_Write(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_Write(_arg0,*_arg1,*_arg2); + _result = (bool )wxConfigBase_Write(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1638,26 +1457,13 @@ static PyObject *_wrap_wxConfigBase_WriteInt(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_WriteInt(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_WriteInt(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1691,26 +1497,13 @@ static PyObject *_wrap_wxConfigBase_WriteFloat(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_WriteFloat(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_WriteFloat(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,27 +1538,14 @@ static PyObject *_wrap_wxConfigBase_WriteBool(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_WriteBool(_arg0,*_arg1,_arg2); + _result = (bool )wxConfigBase_WriteBool(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1798,26 +1578,13 @@ static PyObject *_wrap_wxConfigBase_GetEntryType(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfigBase::EntryType )wxConfigBase_GetEntryType(_arg0,*_arg1); + _result = (wxConfigBase::EntryType )wxConfigBase_GetEntryType(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1852,44 +1619,18 @@ static PyObject *_wrap_wxConfigBase_RenameEntry(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_RenameEntry(_arg0,*_arg1,*_arg2); + _result = (bool )wxConfigBase_RenameEntry(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1928,44 +1669,18 @@ static PyObject *_wrap_wxConfigBase_RenameGroup(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxConfigBase_RenameGroup(_arg0,*_arg1,*_arg2); + _result = (bool )wxConfigBase_RenameGroup(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2002,31 +1717,22 @@ static PyObject *_wrap_wxConfigBase_ExpandEnvVars(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxConfigBase_ExpandEnvVars(_arg0,*_arg1)); + _result = new wxString (wxConfigBase_ExpandEnvVars(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj1) @@ -2067,83 +1773,31 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kw return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2192,7 +1846,7 @@ static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxConfig(_arg0); + delete_wxConfig(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2230,83 +1884,31 @@ static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileConfig *)new_wxFileConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + _result = (wxFileConfig *)new_wxFileConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +1957,7 @@ static PyObject *_wrap_delete_wxFileConfig(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxFileConfig(_arg0); + delete_wxFileConfig(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2374,7 +1976,7 @@ static PyObject *_wrap_wxDateTime_SetCountry(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime::SetCountry(_arg0); + wxDateTime::SetCountry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2393,7 +1995,7 @@ static PyObject *_wrap_wxDateTime_GetCountry(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::Country )wxDateTime::GetCountry(); + _result = (wxDateTime::Country )wxDateTime::GetCountry(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2412,7 +2014,7 @@ static PyObject *_wrap_wxDateTime_IsWestEuropeanCountry(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime::IsWestEuropeanCountry(_arg0); + _result = (bool )wxDateTime::IsWestEuropeanCountry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2431,7 +2033,7 @@ static PyObject *_wrap_wxDateTime_GetCurrentYear(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime::GetCurrentYear(_arg0); + _result = (int )wxDateTime::GetCurrentYear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2450,7 +2052,7 @@ static PyObject *_wrap_wxDateTime_ConvertYearToBC(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime::ConvertYearToBC(_arg0); + _result = (int )wxDateTime::ConvertYearToBC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2469,7 +2071,7 @@ static PyObject *_wrap_wxDateTime_GetCurrentMonth(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::Month )wxDateTime::GetCurrentMonth(_arg0); + _result = (wxDateTime::Month )wxDateTime::GetCurrentMonth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2489,7 +2091,7 @@ static PyObject *_wrap_wxDateTime_IsLeapYear(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime::IsLeapYear(_arg0,_arg1); + _result = (bool )wxDateTime::IsLeapYear(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2508,7 +2110,7 @@ static PyObject *_wrap_wxDateTime_GetCentury(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime::GetCentury(_arg0); + _result = (int )wxDateTime::GetCentury(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2528,7 +2130,7 @@ static PyObject *_wrap_wxDateTime_GetNumberOfDaysinYear(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2549,7 +2151,7 @@ static PyObject *_wrap_wxDateTime_GetNumberOfDaysInMonth(PyObject *self, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1,_arg2); + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2569,12 +2171,16 @@ static PyObject *_wrap_wxDateTime_GetMonthName(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime::GetMonthName(_arg0,_arg1)); + _result = new wxString (wxDateTime::GetMonthName(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2594,12 +2200,16 @@ static PyObject *_wrap_wxDateTime_GetWeekDayName(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime::GetWeekDayName(_arg0,_arg1)); + _result = new wxString (wxDateTime::GetWeekDayName(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2619,44 +2229,18 @@ static PyObject *_wrap_wxDateTime_GetAmPmStrings(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_GetAmPmStrings",_kwnames,&_obj0,&_obj1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime::GetAmPmStrings(_arg0,_arg1); + wxDateTime::GetAmPmStrings(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2685,7 +2269,7 @@ static PyObject *_wrap_wxDateTime_IsDSTApplicable(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime::IsDSTApplicable(_arg0,_arg1); + _result = (bool )wxDateTime::IsDSTApplicable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2706,7 +2290,7 @@ static PyObject *_wrap_wxDateTime_GetBeginDST(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::GetBeginDST(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime::GetBeginDST(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2728,7 +2312,7 @@ static PyObject *_wrap_wxDateTime_GetEndDST(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::GetEndDST(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime::GetEndDST(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2748,7 +2332,7 @@ static PyObject *_wrap_wxDateTime_Now(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::Now()); + _result = new wxDateTime (wxDateTime::Now()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2768,7 +2352,7 @@ static PyObject *_wrap_wxDateTime_Today(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime::Today()); + _result = new wxDateTime (wxDateTime::Today()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2789,7 +2373,7 @@ static PyObject *_wrap_new_wxDateTime(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTime(); + _result = (wxDateTime *)new_wxDateTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2816,7 +2400,7 @@ static PyObject *_wrap_new_wxDateTimeFromTimeT(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); + _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2843,7 +2427,7 @@ static PyObject *_wrap_new_wxDateTimeFromJDN(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromJDN(_arg0); + _result = (wxDateTime *)new_wxDateTimeFromJDN(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2873,7 +2457,7 @@ static PyObject *_wrap_new_wxDateTimeFromHMS(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromHMS(_arg0,_arg1,_arg2,_arg3); + _result = (wxDateTime *)new_wxDateTimeFromHMS(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2906,7 +2490,7 @@ static PyObject *_wrap_new_wxDateTimeFromDMY(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime *)new_wxDateTimeFromDMY(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + _result = (wxDateTime *)new_wxDateTimeFromDMY(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2939,7 +2523,7 @@ static PyObject *_wrap_delete_wxDateTime(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDateTime(_arg0); + delete_wxDateTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2969,7 +2553,7 @@ static PyObject *_wrap_wxDateTime_SetToCurrent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToCurrent(_arg0); + wxDateTime & _result_ref = wxDateTime_SetToCurrent(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3006,7 +2590,7 @@ static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3043,7 +2627,7 @@ static PyObject *_wrap_wxDateTime_SetJDN(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetJDN(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetJDN(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3083,7 +2667,7 @@ static PyObject *_wrap_wxDateTime_SetHMS(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetHMS(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDateTime & _result_ref = wxDateTime_SetHMS(_arg0,_arg1,_arg2,_arg3,_arg4); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3126,7 +2710,7 @@ static PyObject *_wrap_wxDateTime_Set(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxDateTime & _result_ref = wxDateTime_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3162,7 +2746,7 @@ static PyObject *_wrap_wxDateTime_ResetTime(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_ResetTime(_arg0); + wxDateTime & _result_ref = wxDateTime_ResetTime(_arg0); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3199,7 +2783,7 @@ static PyObject *_wrap_wxDateTime_SetYear(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetYear(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetYear(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3236,7 +2820,7 @@ static PyObject *_wrap_wxDateTime_SetMonth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetMonth(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetMonth(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3273,7 +2857,7 @@ static PyObject *_wrap_wxDateTime_SetDay(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3310,7 +2894,7 @@ static PyObject *_wrap_wxDateTime_SetHour(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetHour(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetHour(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3347,7 +2931,7 @@ static PyObject *_wrap_wxDateTime_SetMinute(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetMinute(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetMinute(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3384,7 +2968,7 @@ static PyObject *_wrap_wxDateTime_SetSecond(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetSecond(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetSecond(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3421,7 +3005,7 @@ static PyObject *_wrap_wxDateTime_SetMillisecond(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetMillisecond(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetMillisecond(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3458,7 +3042,7 @@ static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3495,7 +3079,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3526,7 +3110,7 @@ static PyObject *_wrap_wxDateTime_SetToNextWeekDay(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToNextWeekDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToNextWeekDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3563,7 +3147,7 @@ static PyObject *_wrap_wxDateTime_GetNextWeekDay(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetNextWeekDay(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetNextWeekDay(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3594,7 +3178,7 @@ static PyObject *_wrap_wxDateTime_SetToPrevWeekDay(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToPrevWeekDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToPrevWeekDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3631,7 +3215,7 @@ static PyObject *_wrap_wxDateTime_GetPrevWeekDay(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetPrevWeekDay(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetPrevWeekDay(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3664,7 +3248,7 @@ static PyObject *_wrap_wxDateTime_SetToWeekDay(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxDateTime_SetToWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3695,7 +3279,7 @@ static PyObject *_wrap_wxDateTime_SetToLastWeekDay(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToLastWeekDay(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxDateTime_SetToLastWeekDay(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3727,7 +3311,7 @@ static PyObject *_wrap_wxDateTime_GetLastWeekDay(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetLastWeekDay(_arg0,_arg1,_arg2,_arg3)); + _result = new wxDateTime (wxDateTime_GetLastWeekDay(_arg0,_arg1,_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3758,7 +3342,7 @@ static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); + _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3789,7 +3373,7 @@ static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3821,7 +3405,7 @@ static PyObject *_wrap_wxDateTime_SetToLastMonthDay(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToLastMonthDay(_arg0,_arg1,_arg2); + wxDateTime & _result_ref = wxDateTime_SetToLastMonthDay(_arg0,_arg1,_arg2); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3859,7 +3443,7 @@ static PyObject *_wrap_wxDateTime_GetLastMonthDay(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetLastMonthDay(_arg0,_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_GetLastMonthDay(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3890,7 +3474,7 @@ static PyObject *_wrap_wxDateTime_SetToYearDay(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToYearDay(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToYearDay(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3927,7 +3511,7 @@ static PyObject *_wrap_wxDateTime_GetYearDay(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetYearDay(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetYearDay(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3956,7 +3540,7 @@ static PyObject *_wrap_wxDateTime_GetJulianDayNumber(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetJulianDayNumber(_arg0); + _result = (double )wxDateTime_GetJulianDayNumber(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3984,7 +3568,7 @@ static PyObject *_wrap_wxDateTime_GetJDN(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetJDN(_arg0); + _result = (double )wxDateTime_GetJDN(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4012,7 +3596,7 @@ static PyObject *_wrap_wxDateTime_GetModifiedJulianDayNumber(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetModifiedJulianDayNumber(_arg0); + _result = (double )wxDateTime_GetModifiedJulianDayNumber(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4040,7 +3624,7 @@ static PyObject *_wrap_wxDateTime_GetMJD(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetMJD(_arg0); + _result = (double )wxDateTime_GetMJD(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4068,7 +3652,7 @@ static PyObject *_wrap_wxDateTime_GetRataDie(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxDateTime_GetRataDie(_arg0); + _result = (double )wxDateTime_GetRataDie(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4105,7 +3689,7 @@ static PyObject *_wrap_wxDateTime_ToTimezone(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_ToTimezone(_arg0,*_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_ToTimezone(_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4146,7 +3730,7 @@ static PyObject *_wrap_wxDateTime_MakeTimezone(PyObject *self, PyObject *args, P _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_MakeTimezone(_arg0,*_arg1,_arg2); + wxDateTime & _result_ref = wxDateTime_MakeTimezone(_arg0,*_arg1,_arg2); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4188,7 +3772,7 @@ static PyObject *_wrap_wxDateTime_ToGMT(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_ToGMT(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_ToGMT(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4221,7 +3805,7 @@ static PyObject *_wrap_wxDateTime_MakeGMT(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_MakeGMT(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_MakeGMT(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4257,7 +3841,7 @@ static PyObject *_wrap_wxDateTime_IsDST(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime_IsDST(_arg0,_arg1); + _result = (int )wxDateTime_IsDST(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4285,7 +3869,7 @@ static PyObject *_wrap_wxDateTime_IsValid(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsValid(_arg0); + _result = (bool )wxDateTime_IsValid(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4313,7 +3897,7 @@ static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (time_t )wxDateTime_GetTicks(_arg0); + _result = (time_t )wxDateTime_GetTicks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4347,7 +3931,7 @@ static PyObject *_wrap_wxDateTime_GetYear(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime_GetYear(_arg0,*_arg1); + _result = (int )wxDateTime_GetYear(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4384,7 +3968,7 @@ static PyObject *_wrap_wxDateTime_GetMonth(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::Month )wxDateTime_GetMonth(_arg0,*_arg1); + _result = (wxDateTime::Month )wxDateTime_GetMonth(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4421,7 +4005,7 @@ static PyObject *_wrap_wxDateTime_GetDay(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDay(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDay(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4458,7 +4042,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDay(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::WeekDay )wxDateTime_GetWeekDay(_arg0,*_arg1); + _result = (wxDateTime::WeekDay )wxDateTime_GetWeekDay(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4495,7 +4079,7 @@ static PyObject *_wrap_wxDateTime_GetHour(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetHour(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetHour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4532,7 +4116,7 @@ static PyObject *_wrap_wxDateTime_GetMinute(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMinute(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMinute(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4569,7 +4153,7 @@ static PyObject *_wrap_wxDateTime_GetSecond(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetSecond(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetSecond(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4606,7 +4190,7 @@ static PyObject *_wrap_wxDateTime_GetMillisecond(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMillisecond(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMillisecond(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4643,7 +4227,7 @@ static PyObject *_wrap_wxDateTime_GetDayOfYear(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDayOfYear(_arg0,*_arg1); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDayOfYear(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4681,7 +4265,7 @@ static PyObject *_wrap_wxDateTime_GetWeekOfYear(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfYear(_arg0,_arg1,*_arg2); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfYear(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4719,7 +4303,7 @@ static PyObject *_wrap_wxDateTime_GetWeekOfMonth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfMonth(_arg0,_arg1,*_arg2); + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfMonth(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4751,7 +4335,7 @@ static PyObject *_wrap_wxDateTime_IsWorkDay(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsWorkDay(_arg0,_arg1); + _result = (bool )wxDateTime_IsWorkDay(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4788,7 +4372,7 @@ static PyObject *_wrap_wxDateTime_IsEqualTo(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsEqualTo(_arg0,*_arg1); + _result = (bool )wxDateTime_IsEqualTo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4825,7 +4409,7 @@ static PyObject *_wrap_wxDateTime_IsEarlierThan(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsEarlierThan(_arg0,*_arg1); + _result = (bool )wxDateTime_IsEarlierThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4862,7 +4446,7 @@ static PyObject *_wrap_wxDateTime_IsLaterThan(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsLaterThan(_arg0,*_arg1); + _result = (bool )wxDateTime_IsLaterThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4908,7 +4492,7 @@ static PyObject *_wrap_wxDateTime_IsStrictlyBetween(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsStrictlyBetween(_arg0,*_arg1,*_arg2); + _result = (bool )wxDateTime_IsStrictlyBetween(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4954,7 +4538,7 @@ static PyObject *_wrap_wxDateTime_IsBetween(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsBetween(_arg0,*_arg1,*_arg2); + _result = (bool )wxDateTime_IsBetween(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4991,7 +4575,7 @@ static PyObject *_wrap_wxDateTime_IsSameDate(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsSameDate(_arg0,*_arg1); + _result = (bool )wxDateTime_IsSameDate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5028,7 +4612,7 @@ static PyObject *_wrap_wxDateTime_IsSameTime(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsSameTime(_arg0,*_arg1); + _result = (bool )wxDateTime_IsSameTime(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5074,7 +4658,7 @@ static PyObject *_wrap_wxDateTime_IsEqualUpTo(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_IsEqualUpTo(_arg0,*_arg1,*_arg2); + _result = (bool )wxDateTime_IsEqualUpTo(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5112,7 +4696,7 @@ static PyObject *_wrap_wxDateTime_AddTS(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_AddTS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_AddTS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5157,7 +4741,7 @@ static PyObject *_wrap_wxDateTime_AddDS(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_AddDS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_AddDS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5202,7 +4786,7 @@ static PyObject *_wrap_wxDateTime_SubtractTS(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SubtractTS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_SubtractTS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5247,7 +4831,7 @@ static PyObject *_wrap_wxDateTime_SubtractDS(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SubtractDS(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_SubtractDS(_arg0,*_arg1); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -5292,7 +4876,7 @@ static PyObject *_wrap_wxDateTime_Subtract(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxDateTime_Subtract(_arg0,*_arg1)); + _result = new wxTimeSpan (wxDateTime_Subtract(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5331,7 +4915,7 @@ static PyObject *_wrap_wxDateTime___add__TS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___add__TS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___add__TS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5370,7 +4954,7 @@ static PyObject *_wrap_wxDateTime___add__DS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___add__DS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___add__DS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5409,7 +4993,7 @@ static PyObject *_wrap_wxDateTime___sub__DT(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxDateTime___sub__DT(_arg0,*_arg1)); + _result = new wxTimeSpan (wxDateTime___sub__DT(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5448,7 +5032,7 @@ static PyObject *_wrap_wxDateTime___sub__TS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___sub__TS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___sub__TS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5487,7 +5071,7 @@ static PyObject *_wrap_wxDateTime___sub__DS(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime___sub__DS(_arg0,*_arg1)); + _result = new wxDateTime (wxDateTime___sub__DS(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5529,7 +5113,7 @@ static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateTime___cmp__(_arg0,*_arg1); + _result = (int )wxDateTime___cmp__(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5542,7 +5126,7 @@ static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","date", NULL }; @@ -5558,7 +5142,7 @@ static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseRfc822Date(_arg0,_arg1); + _result = (char *)wxDateTime_ParseRfc822Date(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5571,8 +5155,8 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; - char * _arg2 = (char *) "%c"; + wxChar * _arg1; + wxChar * _arg2 = (wxChar *) "%c"; wxDateTime * _arg3 = (wxDateTime *) &wxDefaultDateTime; PyObject * _argo0 = 0; PyObject * _argo3 = 0; @@ -5597,7 +5181,7 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseFormat(_arg0,_arg1,_arg2,*_arg3); + _result = (char *)wxDateTime_ParseFormat(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5610,7 +5194,7 @@ static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","datetime", NULL }; @@ -5626,7 +5210,7 @@ static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseDateTime(_arg0,_arg1); + _result = (char *)wxDateTime_ParseDateTime(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5639,7 +5223,7 @@ static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyOb PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","date", NULL }; @@ -5655,7 +5239,7 @@ static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseDate(_arg0,_arg1); + _result = (char *)wxDateTime_ParseDate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5668,7 +5252,7 @@ static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyOb PyObject * _resultobj; char * _result; wxDateTime * _arg0; - char * _arg1; + wxChar * _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","time", NULL }; @@ -5684,7 +5268,7 @@ static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxDateTime_ParseTime(_arg0,_arg1); + _result = (char *)wxDateTime_ParseTime(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5697,7 +5281,7 @@ static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; wxString * _result; wxDateTime * _arg0; - char * _arg1 = (char *) "%c"; + wxChar * _arg1 = (wxChar *) "%c"; wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -5719,12 +5303,16 @@ static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_Format(_arg0,_arg1,*_arg2)); + _result = new wxString (wxDateTime_Format(_arg0,_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_arg2) delete _arg2; @@ -5755,12 +5343,16 @@ static PyObject *_wrap_wxDateTime_FormatDate(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatDate(_arg0)); + _result = new wxString (wxDateTime_FormatDate(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5788,12 +5380,16 @@ static PyObject *_wrap_wxDateTime_FormatTime(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatTime(_arg0)); + _result = new wxString (wxDateTime_FormatTime(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5821,12 +5417,16 @@ static PyObject *_wrap_wxDateTime_FormatISODate(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatISODate(_arg0)); + _result = new wxString (wxDateTime_FormatISODate(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5854,12 +5454,16 @@ static PyObject *_wrap_wxDateTime_FormatISOTime(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_FormatISOTime(_arg0)); + _result = new wxString (wxDateTime_FormatISOTime(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5879,7 +5483,7 @@ static PyObject *_wrap_wxTimeSpan_Seconds(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Seconds(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Seconds(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5899,7 +5503,7 @@ static PyObject *_wrap_wxTimeSpan_Second(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Second()); + _result = new wxTimeSpan (wxTimeSpan::Second()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5920,7 +5524,7 @@ static PyObject *_wrap_wxTimeSpan_Minutes(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Minutes(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Minutes(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5940,7 +5544,7 @@ static PyObject *_wrap_wxTimeSpan_Minute(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Minute()); + _result = new wxTimeSpan (wxTimeSpan::Minute()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5961,7 +5565,7 @@ static PyObject *_wrap_wxTimeSpan_Hours(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Hours(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Hours(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5981,7 +5585,7 @@ static PyObject *_wrap_wxTimeSpan_Hour(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Hour()); + _result = new wxTimeSpan (wxTimeSpan::Hour()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6002,7 +5606,7 @@ static PyObject *_wrap_wxTimeSpan_Days(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Days(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Days(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6022,7 +5626,7 @@ static PyObject *_wrap_wxTimeSpan_Day(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Day()); + _result = new wxTimeSpan (wxTimeSpan::Day()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6043,7 +5647,7 @@ static PyObject *_wrap_wxTimeSpan_Weeks(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Weeks(_arg0)); + _result = new wxTimeSpan (wxTimeSpan::Weeks(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6063,7 +5667,7 @@ static PyObject *_wrap_wxTimeSpan_Week(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan::Week()); + _result = new wxTimeSpan (wxTimeSpan::Week()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6088,7 +5692,7 @@ static PyObject *_wrap_new_wxTimeSpan(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTimeSpan *)new_wxTimeSpan(_arg0,_arg1,_arg2,_arg3); + _result = (wxTimeSpan *)new_wxTimeSpan(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6121,7 +5725,7 @@ static PyObject *_wrap_delete_wxTimeSpan(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTimeSpan(_arg0); + delete_wxTimeSpan(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6160,7 +5764,7 @@ static PyObject *_wrap_wxTimeSpan_Add(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Add(_arg0,*_arg1); + wxTimeSpan & _result_ref = wxTimeSpan_Add(_arg0,*_arg1); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6205,7 +5809,7 @@ static PyObject *_wrap_wxTimeSpan_Subtract(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Subtract(_arg0,*_arg1); + wxTimeSpan & _result_ref = wxTimeSpan_Subtract(_arg0,*_arg1); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6242,7 +5846,7 @@ static PyObject *_wrap_wxTimeSpan_Multiply(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Multiply(_arg0,_arg1); + wxTimeSpan & _result_ref = wxTimeSpan_Multiply(_arg0,_arg1); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6278,7 +5882,7 @@ static PyObject *_wrap_wxTimeSpan_Neg(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTimeSpan & _result_ref = wxTimeSpan_Neg(_arg0); + wxTimeSpan & _result_ref = wxTimeSpan_Neg(_arg0); _result = (wxTimeSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -6314,7 +5918,7 @@ static PyObject *_wrap_wxTimeSpan_Abs(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan_Abs(_arg0)); + _result = new wxTimeSpan (wxTimeSpan_Abs(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6353,7 +5957,7 @@ static PyObject *_wrap_wxTimeSpan___add__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___add__(_arg0,*_arg1)); + _result = new wxTimeSpan (wxTimeSpan___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6392,7 +5996,7 @@ static PyObject *_wrap_wxTimeSpan___sub__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___sub__(_arg0,*_arg1)); + _result = new wxTimeSpan (wxTimeSpan___sub__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6423,7 +6027,7 @@ static PyObject *_wrap_wxTimeSpan___mul__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___mul__(_arg0,_arg1)); + _result = new wxTimeSpan (wxTimeSpan___mul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6454,7 +6058,7 @@ static PyObject *_wrap_wxTimeSpan___rmul__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___rmul__(_arg0,_arg1)); + _result = new wxTimeSpan (wxTimeSpan___rmul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6484,7 +6088,7 @@ static PyObject *_wrap_wxTimeSpan___neg__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTimeSpan (wxTimeSpan___neg__(_arg0)); + _result = new wxTimeSpan (wxTimeSpan___neg__(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6526,7 +6130,7 @@ static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); + _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6554,7 +6158,7 @@ static PyObject *_wrap_wxTimeSpan_IsNull(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsNull(_arg0); + _result = (bool )wxTimeSpan_IsNull(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6582,7 +6186,7 @@ static PyObject *_wrap_wxTimeSpan_IsPositive(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsPositive(_arg0); + _result = (bool )wxTimeSpan_IsPositive(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6610,7 +6214,7 @@ static PyObject *_wrap_wxTimeSpan_IsNegative(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsNegative(_arg0); + _result = (bool )wxTimeSpan_IsNegative(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6647,7 +6251,7 @@ static PyObject *_wrap_wxTimeSpan_IsEqualTo(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsEqualTo(_arg0,*_arg1); + _result = (bool )wxTimeSpan_IsEqualTo(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6684,7 +6288,7 @@ static PyObject *_wrap_wxTimeSpan_IsLongerThan(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsLongerThan(_arg0,*_arg1); + _result = (bool )wxTimeSpan_IsLongerThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6721,7 +6325,7 @@ static PyObject *_wrap_wxTimeSpan_IsShorterThan(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTimeSpan_IsShorterThan(_arg0,*_arg1); + _result = (bool )wxTimeSpan_IsShorterThan(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6749,7 +6353,7 @@ static PyObject *_wrap_wxTimeSpan_GetWeeks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetWeeks(_arg0); + _result = (int )wxTimeSpan_GetWeeks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6777,7 +6381,7 @@ static PyObject *_wrap_wxTimeSpan_GetDays(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetDays(_arg0); + _result = (int )wxTimeSpan_GetDays(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6805,7 +6409,7 @@ static PyObject *_wrap_wxTimeSpan_GetHours(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetHours(_arg0); + _result = (int )wxTimeSpan_GetHours(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6833,7 +6437,7 @@ static PyObject *_wrap_wxTimeSpan_GetMinutes(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTimeSpan_GetMinutes(_arg0); + _result = (int )wxTimeSpan_GetMinutes(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6861,7 +6465,7 @@ static PyObject *_wrap_wxTimeSpan_GetSeconds(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxLongLong (wxTimeSpan_GetSeconds(_arg0)); + _result = new wxLongLong (wxTimeSpan_GetSeconds(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6900,7 +6504,7 @@ static PyObject *_wrap_wxTimeSpan_GetMilliseconds(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxLongLong (wxTimeSpan_GetMilliseconds(_arg0)); + _result = new wxLongLong (wxTimeSpan_GetMilliseconds(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6924,7 +6528,7 @@ static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; wxString * _result; wxTimeSpan * _arg0; - char * _arg1 = (char *) "%c"; + wxChar * _arg1 = (wxChar *) "%c"; PyObject * _argo0 = 0; char *_kwnames[] = { "self","format", NULL }; @@ -6940,12 +6544,16 @@ static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTimeSpan_Format(_arg0,_arg1)); + _result = new wxString (wxTimeSpan_Format(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6969,7 +6577,7 @@ static PyObject *_wrap_new_wxDateSpan(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDateSpan *)new_wxDateSpan(_arg0,_arg1,_arg2,_arg3); + _result = (wxDateSpan *)new_wxDateSpan(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7002,7 +6610,7 @@ static PyObject *_wrap_delete_wxDateSpan(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxDateSpan(_arg0); + delete_wxDateSpan(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7023,7 +6631,7 @@ static PyObject *_wrap_wxDateSpan_Days(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Days(_arg0)); + _result = new wxDateSpan (wxDateSpan::Days(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7043,7 +6651,7 @@ static PyObject *_wrap_wxDateSpan_Day(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Day()); + _result = new wxDateSpan (wxDateSpan::Day()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7064,7 +6672,7 @@ static PyObject *_wrap_wxDateSpan_Weeks(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Weeks(_arg0)); + _result = new wxDateSpan (wxDateSpan::Weeks(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7084,7 +6692,7 @@ static PyObject *_wrap_wxDateSpan_Week(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Week()); + _result = new wxDateSpan (wxDateSpan::Week()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7105,7 +6713,7 @@ static PyObject *_wrap_wxDateSpan_Months(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Months(_arg0)); + _result = new wxDateSpan (wxDateSpan::Months(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7125,7 +6733,7 @@ static PyObject *_wrap_wxDateSpan_Month(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Month()); + _result = new wxDateSpan (wxDateSpan::Month()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7146,7 +6754,7 @@ static PyObject *_wrap_wxDateSpan_Years(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Years(_arg0)); + _result = new wxDateSpan (wxDateSpan::Years(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7166,7 +6774,7 @@ static PyObject *_wrap_wxDateSpan_Year(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan::Year()); + _result = new wxDateSpan (wxDateSpan::Year()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7197,7 +6805,7 @@ static PyObject *_wrap_wxDateSpan_SetYears(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetYears(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetYears(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7234,7 +6842,7 @@ static PyObject *_wrap_wxDateSpan_SetMonths(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetMonths(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetMonths(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7271,7 +6879,7 @@ static PyObject *_wrap_wxDateSpan_SetWeeks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetWeeks(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetWeeks(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7308,7 +6916,7 @@ static PyObject *_wrap_wxDateSpan_SetDays(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_SetDays(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_SetDays(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7343,7 +6951,7 @@ static PyObject *_wrap_wxDateSpan_GetYears(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetYears(_arg0); + _result = (int )wxDateSpan_GetYears(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7371,7 +6979,7 @@ static PyObject *_wrap_wxDateSpan_GetMonths(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetMonths(_arg0); + _result = (int )wxDateSpan_GetMonths(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7399,7 +7007,7 @@ static PyObject *_wrap_wxDateSpan_GetWeeks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetWeeks(_arg0); + _result = (int )wxDateSpan_GetWeeks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7427,7 +7035,7 @@ static PyObject *_wrap_wxDateSpan_GetDays(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetDays(_arg0); + _result = (int )wxDateSpan_GetDays(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7455,7 +7063,7 @@ static PyObject *_wrap_wxDateSpan_GetTotalDays(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxDateSpan_GetTotalDays(_arg0); + _result = (int )wxDateSpan_GetTotalDays(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7493,7 +7101,7 @@ static PyObject *_wrap_wxDateSpan_Add(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Add(_arg0,*_arg1); + wxDateSpan & _result_ref = wxDateSpan_Add(_arg0,*_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7538,7 +7146,7 @@ static PyObject *_wrap_wxDateSpan_Subtract(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Subtract(_arg0,*_arg1); + wxDateSpan & _result_ref = wxDateSpan_Subtract(_arg0,*_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7574,7 +7182,7 @@ static PyObject *_wrap_wxDateSpan_Neg(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Neg(_arg0); + wxDateSpan & _result_ref = wxDateSpan_Neg(_arg0); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7611,7 +7219,7 @@ static PyObject *_wrap_wxDateSpan_Multiply(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateSpan & _result_ref = wxDateSpan_Multiply(_arg0,_arg1); + wxDateSpan & _result_ref = wxDateSpan_Multiply(_arg0,_arg1); _result = (wxDateSpan *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7656,7 +7264,7 @@ static PyObject *_wrap_wxDateSpan___add__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___add__(_arg0,*_arg1)); + _result = new wxDateSpan (wxDateSpan___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7695,7 +7303,7 @@ static PyObject *_wrap_wxDateSpan___sub__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___sub__(_arg0,*_arg1)); + _result = new wxDateSpan (wxDateSpan___sub__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7726,7 +7334,7 @@ static PyObject *_wrap_wxDateSpan___mul__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___mul__(_arg0,_arg1)); + _result = new wxDateSpan (wxDateSpan___mul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7757,7 +7365,7 @@ static PyObject *_wrap_wxDateSpan___rmul__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___rmul__(_arg0,_arg1)); + _result = new wxDateSpan (wxDateSpan___rmul__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7787,7 +7395,7 @@ static PyObject *_wrap_wxDateSpan___neg__(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateSpan (wxDateSpan___neg__(_arg0)); + _result = new wxDateSpan (wxDateSpan___neg__(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 007e8a95dd..532028e001 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -86,12 +86,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPyValidator : public wxValidator { DECLARE_DYNAMIC_CLASS(wxPyValidator); public: @@ -159,7 +153,7 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_FromHWND(_arg0); + _result = (wxWindow *)wxWindow_FromHWND(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -187,7 +181,7 @@ static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)new_wxEvtHandler(); + _result = (wxEvtHandler *)new_wxEvtHandler(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -230,7 +224,7 @@ static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvtHandler_ProcessEvent(_arg0,*_arg1); + _result = (bool )wxEvtHandler_ProcessEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -266,7 +260,7 @@ static PyObject *_wrap_wxEvtHandler_AddPendingEvent(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_AddPendingEvent(_arg0,*_arg1); + wxEvtHandler_AddPendingEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -295,7 +289,7 @@ static PyObject *_wrap_wxEvtHandler_GetEvtHandlerEnabled(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvtHandler_GetEvtHandlerEnabled(_arg0); + _result = (bool )wxEvtHandler_GetEvtHandlerEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -325,7 +319,7 @@ static PyObject *_wrap_wxEvtHandler_SetEvtHandlerEnabled(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_SetEvtHandlerEnabled(_arg0,_arg1); + wxEvtHandler_SetEvtHandlerEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -354,7 +348,7 @@ static PyObject *_wrap_wxEvtHandler_GetNextHandler(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxEvtHandler_GetNextHandler(_arg0); + _result = (wxEvtHandler *)wxEvtHandler_GetNextHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -382,7 +376,7 @@ static PyObject *_wrap_wxEvtHandler_GetPreviousHandler(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxEvtHandler_GetPreviousHandler(_arg0); + _result = (wxEvtHandler *)wxEvtHandler_GetPreviousHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -418,7 +412,7 @@ static PyObject *_wrap_wxEvtHandler_SetNextHandler(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_SetNextHandler(_arg0,_arg1); + wxEvtHandler_SetNextHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -455,7 +449,7 @@ static PyObject *_wrap_wxEvtHandler_SetPreviousHandler(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_SetPreviousHandler(_arg0,_arg1); + wxEvtHandler_SetPreviousHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -505,7 +499,7 @@ static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler_Connect(_arg0,_arg1,_arg2,_arg3,_arg4); + wxEvtHandler_Connect(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -541,7 +535,7 @@ static PyObject *_wrap_wxEvtHandler_Disconnect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvtHandler_Disconnect(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxEvtHandler_Disconnect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -575,7 +569,7 @@ static PyObject *_wrap_wxEvtHandler__setOORInfo(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEvtHandler__setOORInfo(_arg0,_arg1); + wxEvtHandler__setOORInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -612,7 +606,7 @@ static PyObject *_wrap_new_wxValidator(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxValidator *)new_wxValidator(); + _result = (wxValidator *)new_wxValidator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -646,7 +640,7 @@ static PyObject *_wrap_wxValidator_Clone(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxValidator *)wxValidator_Clone(_arg0); + _result = (wxValidator *)wxValidator_Clone(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -674,7 +668,7 @@ static PyObject *_wrap_wxValidator_GetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxValidator_GetWindow(_arg0); + _result = (wxWindow *)wxValidator_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -710,7 +704,7 @@ static PyObject *_wrap_wxValidator_SetWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxValidator_SetWindow(_arg0,_arg1); + wxValidator_SetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -729,7 +723,7 @@ static PyObject *_wrap_wxValidator_IsSilent(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxValidator::IsSilent(); + _result = (bool )wxValidator::IsSilent(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -747,7 +741,7 @@ static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxValidator::SetBellOnError(_arg0); + wxValidator::SetBellOnError(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -792,7 +786,7 @@ static PyObject *_wrap_new_wxPyValidator(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyValidator *)new_wxPyValidator(); + _result = (wxPyValidator *)new_wxPyValidator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -836,7 +830,7 @@ static PyObject *_wrap_wxPyValidator__setCallbackInfo(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyValidator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); + wxPyValidator__setCallbackInfo(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -903,7 +897,7 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)new_wxWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxWindow *)new_wxWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -929,7 +923,7 @@ static PyObject *_wrap_new_wxPreWindow(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)new_wxPreWindow(); + _result = (wxWindow *)new_wxPreWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -993,7 +987,7 @@ static PyObject *_wrap_wxWindow_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1020,7 +1014,7 @@ static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CaptureMouse(_arg0); + wxWindow_CaptureMouse(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1049,7 +1043,7 @@ static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Center(_arg0,_arg1); + wxWindow_Center(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1078,7 +1072,7 @@ static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Centre(_arg0,_arg1); + wxWindow_Centre(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1107,7 +1101,7 @@ static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CentreOnParent(_arg0,_arg1); + wxWindow_CentreOnParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1136,7 +1130,7 @@ static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CenterOnParent(_arg0,_arg1); + wxWindow_CenterOnParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1165,7 +1159,7 @@ static PyObject *_wrap_wxWindow_CentreOnScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CentreOnScreen(_arg0,_arg1); + wxWindow_CentreOnScreen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1194,7 +1188,7 @@ static PyObject *_wrap_wxWindow_CenterOnScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_CenterOnScreen(_arg0,_arg1); + wxWindow_CenterOnScreen(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1222,7 +1216,7 @@ static PyObject *_wrap_wxWindow_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Clear(_arg0); + wxWindow_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1264,7 +1258,7 @@ static PyObject *_wrap_wxWindow_ClientToScreenXY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ClientToScreenXY(_arg0,_arg1,_arg2); + wxWindow_ClientToScreenXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1312,7 +1306,7 @@ static PyObject *_wrap_wxWindow_ClientToScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ClientToScreen(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ClientToScreen(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1342,7 +1336,7 @@ static PyObject *_wrap_wxWindow_Close(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Close(_arg0,_arg1); + _result = (bool )wxWindow_Close(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1364,7 @@ static PyObject *_wrap_wxWindow_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Destroy(_arg0); + _result = (bool )wxWindow_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1397,7 +1391,7 @@ static PyObject *_wrap_wxWindow_DestroyChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_DestroyChildren(_arg0); + wxWindow_DestroyChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1426,7 +1420,7 @@ static PyObject *_wrap_wxWindow_IsBeingDeleted(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsBeingDeleted(_arg0); + _result = (bool )wxWindow_IsBeingDeleted(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1456,7 +1450,7 @@ static PyObject *_wrap_wxWindow_DragAcceptFiles(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_DragAcceptFiles(_arg0,_arg1); + wxWindow_DragAcceptFiles(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1487,7 +1481,7 @@ static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Enable(_arg0,_arg1); + wxWindow_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1517,7 +1511,7 @@ static PyObject *_wrap_wxWindow_FindWindowById(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_FindWindowById(_arg0,_arg1); + _result = (wxWindow *)wxWindow_FindWindowById(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1546,26 +1540,13 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); + _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1596,7 +1577,7 @@ static PyObject *_wrap_wxWindow_Fit(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Fit(_arg0); + wxWindow_Fit(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1626,7 +1607,7 @@ static PyObject *_wrap_wxWindow_GetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxWindow_GetBackgroundColour(_arg0)); + _result = new wxColour (wxWindow_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1655,7 +1636,7 @@ static PyObject *_wrap_wxWindow_GetBorder(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBorder )wxWindow_GetBorder(_arg0); + _result = (wxBorder )wxWindow_GetBorder(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1686,7 +1667,7 @@ static PyObject *_wrap_wxWindow_GetChildren(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxWindow_GetChildren(_arg0); + _result = (PyObject *)wxWindow_GetChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1716,7 +1697,7 @@ static PyObject *_wrap_wxWindow_GetCharHeight(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetCharHeight(_arg0); + _result = (int )wxWindow_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1744,7 +1725,7 @@ static PyObject *_wrap_wxWindow_GetCharWidth(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetCharWidth(_arg0); + _result = (int )wxWindow_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1781,7 +1762,7 @@ static PyObject *_wrap_wxWindow_GetClientSizeTuple(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetClientSizeTuple(_arg0,_arg1,_arg2); + wxWindow_GetClientSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1821,7 +1802,7 @@ static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_GetClientSize(_arg0)); + _result = new wxSize (wxWindow_GetClientSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1851,7 +1832,7 @@ static PyObject *_wrap_wxWindow_GetClientAreaOrigin(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_GetClientAreaOrigin(_arg0)); + _result = new wxPoint (wxWindow_GetClientAreaOrigin(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1881,7 +1862,7 @@ static PyObject *_wrap_wxWindow_GetClientRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxWindow_GetClientRect(_arg0)); + _result = new wxRect (wxWindow_GetClientRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1911,7 +1892,7 @@ static PyObject *_wrap_wxWindow_GetConstraints(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutConstraints *)wxWindow_GetConstraints(_arg0); + _result = (wxLayoutConstraints *)wxWindow_GetConstraints(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1945,7 +1926,7 @@ static PyObject *_wrap_wxWindow_GetEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxWindow_GetEventHandler(_arg0); + _result = (wxEvtHandler *)wxWindow_GetEventHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1974,7 +1955,7 @@ static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxWindow_GetFont(_arg0)); + _result = new wxFont (wxWindow_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2004,7 +1985,7 @@ static PyObject *_wrap_wxWindow_GetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxWindow_GetForegroundColour(_arg0)); + _result = new wxColour (wxWindow_GetForegroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2033,7 +2014,7 @@ static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); + _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2063,7 +2044,7 @@ static PyObject *_wrap_wxWindow_GetHandle(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxWindow_GetHandle(_arg0); + _result = (long )wxWindow_GetHandle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2091,7 +2072,7 @@ static PyObject *_wrap_wxWindow_GetId(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetId(_arg0); + _result = (int )wxWindow_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2119,12 +2100,16 @@ static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetLabel(_arg0)); + _result = new wxString (wxWindow_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2152,26 +2137,13 @@ static PyObject *_wrap_wxWindow_SetLabel(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetLabel(_arg0,*_arg1); + wxWindow_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2204,12 +2176,16 @@ static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetName(_arg0)); + _result = new wxString (wxWindow_GetName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2237,7 +2213,7 @@ static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow_GetParent(_arg0); + _result = (wxWindow *)wxWindow_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2274,7 +2250,7 @@ static PyObject *_wrap_wxWindow_GetPositionTuple(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetPositionTuple(_arg0,_arg1,_arg2); + wxWindow_GetPositionTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2314,7 +2290,7 @@ static PyObject *_wrap_wxWindow_GetPosition(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_GetPosition(_arg0)); + _result = new wxPoint (wxWindow_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2344,7 +2320,7 @@ static PyObject *_wrap_wxWindow_GetRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxWindow_GetRect(_arg0)); + _result = new wxRect (wxWindow_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2374,7 +2350,7 @@ static PyObject *_wrap_wxWindow_GetScrollThumb(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetScrollThumb(_arg0,_arg1); + _result = (int )wxWindow_GetScrollThumb(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2403,7 +2379,7 @@ static PyObject *_wrap_wxWindow_GetScrollPos(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetScrollPos(_arg0,_arg1); + _result = (int )wxWindow_GetScrollPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2432,7 +2408,7 @@ static PyObject *_wrap_wxWindow_GetScrollRange(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow_GetScrollRange(_arg0,_arg1); + _result = (int )wxWindow_GetScrollRange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2469,7 +2445,7 @@ static PyObject *_wrap_wxWindow_GetSizeTuple(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetSizeTuple(_arg0,_arg1,_arg2); + wxWindow_GetSizeTuple(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2509,7 +2485,7 @@ static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_GetSize(_arg0)); + _result = new wxSize (wxWindow_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2548,26 +2524,13 @@ static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); + wxWindow_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2632,22 +2595,9 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -2658,7 +2608,7 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxWindow_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2711,12 +2661,16 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetTitle(_arg0)); + _result = new wxString (wxWindow_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2745,7 +2699,7 @@ static PyObject *_wrap_wxWindow_GetUpdateRegion(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRegion (wxWindow_GetUpdateRegion(_arg0)); + _result = new wxRegion (wxWindow_GetUpdateRegion(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2774,7 +2728,7 @@ static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxWindow_GetWindowStyleFlag(_arg0); + _result = (long )wxWindow_GetWindowStyleFlag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2802,7 +2756,7 @@ static PyObject *_wrap_wxWindow_SetWindowStyleFlag(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetWindowStyleFlag(_arg0,_arg1); + wxWindow_SetWindowStyleFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2831,7 +2785,7 @@ static PyObject *_wrap_wxWindow_SetWindowStyle(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetWindowStyle(_arg0,_arg1); + wxWindow_SetWindowStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2861,7 +2815,7 @@ static PyObject *_wrap_wxWindow_HasScrollbar(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_HasScrollbar(_arg0,_arg1); + _result = (bool )wxWindow_HasScrollbar(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2889,7 +2843,7 @@ static PyObject *_wrap_wxWindow_Hide(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Hide(_arg0); + _result = (bool )wxWindow_Hide(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2925,7 +2879,7 @@ static PyObject *_wrap_wxWindow_HitTest(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxHitTest )wxWindow_HitTest(_arg0,*_arg1); + _result = (wxHitTest )wxWindow_HitTest(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2952,7 +2906,7 @@ static PyObject *_wrap_wxWindow_InitDialog(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_InitDialog(_arg0); + wxWindow_InitDialog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2981,7 +2935,7 @@ static PyObject *_wrap_wxWindow_IsEnabled(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsEnabled(_arg0); + _result = (bool )wxWindow_IsEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3013,7 +2967,7 @@ static PyObject *_wrap_wxWindow_IsExposed(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsExposed(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxWindow_IsExposed(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3049,7 +3003,7 @@ static PyObject *_wrap_wxWindow_IsExposedPoint(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsExposedPoint(_arg0,*_arg1); + _result = (bool )wxWindow_IsExposedPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3085,7 +3039,7 @@ static PyObject *_wrap_wxWindow_IsExposedRect(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsExposedRect(_arg0,*_arg1); + _result = (bool )wxWindow_IsExposedRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3113,7 +3067,7 @@ static PyObject *_wrap_wxWindow_IsRetained(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsRetained(_arg0); + _result = (bool )wxWindow_IsRetained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3141,7 +3095,7 @@ static PyObject *_wrap_wxWindow_IsShown(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsShown(_arg0); + _result = (bool )wxWindow_IsShown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3169,7 +3123,7 @@ static PyObject *_wrap_wxWindow_IsTopLevel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_IsTopLevel(_arg0); + _result = (bool )wxWindow_IsTopLevel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3196,7 +3150,7 @@ static PyObject *_wrap_wxWindow_Layout(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Layout(_arg0); + wxWindow_Layout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3237,22 +3191,9 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -3263,7 +3204,7 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); + _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3294,7 +3235,7 @@ static PyObject *_wrap_wxWindow_Lower(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Lower(_arg0); + wxWindow_Lower(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3325,7 +3266,7 @@ static PyObject *_wrap_wxWindow_MakeModal(PyObject *self, PyObject *args, PyObje _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_MakeModal(_arg0,_arg1); + wxWindow_MakeModal(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3356,7 +3297,7 @@ static PyObject *_wrap_wxWindow_MoveXY(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_MoveXY(_arg0,_arg1,_arg2,_arg3); + wxWindow_MoveXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3393,7 +3334,7 @@ static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Move(_arg0,*_arg1,_arg2); + wxWindow_Move(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3425,7 +3366,7 @@ static PyObject *_wrap_wxWindow_PopEventHandler(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxWindow_PopEventHandler(_arg0,_arg1); + _result = (wxEvtHandler *)wxWindow_PopEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3461,7 +3402,7 @@ static PyObject *_wrap_wxWindow_PushEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_PushEventHandler(_arg0,_arg1); + wxWindow_PushEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3499,7 +3440,7 @@ static PyObject *_wrap_wxWindow_RemoveEventHandler(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1); + _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3538,7 +3479,7 @@ static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3583,7 +3524,7 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2); + _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3610,7 +3551,7 @@ static PyObject *_wrap_wxWindow_Raise(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Raise(_arg0); + wxWindow_Raise(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3650,7 +3591,7 @@ static PyObject *_wrap_wxWindow_Refresh(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Refresh(_arg0,_arg1,_arg2); + wxWindow_Refresh(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3686,7 +3627,7 @@ static PyObject *_wrap_wxWindow_RefreshRect(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_RefreshRect(_arg0,*_arg1); + wxWindow_RefreshRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3714,7 +3655,7 @@ static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ReleaseMouse(_arg0); + wxWindow_ReleaseMouse(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3751,7 +3692,7 @@ static PyObject *_wrap_wxWindow_RemoveChild(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_RemoveChild(_arg0,_arg1); + wxWindow_RemoveChild(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3789,7 +3730,7 @@ static PyObject *_wrap_wxWindow_Reparent(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Reparent(_arg0,_arg1); + _result = (bool )wxWindow_Reparent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3830,7 +3771,7 @@ static PyObject *_wrap_wxWindow_ScreenToClientXY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ScreenToClientXY(_arg0,_arg1,_arg2); + wxWindow_ScreenToClientXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3878,7 +3819,7 @@ static PyObject *_wrap_wxWindow_ScreenToClient(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ScreenToClient(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ScreenToClient(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3917,7 +3858,7 @@ static PyObject *_wrap_wxWindow_ScrollWindow(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_ScrollWindow(_arg0,_arg1,_arg2,_arg3); + wxWindow_ScrollWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3948,7 +3889,7 @@ static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetAutoLayout(_arg0,_arg1); + wxWindow_SetAutoLayout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3977,7 +3918,7 @@ static PyObject *_wrap_wxWindow_GetAutoLayout(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_GetAutoLayout(_arg0); + _result = (bool )wxWindow_GetAutoLayout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4012,7 +3953,7 @@ static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetBackgroundColour(_arg0,*_arg1); + wxWindow_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4049,7 +3990,7 @@ static PyObject *_wrap_wxWindow_SetConstraints(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetConstraints(_arg0,_arg1); + wxWindow_SetConstraints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4086,7 +4027,7 @@ static PyObject *_wrap_wxWindow_UnsetConstraints(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_UnsetConstraints(_arg0,_arg1); + wxWindow_UnsetConstraints(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4114,7 +4055,7 @@ static PyObject *_wrap_wxWindow_SetFocus(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetFocus(_arg0); + wxWindow_SetFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4143,7 +4084,7 @@ static PyObject *_wrap_wxWindow_AcceptsFocus(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_AcceptsFocus(_arg0); + _result = (bool )wxWindow_AcceptsFocus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4179,7 +4120,7 @@ static PyObject *_wrap_wxWindow_SetFont(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetFont(_arg0,*_arg1); + wxWindow_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4215,7 +4156,7 @@ static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetForegroundColour(_arg0,*_arg1); + wxWindow_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4244,7 +4185,7 @@ static PyObject *_wrap_wxWindow_SetId(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetId(_arg0,_arg1); + wxWindow_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4273,26 +4214,13 @@ static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetName(_arg0,*_arg1); + wxWindow_SetName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4329,7 +4257,7 @@ static PyObject *_wrap_wxWindow_SetScrollbar(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxWindow_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4362,7 +4290,7 @@ static PyObject *_wrap_wxWindow_SetScrollPos(PyObject *self, PyObject *args, PyO _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetScrollPos(_arg0,_arg1,_arg2,_arg3); + wxWindow_SetScrollPos(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4395,7 +4323,7 @@ static PyObject *_wrap_wxWindow_SetDimensions(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetDimensions(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxWindow_SetDimensions(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4433,7 +4361,7 @@ static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetSize(_arg0,*_arg1); + wxWindow_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4472,7 +4400,7 @@ static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetPosition(_arg0,*_arg1,_arg2); + wxWindow_SetPosition(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4511,7 +4439,7 @@ static PyObject *_wrap_wxWindow_SetRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetRect(_arg0,*_arg1,_arg2); + wxWindow_SetRect(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4545,7 +4473,7 @@ static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxWindow_SetSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4575,7 +4503,7 @@ static PyObject *_wrap_wxWindow_SetClientSizeWH(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetClientSizeWH(_arg0,_arg1,_arg2); + wxWindow_SetClientSizeWH(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4611,7 +4539,7 @@ static PyObject *_wrap_wxWindow_SetClientSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetClientSize(_arg0,*_arg1); + wxWindow_SetClientSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4648,7 +4576,7 @@ static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetCursor(_arg0,*_arg1); + wxWindow_SetCursor(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4685,7 +4613,7 @@ static PyObject *_wrap_wxWindow_SetEventHandler(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetEventHandler(_arg0,_arg1); + wxWindow_SetEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4714,7 +4642,7 @@ static PyObject *_wrap_wxWindow_SetExtraStyle(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetExtraStyle(_arg0,_arg1); + wxWindow_SetExtraStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4743,26 +4671,13 @@ static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetTitle(_arg0,*_arg1); + wxWindow_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4798,7 +4713,7 @@ static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args, PyObject *k _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Show(_arg0,_arg1); + _result = (bool )wxWindow_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4826,7 +4741,7 @@ static PyObject *_wrap_wxWindow_TransferDataFromWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_TransferDataFromWindow(_arg0); + _result = (bool )wxWindow_TransferDataFromWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4854,7 +4769,7 @@ static PyObject *_wrap_wxWindow_TransferDataToWindow(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_TransferDataToWindow(_arg0); + _result = (bool )wxWindow_TransferDataToWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4881,7 +4796,7 @@ static PyObject *_wrap_wxWindow_UpdateWindowUI(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_UpdateWindowUI(_arg0); + wxWindow_UpdateWindowUI(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4910,7 +4825,7 @@ static PyObject *_wrap_wxWindow_Validate(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_Validate(_arg0); + _result = (bool )wxWindow_Validate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4939,7 +4854,7 @@ static PyObject *_wrap_wxWindow_WarpPointer(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_WarpPointer(_arg0,_arg1,_arg2); + wxWindow_WarpPointer(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4977,7 +4892,7 @@ static PyObject *_wrap_wxWindow_ConvertDialogPointToPixels(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ConvertDialogPointToPixels(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ConvertDialogPointToPixels(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5015,7 +4930,7 @@ static PyObject *_wrap_wxWindow_ConvertDialogSizeToPixels(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_ConvertDialogSizeToPixels(_arg0,*_arg1)); + _result = new wxSize (wxWindow_ConvertDialogSizeToPixels(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5053,7 +4968,7 @@ static PyObject *_wrap_wxWindow_ConvertPixelPointToDialog(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxWindow_ConvertPixelPointToDialog(_arg0,*_arg1)); + _result = new wxPoint (wxWindow_ConvertPixelPointToDialog(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5091,7 +5006,7 @@ static PyObject *_wrap_wxWindow_ConvertPixelSizeToDialog(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_ConvertPixelSizeToDialog(_arg0,*_arg1)); + _result = new wxSize (wxWindow_ConvertPixelSizeToDialog(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5120,26 +5035,13 @@ static PyObject *_wrap_wxWindow_SetToolTipString(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetToolTipString(_arg0,*_arg1); + wxWindow_SetToolTipString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5180,7 +5082,7 @@ static PyObject *_wrap_wxWindow_SetToolTip(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetToolTip(_arg0,_arg1); + wxWindow_SetToolTip(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5209,7 +5111,7 @@ static PyObject *_wrap_wxWindow_GetToolTip(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolTip *)wxWindow_GetToolTip(_arg0); + _result = (wxToolTip *)wxWindow_GetToolTip(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5245,7 +5147,7 @@ static PyObject *_wrap_wxWindow_SetSizer(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetSizer(_arg0,_arg1); + wxWindow_SetSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5274,7 +5176,7 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxWindow_GetSizer(_arg0); + _result = (wxSizer *)wxWindow_GetSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5310,7 +5212,7 @@ static PyObject *_wrap_wxWindow_SetContainingSizer(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetContainingSizer(_arg0,_arg1); + wxWindow_SetContainingSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5339,7 +5241,7 @@ static PyObject *_wrap_wxWindow_GetContainingSizer(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxWindow_GetContainingSizer(_arg0); + _result = (wxSizer *)wxWindow_GetContainingSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5367,7 +5269,7 @@ static PyObject *_wrap_wxWindow_GetValidator(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxValidator *)wxWindow_GetValidator(_arg0); + _result = (wxValidator *)wxWindow_GetValidator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5403,7 +5305,7 @@ static PyObject *_wrap_wxWindow_SetValidator(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetValidator(_arg0,*_arg1); + wxWindow_SetValidator(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5440,7 +5342,7 @@ static PyObject *_wrap_wxWindow_SetDropTarget(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetDropTarget(_arg0,_arg1); + wxWindow_SetDropTarget(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5470,7 +5372,7 @@ static PyObject *_wrap_wxWindow_GetDropTarget(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDropTarget *)wxWindow_GetDropTarget(_arg0); + _result = (wxDropTarget *)wxWindow_GetDropTarget(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5505,7 +5407,7 @@ static PyObject *_wrap_wxWindow_GetBestSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxWindow_GetBestSize(_arg0)); + _result = new wxSize (wxWindow_GetBestSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5542,7 +5444,7 @@ static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetCaret(_arg0,_arg1); + wxWindow_SetCaret(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5572,7 +5474,7 @@ static PyObject *_wrap_wxWindow_GetCaret(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCaret *)wxWindow_GetCaret(_arg0); + _result = (wxCaret *)wxWindow_GetCaret(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5605,7 +5507,7 @@ static PyObject *_wrap_wxWindow_Freeze(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Freeze(_arg0); + wxWindow_Freeze(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5633,7 +5535,7 @@ static PyObject *_wrap_wxWindow_Thaw(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Thaw(_arg0); + wxWindow_Thaw(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5661,7 +5563,7 @@ static PyObject *_wrap_wxWindow_Update(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_Update(_arg0); + wxWindow_Update(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5690,12 +5592,16 @@ static PyObject *_wrap_wxWindow_GetHelpText(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxWindow_GetHelpText(_arg0)); + _result = new wxString (wxWindow_GetHelpText(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -5723,26 +5629,13 @@ static PyObject *_wrap_wxWindow_SetHelpText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetHelpText(_arg0,*_arg1); + wxWindow_SetHelpText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5775,26 +5668,13 @@ static PyObject *_wrap_wxWindow_SetHelpTextForId(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetHelpTextForId(_arg0,*_arg1); + wxWindow_SetHelpTextForId(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5828,7 +5708,7 @@ static PyObject *_wrap_wxWindow_ScrollLines(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_ScrollLines(_arg0,_arg1); + _result = (bool )wxWindow_ScrollLines(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5857,7 +5737,7 @@ static PyObject *_wrap_wxWindow_ScrollPages(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_ScrollPages(_arg0,_arg1); + _result = (bool )wxWindow_ScrollPages(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5885,7 +5765,7 @@ static PyObject *_wrap_wxWindow_LineUp(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LineUp(_arg0); + _result = (bool )wxWindow_LineUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5913,7 +5793,7 @@ static PyObject *_wrap_wxWindow_LineDown(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LineDown(_arg0); + _result = (bool )wxWindow_LineDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5941,7 +5821,7 @@ static PyObject *_wrap_wxWindow_PageUp(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PageUp(_arg0); + _result = (bool )wxWindow_PageUp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5969,7 +5849,7 @@ static PyObject *_wrap_wxWindow_PageDown(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_PageDown(_arg0); + _result = (bool )wxWindow_PageDown(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5987,7 +5867,7 @@ static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxWindow::FindFocus(); + _result = (wxWindow *)wxWindow::FindFocus(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6005,7 +5885,7 @@ static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow::NewControlId(); + _result = (int )wxWindow::NewControlId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6024,7 +5904,7 @@ static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow::NextControlId(_arg0); + _result = (int )wxWindow::NextControlId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6043,7 +5923,7 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxWindow::PrevControlId(_arg0); + _result = (int )wxWindow::PrevControlId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6079,7 +5959,7 @@ static PyObject *_wrap_wxWindow_SetAcceleratorTable(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetAcceleratorTable(_arg0,*_arg1); + wxWindow_SetAcceleratorTable(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6109,7 +5989,7 @@ static PyObject *_wrap_wxWindow_GetAcceleratorTable(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorTable *)wxWindow_GetAcceleratorTable(_arg0); + _result = (wxAcceleratorTable *)wxWindow_GetAcceleratorTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6151,7 +6031,7 @@ static PyObject *_wrap_wxWindow_OnPaint(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_OnPaint(_arg0,*_arg1); + wxWindow_OnPaint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6180,7 +6060,7 @@ static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)wxWindow_GetDefaultItem(_arg0); + _result = (wxButton *)wxWindow_GetDefaultItem(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6216,7 +6096,7 @@ static PyObject *_wrap_wxWindow_SetDefaultItem(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_SetDefaultItem(_arg0,_arg1); + wxWindow_SetDefaultItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6291,7 +6171,7 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPanel *)new_wxPanel(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxPanel *)new_wxPanel(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6317,7 +6197,7 @@ static PyObject *_wrap_new_wxPrePanel(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPanel *)new_wxPrePanel(); + _result = (wxPanel *)new_wxPrePanel(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6381,7 +6261,7 @@ static PyObject *_wrap_wxPanel_Create(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPanel_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxPanel_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6408,7 +6288,7 @@ static PyObject *_wrap_wxPanel_InitDialog(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPanel_InitDialog(_arg0); + wxPanel_InitDialog(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6491,7 +6371,7 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrolledWindow *)new_wxScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxScrolledWindow *)new_wxScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6517,7 +6397,7 @@ static PyObject *_wrap_new_wxPreScrolledWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrolledWindow *)new_wxPreScrolledWindow(); + _result = (wxScrolledWindow *)new_wxPreScrolledWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6581,7 +6461,7 @@ static PyObject *_wrap_wxScrolledWindow_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrolledWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxScrolledWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6614,7 +6494,7 @@ static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_EnableScrolling(_arg0,_arg1,_arg2); + wxScrolledWindow_EnableScrolling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6644,7 +6524,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScrollPageSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrolledWindow_GetScrollPageSize(_arg0,_arg1); + _result = (int )wxScrolledWindow_GetScrollPageSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6681,7 +6561,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScrollPixelsPerUnit(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetScrollPixelsPerUnit(_arg0,_arg1,_arg2); + wxScrolledWindow_GetScrollPixelsPerUnit(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6720,7 +6600,7 @@ static PyObject *_wrap_wxScrolledWindow_GetTargetWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxScrolledWindow_GetTargetWindow(_arg0); + _result = (wxWindow *)wxScrolledWindow_GetTargetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6757,7 +6637,7 @@ static PyObject *_wrap_wxScrolledWindow_GetVirtualSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); + wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6796,7 +6676,7 @@ static PyObject *_wrap_wxScrolledWindow_IsRetained(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrolledWindow_IsRetained(_arg0); + _result = (bool )wxScrolledWindow_IsRetained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6832,7 +6712,7 @@ static PyObject *_wrap_wxScrolledWindow_PrepareDC(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_PrepareDC(_arg0,*_arg1); + wxScrolledWindow_PrepareDC(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6862,7 +6742,7 @@ static PyObject *_wrap_wxScrolledWindow_Scroll(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_Scroll(_arg0,_arg1,_arg2); + wxScrolledWindow_Scroll(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6897,7 +6777,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6927,7 +6807,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollPageSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetScrollPageSize(_arg0,_arg1,_arg2); + wxScrolledWindow_SetScrollPageSize(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6964,7 +6844,7 @@ static PyObject *_wrap_wxScrolledWindow_SetTargetWindow(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetTargetWindow(_arg0,_arg1); + wxScrolledWindow_SetTargetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7002,7 +6882,7 @@ static PyObject *_wrap_wxScrolledWindow_GetViewStart(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetViewStart(_arg0,_arg1,_arg2); + wxScrolledWindow_GetViewStart(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7052,7 +6932,7 @@ static PyObject *_wrap_wxScrolledWindow_CalcScrolledPosition(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); + wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7102,7 +6982,7 @@ static PyObject *_wrap_wxScrolledWindow_CalcUnscrolledPosition(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); + wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7142,7 +7022,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScale(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_SetScale(_arg0,_arg1,_arg2); + wxScrolledWindow_SetScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7171,7 +7051,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScaleX(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxScrolledWindow_GetScaleX(_arg0); + _result = (double )wxScrolledWindow_GetScaleX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7199,7 +7079,7 @@ static PyObject *_wrap_wxScrolledWindow_GetScaleY(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxScrolledWindow_GetScaleY(_arg0); + _result = (double )wxScrolledWindow_GetScaleY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7226,7 +7106,7 @@ static PyObject *_wrap_wxScrolledWindow_AdjustScrollbars(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_AdjustScrollbars(_arg0); + wxScrolledWindow_AdjustScrollbars(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7266,26 +7146,13 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args, PyObject *kwar return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)new_wxMenu(*_arg0,_arg1); + _result = (wxMenu *)new_wxMenu(*_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7327,45 +7194,19 @@ static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Append(_arg0,_arg1,*_arg2,*_arg3,_arg4); + wxMenu_Append(_arg0,_arg1,*_arg2,*_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7407,22 +7248,9 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -7433,26 +7261,13 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } if (_obj4) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) return NULL; - _arg4 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_AppendMenu(_arg0,_arg1,*_arg2,_arg3,*_arg4); + wxMenu_AppendMenu(_arg0,_arg1,*_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7497,7 +7312,7 @@ static PyObject *_wrap_wxMenu_AppendItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_AppendItem(_arg0,_arg1); + wxMenu_AppendItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7525,7 +7340,7 @@ static PyObject *_wrap_wxMenu_AppendSeparator(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_AppendSeparator(_arg0); + wxMenu_AppendSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7553,7 +7368,7 @@ static PyObject *_wrap_wxMenu_Break(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Break(_arg0); + wxMenu_Break(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7585,7 +7400,7 @@ static PyObject *_wrap_wxMenu_Check(PyObject *self, PyObject *args, PyObject *kw _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Check(_arg0,_arg1,_arg2); + wxMenu_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7615,7 +7430,7 @@ static PyObject *_wrap_wxMenu_IsChecked(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_IsChecked(_arg0,_arg1); + _result = (bool )wxMenu_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7646,7 +7461,7 @@ static PyObject *_wrap_wxMenu_Enable(PyObject *self, PyObject *args, PyObject *k _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Enable(_arg0,_arg1,_arg2); + wxMenu_Enable(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7676,7 +7491,7 @@ static PyObject *_wrap_wxMenu_IsEnabled(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_IsEnabled(_arg0,_arg1); + _result = (bool )wxMenu_IsEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7705,26 +7520,13 @@ static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenu_FindItem(_arg0,*_arg1); + _result = (int )wxMenu_FindItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7757,7 +7559,7 @@ static PyObject *_wrap_wxMenu_FindItemById(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenu_FindItemById(_arg0,_arg1); + _result = (wxMenuItem *)wxMenu_FindItemById(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7785,12 +7587,16 @@ static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenu_GetTitle(_arg0)); + _result = new wxString (wxMenu_GetTitle(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7818,26 +7624,13 @@ static PyObject *_wrap_wxMenu_SetTitle(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetTitle(_arg0,*_arg1); + wxMenu_SetTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7871,12 +7664,16 @@ static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenu_GetLabel(_arg0,_arg1)); + _result = new wxString (wxMenu_GetLabel(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7905,26 +7702,13 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetLabel(_arg0,_arg1,*_arg2); + wxMenu_SetLabel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7958,12 +7742,16 @@ static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenu_GetHelpString(_arg0,_arg1)); + _result = new wxString (wxMenu_GetHelpString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -7992,26 +7780,13 @@ static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetHelpString(_arg0,_arg1,*_arg2); + wxMenu_SetHelpString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8052,7 +7827,7 @@ static PyObject *_wrap_wxMenu_UpdateUI(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_UpdateUI(_arg0,_arg1); + wxMenu_UpdateUI(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8082,7 +7857,7 @@ static PyObject *_wrap_wxMenu_Delete(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_Delete(_arg0,_arg1); + _result = (bool )wxMenu_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8119,7 +7894,7 @@ static PyObject *_wrap_wxMenu_DeleteItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_DeleteItem(_arg0,_arg1); + _result = (bool )wxMenu_DeleteItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8157,7 +7932,7 @@ static PyObject *_wrap_wxMenu_Insert(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_Insert(_arg0,_arg1,_arg2); + _result = (bool )wxMenu_Insert(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8186,7 +7961,7 @@ static PyObject *_wrap_wxMenu_Remove(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenu_Remove(_arg0,_arg1); + _result = (wxMenuItem *)wxMenu_Remove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8223,7 +7998,7 @@ static PyObject *_wrap_wxMenu_RemoveItem(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenu_RemoveItem(_arg0,_arg1); + _result = (wxMenuItem *)wxMenu_RemoveItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8250,7 +8025,7 @@ static PyObject *_wrap_wxMenu_Destroy(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_Destroy(_arg0); + wxMenu_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8280,7 +8055,7 @@ static PyObject *_wrap_wxMenu_DestroyId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_DestroyId(_arg0,_arg1); + _result = (bool )wxMenu_DestroyId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8317,7 +8092,7 @@ static PyObject *_wrap_wxMenu_DestroyItem(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_DestroyItem(_arg0,_arg1); + _result = (bool )wxMenu_DestroyItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8345,7 +8120,7 @@ static PyObject *_wrap_wxMenu_GetMenuItemCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxMenu_GetMenuItemCount(_arg0); + _result = (size_t )wxMenu_GetMenuItemCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8376,7 +8151,7 @@ static PyObject *_wrap_wxMenu_GetMenuItems(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxMenu_GetMenuItems(_arg0); + _result = (PyObject *)wxMenu_GetMenuItems(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8414,7 +8189,7 @@ static PyObject *_wrap_wxMenu_SetEventHandler(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetEventHandler(_arg0,_arg1); + wxMenu_SetEventHandler(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8443,7 +8218,7 @@ static PyObject *_wrap_wxMenu_GetEventHandler(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxEvtHandler *)wxMenu_GetEventHandler(_arg0); + _result = (wxEvtHandler *)wxMenu_GetEventHandler(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8479,7 +8254,7 @@ static PyObject *_wrap_wxMenu_SetInvokingWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetInvokingWindow(_arg0,_arg1); + wxMenu_SetInvokingWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8508,7 +8283,7 @@ static PyObject *_wrap_wxMenu_GetInvokingWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxMenu_GetInvokingWindow(_arg0); + _result = (wxWindow *)wxMenu_GetInvokingWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8536,7 +8311,7 @@ static PyObject *_wrap_wxMenu_GetStyle(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxMenu_GetStyle(_arg0); + _result = (long )wxMenu_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8564,7 +8339,7 @@ static PyObject *_wrap_wxMenu_IsAttached(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenu_IsAttached(_arg0); + _result = (bool )wxMenu_IsAttached(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8600,7 +8375,7 @@ static PyObject *_wrap_wxMenu_SetParent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenu_SetParent(_arg0,_arg1); + wxMenu_SetParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8629,7 +8404,7 @@ static PyObject *_wrap_wxMenu_GetParent(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenu_GetParent(_arg0); + _result = (wxMenu *)wxMenu_GetParent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8674,7 +8449,7 @@ static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)new_wxMenuBar(_arg0); + _result = (wxMenuBar *)new_wxMenuBar(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8718,26 +8493,13 @@ static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_Append(_arg0,_arg1,*_arg2); + _result = (bool )wxMenuBar_Append(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8780,26 +8542,13 @@ static PyObject *_wrap_wxMenuBar_Insert(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_Insert(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxMenuBar_Insert(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8831,7 +8580,7 @@ static PyObject *_wrap_wxMenuBar_GetMenuCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxMenuBar_GetMenuCount(_arg0); + _result = (size_t )wxMenuBar_GetMenuCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8860,7 +8609,7 @@ static PyObject *_wrap_wxMenuBar_GetMenu(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); + _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8899,26 +8648,13 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuBar_Replace(_arg0,_arg1,_arg2,*_arg3); + _result = (wxMenu *)wxMenuBar_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8951,7 +8687,7 @@ static PyObject *_wrap_wxMenuBar_Remove(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuBar_Remove(_arg0,_arg1); + _result = (wxMenu *)wxMenuBar_Remove(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8982,7 +8718,7 @@ static PyObject *_wrap_wxMenuBar_EnableTop(PyObject *self, PyObject *args, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_EnableTop(_arg0,_arg1,_arg2); + wxMenuBar_EnableTop(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9012,26 +8748,13 @@ static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_SetLabelTop(_arg0,_arg1,*_arg2); + wxMenuBar_SetLabelTop(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9065,12 +8788,16 @@ static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuBar_GetLabelTop(_arg0,_arg1)); + _result = new wxString (wxMenuBar_GetLabelTop(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9099,26 +8826,13 @@ static PyObject *_wrap_wxMenuBar_FindMenu(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuBar_FindMenu(_arg0,*_arg1); + _result = (int )wxMenuBar_FindMenu(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9153,44 +8867,18 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuBar_FindMenuItem(_arg0,*_arg1,*_arg2); + _result = (int )wxMenuBar_FindMenuItem(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9227,7 +8915,7 @@ static PyObject *_wrap_wxMenuBar_FindItemById(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)wxMenuBar_FindItemById(_arg0,_arg1); + _result = (wxMenuItem *)wxMenuBar_FindItemById(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9258,7 +8946,7 @@ static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_Enable(_arg0,_arg1,_arg2); + wxMenuBar_Enable(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9290,7 +8978,7 @@ static PyObject *_wrap_wxMenuBar_Check(PyObject *self, PyObject *args, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_Check(_arg0,_arg1,_arg2); + wxMenuBar_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9320,7 +9008,7 @@ static PyObject *_wrap_wxMenuBar_IsChecked(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_IsChecked(_arg0,_arg1); + _result = (bool )wxMenuBar_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9349,7 +9037,7 @@ static PyObject *_wrap_wxMenuBar_IsEnabled(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuBar_IsEnabled(_arg0,_arg1); + _result = (bool )wxMenuBar_IsEnabled(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9378,26 +9066,13 @@ static PyObject *_wrap_wxMenuBar_SetLabel(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_SetLabel(_arg0,_arg1,*_arg2); + wxMenuBar_SetLabel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9431,12 +9106,16 @@ static PyObject *_wrap_wxMenuBar_GetLabel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuBar_GetLabel(_arg0,_arg1)); + _result = new wxString (wxMenuBar_GetLabel(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9465,26 +9144,13 @@ static PyObject *_wrap_wxMenuBar_SetHelpString(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuBar_SetHelpString(_arg0,_arg1,*_arg2); + wxMenuBar_SetHelpString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9518,12 +9184,16 @@ static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuBar_GetHelpString(_arg0,_arg1)); + _result = new wxString (wxMenuBar_GetHelpString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9569,41 +9239,15 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * } if (_obj2) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; if (_argo5) { @@ -9615,7 +9259,7 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuItem *)new_wxMenuItem(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxMenuItem *)new_wxMenuItem(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9657,7 +9301,7 @@ static PyObject *_wrap_wxMenuItem_GetMenu(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuItem_GetMenu(_arg0); + _result = (wxMenu *)wxMenuItem_GetMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9685,7 +9329,7 @@ static PyObject *_wrap_wxMenuItem_SetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetId(_arg0,_arg1); + wxMenuItem_SetId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9714,7 +9358,7 @@ static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuItem_GetId(_arg0); + _result = (int )wxMenuItem_GetId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9742,7 +9386,7 @@ static PyObject *_wrap_wxMenuItem_IsSeparator(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsSeparator(_arg0); + _result = (bool )wxMenuItem_IsSeparator(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9770,26 +9414,13 @@ static PyObject *_wrap_wxMenuItem_SetText(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetText(_arg0,*_arg1); + wxMenuItem_SetText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9822,12 +9453,16 @@ static PyObject *_wrap_wxMenuItem_GetLabel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuItem_GetLabel(_arg0)); + _result = new wxString (wxMenuItem_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9855,13 +9490,17 @@ static PyObject *_wrap_wxMenuItem_GetText(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxMenuItem_GetText(_arg0); + const wxString & _result_ref = wxMenuItem_GetText(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -9888,7 +9527,7 @@ static PyObject *_wrap_wxMenuItem_SetCheckable(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetCheckable(_arg0,_arg1); + wxMenuItem_SetCheckable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9917,7 +9556,7 @@ static PyObject *_wrap_wxMenuItem_IsCheckable(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsCheckable(_arg0); + _result = (bool )wxMenuItem_IsCheckable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9945,7 +9584,7 @@ static PyObject *_wrap_wxMenuItem_IsSubMenu(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsSubMenu(_arg0); + _result = (bool )wxMenuItem_IsSubMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9981,7 +9620,7 @@ static PyObject *_wrap_wxMenuItem_SetSubMenu(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetSubMenu(_arg0,_arg1); + wxMenuItem_SetSubMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10010,7 +9649,7 @@ static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); + _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10040,7 +9679,7 @@ static PyObject *_wrap_wxMenuItem_Enable(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_Enable(_arg0,_arg1); + wxMenuItem_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10069,7 +9708,7 @@ static PyObject *_wrap_wxMenuItem_IsEnabled(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsEnabled(_arg0); + _result = (bool )wxMenuItem_IsEnabled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10099,7 +9738,7 @@ static PyObject *_wrap_wxMenuItem_Check(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_Check(_arg0,_arg1); + wxMenuItem_Check(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10128,7 +9767,7 @@ static PyObject *_wrap_wxMenuItem_IsChecked(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsChecked(_arg0); + _result = (bool )wxMenuItem_IsChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10155,7 +9794,7 @@ static PyObject *_wrap_wxMenuItem_Toggle(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_Toggle(_arg0); + wxMenuItem_Toggle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10184,26 +9823,13 @@ static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetHelp(_arg0,*_arg1); + wxMenuItem_SetHelp(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10236,13 +9862,17 @@ static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxMenuItem_GetHelp(_arg0); + const wxString & _result_ref = wxMenuItem_GetHelp(_arg0); _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } return _resultobj; } @@ -10268,7 +9898,7 @@ static PyObject *_wrap_wxMenuItem_GetAccel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)wxMenuItem_GetAccel(_arg0); + _result = (wxAcceleratorEntry *)wxMenuItem_GetAccel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10310,7 +9940,7 @@ static PyObject *_wrap_wxMenuItem_SetAccel(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetAccel(_arg0,_arg1); + wxMenuItem_SetAccel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10330,31 +9960,22 @@ static PyObject *_wrap_wxMenuItem_GetLabelFromText(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetLabelFromText",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxMenuItem::GetLabelFromText(*_arg0)); + _result = new wxString (wxMenuItem::GetLabelFromText(*_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -10394,7 +10015,7 @@ static PyObject *_wrap_wxMenuItem_SetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetFont(_arg0,*_arg1); + wxMenuItem_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10424,7 +10045,7 @@ static PyObject *_wrap_wxMenuItem_GetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxMenuItem_GetFont(_arg0)); + _result = new wxFont (wxMenuItem_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10460,7 +10081,7 @@ static PyObject *_wrap_wxMenuItem_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetTextColour(_arg0,*_arg1); + wxMenuItem_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10490,7 +10111,7 @@ static PyObject *_wrap_wxMenuItem_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxMenuItem_GetTextColour(_arg0)); + _result = new wxColour (wxMenuItem_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10526,7 +10147,7 @@ static PyObject *_wrap_wxMenuItem_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetBackgroundColour(_arg0,*_arg1); + wxMenuItem_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10556,7 +10177,7 @@ static PyObject *_wrap_wxMenuItem_GetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxMenuItem_GetBackgroundColour(_arg0)); + _result = new wxColour (wxMenuItem_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10602,7 +10223,7 @@ static PyObject *_wrap_wxMenuItem_SetBitmaps(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetBitmaps(_arg0,*_arg1,*_arg2); + wxMenuItem_SetBitmaps(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10639,7 +10260,7 @@ static PyObject *_wrap_wxMenuItem_SetBitmap(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetBitmap(_arg0,*_arg1); + wxMenuItem_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10672,7 +10293,7 @@ static PyObject *_wrap_wxMenuItem_GetBitmap(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxMenuItem_GetBitmap(_arg0,_arg1)); + _result = new wxBitmap (wxMenuItem_GetBitmap(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10701,7 +10322,7 @@ static PyObject *_wrap_wxMenuItem_SetMarginWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_SetMarginWidth(_arg0,_arg1); + wxMenuItem_SetMarginWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10730,7 +10351,7 @@ static PyObject *_wrap_wxMenuItem_GetMarginWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuItem_GetMarginWidth(_arg0); + _result = (int )wxMenuItem_GetMarginWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10748,7 +10369,7 @@ static PyObject *_wrap_wxMenuItem_GetDefaultMarginWidth(PyObject *self, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxMenuItem::GetDefaultMarginWidth(); + _result = (int )wxMenuItem::GetDefaultMarginWidth(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10776,7 +10397,7 @@ static PyObject *_wrap_wxMenuItem_IsOwnerDrawn(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxMenuItem_IsOwnerDrawn(_arg0); + _result = (bool )wxMenuItem_IsOwnerDrawn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10803,7 +10424,7 @@ static PyObject *_wrap_wxMenuItem_ResetOwnerDrawn(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxMenuItem_ResetOwnerDrawn(_arg0); + wxMenuItem_ResetOwnerDrawn(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index e468a2c9dd..4af1f81d08 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -92,12 +92,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -149,7 +143,7 @@ static PyObject *_wrap_new_wxNotebookEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -183,7 +177,7 @@ static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebookEvent_GetSelection(_arg0); + _result = (int )wxNotebookEvent_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -211,7 +205,7 @@ static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebookEvent_GetOldSelection(_arg0); + _result = (int )wxNotebookEvent_GetOldSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -239,7 +233,7 @@ static PyObject *_wrap_wxNotebookEvent_SetOldSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookEvent_SetOldSelection(_arg0,_arg1); + wxNotebookEvent_SetOldSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -268,7 +262,7 @@ static PyObject *_wrap_wxNotebookEvent_SetSelection(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookEvent_SetSelection(_arg0,_arg1); + wxNotebookEvent_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -351,7 +345,7 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -377,7 +371,7 @@ static PyObject *_wrap_new_wxPreNotebook(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)new_wxPreNotebook(); + _result = (wxNotebook *)new_wxPreNotebook(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -441,7 +435,7 @@ static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -469,7 +463,7 @@ static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetPageCount(_arg0); + _result = (int )wxNotebook_GetPageCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -498,7 +492,7 @@ static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); + _result = (int )wxNotebook_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +522,7 @@ static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AdvanceSelection(_arg0,_arg1); + wxNotebook_AdvanceSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -557,7 +551,7 @@ static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetSelection(_arg0); + _result = (int )wxNotebook_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -587,26 +581,13 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); + _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -639,12 +620,16 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); + _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -680,7 +665,7 @@ static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetImageList(_arg0,_arg1); + wxNotebook_SetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -717,7 +702,7 @@ static PyObject *_wrap_wxNotebook_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AssignImageList(_arg0,_arg1); + wxNotebook_AssignImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -746,7 +731,7 @@ static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxNotebook_GetImageList(_arg0); + _result = (wxImageList *)wxNotebook_GetImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -775,7 +760,7 @@ static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); + _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -805,7 +790,7 @@ static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); + _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -833,7 +818,7 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetRowCount(_arg0); + _result = (int )wxNotebook_GetRowCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -868,7 +853,7 @@ static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetPageSize(_arg0,*_arg1); + wxNotebook_SetPageSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -904,7 +889,7 @@ static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetPadding(_arg0,*_arg1); + wxNotebook_SetPadding(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -934,7 +919,7 @@ static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); + _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -963,7 +948,7 @@ static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); + _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -991,7 +976,7 @@ static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_DeleteAllPages(_arg0); + _result = (bool )wxNotebook_DeleteAllPages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1031,26 +1016,13 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1096,27 +1068,14 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1149,7 +1108,7 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); + _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1179,7 +1138,7 @@ static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_ResizeChildren(_arg0); + wxNotebook_ResizeChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1234,7 +1193,7 @@ static PyObject *_wrap_new_wxSplitterEvent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); + _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1268,7 +1227,7 @@ static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetSashPosition(_arg0); + _result = (int )wxSplitterEvent_GetSashPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1296,7 +1255,7 @@ static PyObject *_wrap_wxSplitterEvent_GetX(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetX(_arg0); + _result = (int )wxSplitterEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1324,7 +1283,7 @@ static PyObject *_wrap_wxSplitterEvent_GetY(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetY(_arg0); + _result = (int )wxSplitterEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1311,7 @@ static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); + _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1380,7 +1339,7 @@ static PyObject *_wrap_wxSplitterEvent_SetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterEvent_SetSashPosition(_arg0,_arg1); + wxSplitterEvent_SetSashPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1455,7 +1414,7 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1481,7 +1440,7 @@ static PyObject *_wrap_new_wxPreSplitterWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); + _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1545,7 +1504,7 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1573,7 +1532,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1601,7 +1560,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1629,7 +1588,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSplitMode(_arg0,_arg1); + wxSplitterWindow_SetSplitMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1658,7 +1617,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSplitMode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSplitMode(_arg0); + _result = (int )wxSplitterWindow_GetSplitMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1694,7 +1653,7 @@ static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_Initialize(_arg0,_arg1); + wxSplitterWindow_Initialize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1742,7 +1701,7 @@ static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1789,7 +1748,7 @@ static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1826,7 +1785,7 @@ static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); + _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1872,7 +1831,7 @@ static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); + _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1900,7 +1859,7 @@ static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_IsSplit(_arg0); + _result = (bool )wxSplitterWindow_IsSplit(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1928,7 +1887,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSashSize(_arg0,_arg1); + wxSplitterWindow_SetSashSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1957,7 +1916,7 @@ static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetBorderSize(_arg0,_arg1); + wxSplitterWindow_SetBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1986,7 +1945,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSashSize(_arg0); + _result = (int )wxSplitterWindow_GetSashSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2014,7 +1973,7 @@ static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetBorderSize(_arg0); + _result = (int )wxSplitterWindow_GetBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2045,7 +2004,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); + wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2074,7 +2033,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSashPosition(_arg0); + _result = (int )wxSplitterWindow_GetSashPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2102,7 +2061,7 @@ static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); + wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2131,7 +2090,7 @@ static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); + _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2167,7 +2126,7 @@ static PyObject *_wrap_new_wxTaskBarIcon(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTaskBarIcon *)new_wxTaskBarIcon(); + _result = (wxTaskBarIcon *)new_wxTaskBarIcon(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2200,7 +2159,7 @@ static PyObject *_wrap_delete_wxTaskBarIcon(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTaskBarIcon(_arg0); + delete_wxTaskBarIcon(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2239,7 +2198,7 @@ static PyObject *_wrap_wxTaskBarIcon_SetIcon(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTaskBarIcon_SetIcon(_arg0,*_arg1,_arg2); + _result = (bool )wxTaskBarIcon_SetIcon(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2267,7 +2226,7 @@ static PyObject *_wrap_wxTaskBarIcon_RemoveIcon(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTaskBarIcon_RemoveIcon(_arg0); + _result = (bool )wxTaskBarIcon_RemoveIcon(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2304,7 +2263,7 @@ static PyObject *_wrap_wxTaskBarIcon_PopupMenu(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTaskBarIcon_PopupMenu(_arg0,_arg1); + _result = (bool )wxTaskBarIcon_PopupMenu(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2332,7 +2291,7 @@ static PyObject *_wrap_wxTaskBarIcon_IsIconInstalled(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTaskBarIcon_IsIconInstalled(_arg0); + _result = (bool )wxTaskBarIcon_IsIconInstalled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2360,7 +2319,7 @@ static PyObject *_wrap_wxTaskBarIcon_IsOK(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTaskBarIcon_IsOK(_arg0); + _result = (bool )wxTaskBarIcon_IsOK(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index cdc6ec04b1..f85b359096 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -90,12 +90,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - class wxPyPopupTransientWindow : public wxPopupTransientWindow { public: @@ -153,7 +147,7 @@ static PyObject *_wrap_new_wxSashEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); + _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -187,7 +181,7 @@ static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetEdge(_arg0,_arg1); + wxSashEvent_SetEdge(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -216,7 +210,7 @@ static PyObject *_wrap_wxSashEvent_GetEdge(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); + _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -251,7 +245,7 @@ static PyObject *_wrap_wxSashEvent_SetDragRect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetDragRect(_arg0,*_arg1); + wxSashEvent_SetDragRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -281,7 +275,7 @@ static PyObject *_wrap_wxSashEvent_GetDragRect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); + _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -310,7 +304,7 @@ static PyObject *_wrap_wxSashEvent_SetDragStatus(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetDragStatus(_arg0,_arg1); + wxSashEvent_SetDragStatus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -339,7 +333,7 @@ static PyObject *_wrap_wxSashEvent_GetDragStatus(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); + _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -413,7 +407,7 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -439,7 +433,7 @@ static PyObject *_wrap_new_wxPreSashWindow(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashWindow *)new_wxPreSashWindow(); + _result = (wxSashWindow *)new_wxPreSashWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -503,7 +497,7 @@ static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -532,7 +526,7 @@ static PyObject *_wrap_wxSashWindow_GetSashVisible(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); + _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -560,7 +554,7 @@ static PyObject *_wrap_wxSashWindow_GetDefaultBorderSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); + _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -589,7 +583,7 @@ static PyObject *_wrap_wxSashWindow_GetEdgeMargin(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); + _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -617,7 +611,7 @@ static PyObject *_wrap_wxSashWindow_GetExtraBorderSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); + _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -645,7 +639,7 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); + _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -673,7 +667,7 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); + _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -701,7 +695,7 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); + _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -729,7 +723,7 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); + _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -758,7 +752,7 @@ static PyObject *_wrap_wxSashWindow_HasBorder(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); + _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -786,7 +780,7 @@ static PyObject *_wrap_wxSashWindow_SetDefaultBorderSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); + wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -815,7 +809,7 @@ static PyObject *_wrap_wxSashWindow_SetExtraBorderSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetExtraBorderSize(_arg0,_arg1); + wxSashWindow_SetExtraBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -844,7 +838,7 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMaximumSizeX(_arg0,_arg1); + wxSashWindow_SetMaximumSizeX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -873,7 +867,7 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMaximumSizeY(_arg0,_arg1); + wxSashWindow_SetMaximumSizeY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -902,7 +896,7 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMinimumSizeX(_arg0,_arg1); + wxSashWindow_SetMinimumSizeX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -931,7 +925,7 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMinimumSizeY(_arg0,_arg1); + wxSashWindow_SetMinimumSizeY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -963,7 +957,7 @@ static PyObject *_wrap_wxSashWindow_SetSashVisible(PyObject *self, PyObject *arg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); + wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -995,7 +989,7 @@ static PyObject *_wrap_wxSashWindow_SetSashBorder(PyObject *self, PyObject *args _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); + wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1033,7 +1027,7 @@ static PyObject *_wrap_new_wxQueryLayoutInfoEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); + _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1067,7 +1061,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1096,7 +1090,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetRequestedLength(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); + _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1124,7 +1118,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1153,7 +1147,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); + _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1188,7 +1182,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); + wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1218,7 +1212,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); + _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1247,7 +1241,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetOrientation(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1276,7 +1270,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetOrientation(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); + _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1304,7 +1298,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetAlignment(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1333,7 +1327,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetAlignment(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); + _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1370,7 +1364,7 @@ static PyObject *_wrap_new_wxCalculateLayoutEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); + _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1404,7 +1398,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); + wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1433,7 +1427,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); + _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1468,7 +1462,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); + wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1498,7 +1492,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); + _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1581,7 +1575,7 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1607,7 +1601,7 @@ static PyObject *_wrap_new_wxPreSashLayoutWindow(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); + _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1671,7 +1665,7 @@ static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1699,7 +1693,7 @@ static PyObject *_wrap_wxSashLayoutWindow_GetAlignment(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); + _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1727,7 +1721,7 @@ static PyObject *_wrap_wxSashLayoutWindow_GetOrientation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); + _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1755,7 +1749,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetAlignment(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetAlignment(_arg0,_arg1); + wxSashLayoutWindow_SetAlignment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1791,7 +1785,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetDefaultSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); + wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1820,7 +1814,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetOrientation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetOrientation(_arg0,_arg1); + wxSashLayoutWindow_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1849,7 +1843,7 @@ static PyObject *_wrap_new_wxLayoutAlgorithm(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); + _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1882,7 +1876,7 @@ static PyObject *_wrap_delete_wxLayoutAlgorithm(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLayoutAlgorithm(_arg0); + delete_wxLayoutAlgorithm(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1929,7 +1923,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutMDIFrame(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1975,7 +1969,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutFrame(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2021,7 +2015,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2075,7 +2069,7 @@ static PyObject *_wrap_new_wxPopupWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); + _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2101,7 +2095,7 @@ static PyObject *_wrap_new_wxPrePopupWindow(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPopupWindow *)new_wxPrePopupWindow(); + _result = (wxPopupWindow *)new_wxPrePopupWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2145,7 +2139,7 @@ static PyObject *_wrap_wxPopupWindow_Create(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); + _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2188,7 +2182,7 @@ static PyObject *_wrap_wxPopupWindow_Position(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupWindow_Position(_arg0,*_arg1,*_arg2); + wxPopupWindow_Position(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2251,7 +2245,7 @@ static PyObject *_wrap_new_wxPopupTransientWindow(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); + _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2277,7 +2271,7 @@ static PyObject *_wrap_new_wxPrePopupTransientWindow(PyObject *self, PyObject *a return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); + _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2320,7 +2314,7 @@ static PyObject *_wrap_wxPopupTransientWindow__setCallbackInfo(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); + wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2357,7 +2351,7 @@ static PyObject *_wrap_wxPopupTransientWindow_Popup(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow_Popup(_arg0,_arg1); + wxPopupTransientWindow_Popup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2385,7 +2379,7 @@ static PyObject *_wrap_wxPopupTransientWindow_Dismiss(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow_Dismiss(_arg0); + wxPopupTransientWindow_Dismiss(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2464,22 +2458,9 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj3) { @@ -2489,7 +2470,7 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTipWindow *)new_wxTipWindow(_arg0,_arg1,_arg2,_arg3); + _result = (wxTipWindow *)new_wxTipWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2534,7 +2515,7 @@ static PyObject *_wrap_wxTipWindow_SetBoundingRect(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTipWindow_SetBoundingRect(_arg0,*_arg1); + wxTipWindow_SetBoundingRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2562,7 +2543,7 @@ static PyObject *_wrap_wxTipWindow_Close(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTipWindow_Close(_arg0); + wxTipWindow_Close(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index d4720b992a..2c6c7feda7 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -84,12 +84,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - #include @@ -652,6 +646,7 @@ static wxPyCoreAPI API = { wxPyConstructObject, wxPy_ConvertList, + wxString_in_helper, byte_LIST_helper, int_LIST_helper, long_LIST_helper, @@ -701,7 +696,7 @@ static PyObject *_wrap_ptrcast(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrcast(_arg0,_arg1); + _result = (PyObject *)ptrcast(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -728,7 +723,7 @@ static PyObject *_wrap_ptrvalue(PyObject *self, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); + _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -760,7 +755,7 @@ static PyObject *_wrap_ptrset(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); + _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -788,7 +783,7 @@ static PyObject *_wrap_ptrcreate(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); + _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -813,7 +808,7 @@ static PyObject *_wrap_ptrfree(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptrfree(_arg0); + _result = (PyObject *)ptrfree(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -839,7 +834,7 @@ static PyObject *_wrap_ptradd(PyObject *self, PyObject *args, PyObject *kwargs) } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)ptradd(_arg0,_arg1); + _result = (PyObject *)ptradd(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -860,7 +855,7 @@ static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - ptrmap(_arg0,_arg1); + ptrmap(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -910,7 +905,7 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyApp *)wxGetApp(); + _result = (wxPyApp *)wxGetApp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -933,7 +928,7 @@ static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxApp_CleanUp(); + wxApp_CleanUp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -974,7 +969,7 @@ static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyApp *)new_wxPyApp(); + _result = (wxPyApp *)new_wxPyApp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1007,7 +1002,7 @@ static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPyApp(_arg0); + delete_wxPyApp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1036,12 +1031,16 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyApp_GetAppName(_arg0)); + _result = new wxString (wxPyApp_GetAppName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1069,7 +1068,7 @@ static PyObject *_wrap_wxPyApp_GetAuto3D(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_GetAuto3D(_arg0); + _result = (bool )wxPyApp_GetAuto3D(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1097,12 +1096,16 @@ static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyApp_GetClassName(_arg0)); + _result = new wxString (wxPyApp_GetClassName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1130,7 +1133,7 @@ static PyObject *_wrap_wxPyApp_GetExitOnFrameDelete(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); + _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1158,7 +1161,7 @@ static PyObject *_wrap_wxPyApp_GetPrintMode(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyApp_GetPrintMode(_arg0); + _result = (int )wxPyApp_GetPrintMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1186,7 +1189,7 @@ static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); + _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1214,12 +1217,16 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxPyApp_GetVendorName(_arg0)); + _result = new wxString (wxPyApp_GetVendorName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -1247,7 +1254,7 @@ static PyObject *_wrap_wxPyApp_GetUseBestVisual(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_GetUseBestVisual(_arg0); + _result = (bool )wxPyApp_GetUseBestVisual(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1274,7 +1281,7 @@ static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_Dispatch(_arg0); + wxPyApp_Dispatch(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1302,7 +1309,7 @@ static PyObject *_wrap_wxPyApp_ExitMainLoop(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_ExitMainLoop(_arg0); + wxPyApp_ExitMainLoop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1338,7 @@ static PyObject *_wrap_wxPyApp_Initialized(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_Initialized(_arg0); + _result = (bool )wxPyApp_Initialized(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1359,7 +1366,7 @@ static PyObject *_wrap_wxPyApp_MainLoop(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPyApp_MainLoop(_arg0); + _result = (int )wxPyApp_MainLoop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1387,7 +1394,7 @@ static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_Pending(_arg0); + _result = (bool )wxPyApp_Pending(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1415,7 +1422,7 @@ static PyObject *_wrap_wxPyApp_ProcessIdle(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPyApp_ProcessIdle(_arg0); + _result = (bool )wxPyApp_ProcessIdle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1443,26 +1450,13 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetAppName(_arg0,*_arg1); + wxPyApp_SetAppName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1497,7 +1491,7 @@ static PyObject *_wrap_wxPyApp_SetAuto3D(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetAuto3D(_arg0,_arg1); + wxPyApp_SetAuto3D(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1526,26 +1520,13 @@ static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetClassName(_arg0,*_arg1); + wxPyApp_SetClassName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1580,7 +1561,7 @@ static PyObject *_wrap_wxPyApp_SetExitOnFrameDelete(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); + wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1609,7 +1590,7 @@ static PyObject *_wrap_wxPyApp_SetPrintMode(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetPrintMode(_arg0,_arg1); + wxPyApp_SetPrintMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1646,7 +1627,7 @@ static PyObject *_wrap_wxPyApp_SetTopWindow(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetTopWindow(_arg0,_arg1); + wxPyApp_SetTopWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1675,26 +1656,13 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetVendorName(_arg0,*_arg1); + wxPyApp_SetVendorName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1729,7 +1697,7 @@ static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args, _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyApp_SetUseBestVisual(_arg0,_arg1); + wxPyApp_SetUseBestVisual(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,7 +1728,7 @@ static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1)); + _result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2695,7 +2663,12 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION )); PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER )); PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER )); +#if wxUSE_UNICODE + wxString tempStr(wxVERSION_STRING); + PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromUnicode(tempStr.c_str(), tempStr.Len())); +#else PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING)); +#endif { diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index 2a2b12e23b..1c712edc4f 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -16,7 +16,7 @@ %except(python) { PyThreadState* __tstate = wxPyBeginAllowThreads(); - $function +$function wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } @@ -151,63 +151,14 @@ //--------------------------------------------------------------------------- -%{ -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif -%} - -// TODO: Which works best??? - -// Implementation #1 -// %typemap(python, in) wxString& (PyObject* temp, int tmpDoDecRef) { -// temp = $source; -// tmpDoDecRef = 0; -// #if PYTHON_API_VERSION >= 1009 -// if (PyUnicode_Check(temp) { -// temp = PyUnicode_AsUTF8String(temp); -// if (! temp) { -// PyErr_SetString(PyExc_TypeError, "Unicode encoding to UTF8 failed."); -// return NULL; -// } -// tmpDoDecRef = 1; -// #endif -// if (!PyString_Check(temp)) { -// PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); -// return NULL; -// } -// $target = new wxString(PyString_AsString(temp), PyString_Size(temp)); -// #if PYTHON_API_VERESION >= 1009 -// if (tmpDoDecRef) Py_DECREF(temp); -// #endif -// } - - -// Implementation #2 + %typemap(python, in) wxString& { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check($source) && !PyUnicode_Check($source)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize($source, &tmpPtr, &tmpSize) == -1) + $target = wxString_in_helper($source); + if ($target == NULL) return NULL; - $target = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check($source)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - $target = new wxString(PyString_AS_STRING($source), PyString_GET_SIZE($source)); -#endif } - - %typemap(python, freearg) wxString& { if ($target) delete $source; @@ -216,7 +167,11 @@ %typemap(python, out) wxString { +#if wxUSE_UNICODE + $target = PyUnicode_FromUnicode($source->c_str(), $source->Len()); +#else $target = PyString_FromStringAndSize($source->c_str(), $source->Len()); +#endif } %typemap(python, ret) wxString { delete $source; @@ -224,7 +179,11 @@ %typemap(python, out) wxString* { +#if wxUSE_UNICODE + $target = PyUnicode_FromUnicode($source->c_str(), $source->Len()); +#else $target = PyString_FromStringAndSize($source->c_str(), $source->Len()); +#endif } @@ -281,8 +240,13 @@ int i, len=PySequence_Length($source); for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else PyObject* str = PyObject_Str(item); $target->Add(PyString_AsString(str)); +#endif Py_DECREF(item); Py_DECREF(str); } diff --git a/wxPython/src/streams.i b/wxPython/src/streams.i index 376b22d0f4..6c89fe14ad 100644 --- a/wxPython/src/streams.i +++ b/wxPython/src/streams.i @@ -74,7 +74,11 @@ wxStringPtrList::Node *node = $source->GetFirst(); for (int i=0; node; i++) { wxString *s = node->GetData(); +#if wxUSE_UNICODE + PyList_SetItem($target, i, PyUnicode_FromUnicode(s->c_str(), s->Len())); +#else PyList_SetItem($target, i, PyString_FromStringAndSize(s->c_str(), s->Len())); +#endif node = node->GetNext(); delete s; } diff --git a/wxPython/src/utils.i b/wxPython/src/utils.i index eb04fabdb4..67821cbaba 100644 --- a/wxPython/src/utils.i +++ b/wxPython/src/utils.i @@ -38,7 +38,11 @@ PyObject* ret = PyTuple_New(3); if (ret) { PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); - PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); +#if wxUSE_UNICODE + PyTuple_SET_ITEM(ret, 1, PyUnicode_FromUnicode(str.c_str(), str.Len())); +#else + PyTuple_SET_ITEM(ret, 1, PyString_FromStringAndSize(str.c_str(), str.Len())); +#endif PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); } return ret; @@ -767,32 +771,32 @@ public: // parse a string in RFC 822 format (found e.g. in mail headers and // having the form "Wed, 10 Feb 1999 19:07:07 +0100") - const char *ParseRfc822Date(const char* date); + const char *ParseRfc822Date(const wxChar* date); // parse a date/time in the given format (see strptime(3)), fill in // the missing (in the string) fields with the values of dateDef (by // default, they will not change if they had valid values or will // default to Today() otherwise) - const char *ParseFormat(const char *date, - const char *format = "%c", + const char *ParseFormat(const wxChar *date, + const wxChar *format = "%c", const wxDateTime& dateDef = wxDefaultDateTime); // parse a string containing the date/time in "free" format, this // function will try to make an educated guess at the string contents - const char *ParseDateTime(const char *datetime); + const char *ParseDateTime(const wxChar *datetime); // parse a string containing the date only in "free" format (less // flexible than ParseDateTime) - const char *ParseDate(const char *date); + const char *ParseDate(const wxChar *date); // parse a string containing the time only in "free" format - const char *ParseTime(const char *time); + const char *ParseTime(const wxChar *time); // this function accepts strftime()-like format string (default // argument corresponds to the preferred date and time representation // for the current locale) and returns the string containing the // resulting text representation - wxString Format(const char *format = "%c", + wxString Format(const wxChar *format = "%c", const wxDateTime::TimeZone& tz = LOCAL) const; // preferred date representation for the current locale @@ -942,7 +946,7 @@ public: // resulting text representation. Notice that only some of format // specifiers valid for wxDateTime are valid for wxTimeSpan: hours, // minutes and seconds make sense, but not "PM/AM" string for example. - wxString Format(const char *format = "%c") const; + wxString Format(const wxChar *format = "%c") const; // // preferred date representation for the current locale // wxString FormatDate() const; diff --git a/wxPython/src/wx.i b/wxPython/src/wx.i index d9f79e7041..9889ca98d4 100644 --- a/wxPython/src/wx.i +++ b/wxPython/src/wx.i @@ -175,6 +175,7 @@ static wxPyCoreAPI API = { wxPyConstructObject, wxPy_ConvertList, + wxString_in_helper, byte_LIST_helper, int_LIST_helper, long_LIST_helper, @@ -249,7 +250,12 @@ static wxPyCoreAPI API = { PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION )); PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER )); PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER )); +#if wxUSE_UNICODE + wxString tempStr(wxVERSION_STRING); + PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromUnicode(tempStr.c_str(), tempStr.Len())); +#else PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING)); +#endif %} -- 2.45.2