From 6824d4f9e0f6e7d97124a47ab2d75a551ed209ac Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 10 Mar 2002 00:40:13 +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@14535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/glcanvas/mac/glcanvas.cpp | 28 +- wxPython/contrib/stc/mac/stc_.cpp | 1122 +++++-------- wxPython/src/mac/calendar.cpp | 108 +- wxPython/src/mac/cmndlgs.cpp | 582 +++---- wxPython/src/mac/controls.cpp | 1135 +++++-------- wxPython/src/mac/controls2.cpp | 1084 +++++-------- wxPython/src/mac/events.cpp | 486 +++--- wxPython/src/mac/filesys.cpp | 600 ++----- wxPython/src/mac/frames.cpp | 301 +--- wxPython/src/mac/gdi.cpp | 1078 +++++-------- wxPython/src/mac/grid.cpp | 1218 ++++++-------- wxPython/src/mac/help.cpp | 132 +- wxPython/src/mac/html.cpp | 978 ++++-------- wxPython/src/mac/htmlhelp.cpp | 781 ++------- wxPython/src/mac/image.cpp | 580 ++----- wxPython/src/mac/mdi.cpp | 114 +- wxPython/src/mac/misc.cpp | 450 +++--- wxPython/src/mac/misc2.cpp | 1675 ++++++++------------ wxPython/src/mac/printfw.cpp | 470 +++--- wxPython/src/mac/sizers.cpp | 174 +- wxPython/src/mac/stattool.cpp | 448 ++---- wxPython/src/mac/streams.cpp | 55 +- wxPython/src/mac/utils.cpp | 1096 ++++--------- wxPython/src/mac/windows.cpp | 1181 +++++--------- wxPython/src/mac/windows2.cpp | 173 +- wxPython/src/mac/windows3.cpp | 118 +- wxPython/src/mac/wx.cpp | 139 +- 27 files changed, 5672 insertions(+), 10634 deletions(-) diff --git a/wxPython/contrib/glcanvas/mac/glcanvas.cpp b/wxPython/contrib/glcanvas/mac/glcanvas.cpp index 7d0a9ded49..80c3fe24d3 100644 --- a/wxPython/contrib/glcanvas/mac/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/mac/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 @@ -125,7 +119,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; @@ -153,7 +147,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; @@ -182,7 +176,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; @@ -210,7 +204,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; @@ -239,7 +233,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; @@ -338,7 +332,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; @@ -431,7 +425,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; @@ -467,7 +461,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; @@ -496,7 +490,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; @@ -524,7 +518,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; @@ -554,7 +548,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/stc/mac/stc_.cpp b/wxPython/contrib/stc/mac/stc_.cpp index 6cd5226926..19d4a362f0 100644 --- a/wxPython/contrib/stc/mac/stc_.cpp +++ b/wxPython/contrib/stc/mac/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; @@ -9692,7 +9372,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; @@ -9721,7 +9401,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; @@ -9749,7 +9429,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; @@ -9777,7 +9457,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; @@ -9805,7 +9485,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; @@ -9833,12 +9513,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; @@ -9866,7 +9550,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; @@ -9894,7 +9578,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; @@ -9922,7 +9606,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; @@ -9950,7 +9634,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; @@ -9978,7 +9662,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; @@ -10006,7 +9690,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; @@ -10034,7 +9718,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; @@ -10062,7 +9746,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; @@ -10090,7 +9774,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; @@ -10118,7 +9802,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; @@ -10146,7 +9830,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; @@ -10174,7 +9858,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; @@ -10202,12 +9886,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; @@ -10235,7 +9923,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; @@ -10264,7 +9952,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragResult(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDragResult (wxStyledTextEvent_GetDragResult(_arg0)); + _result = new wxDragResult (wxStyledTextEvent_GetDragResult(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10293,7 +9981,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; @@ -10321,7 +10009,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; @@ -10349,7 +10037,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; @@ -10378,7 +10066,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/src/mac/calendar.cpp b/wxPython/src/mac/calendar.cpp index ce37ed56c7..5cdd65314a 100644 --- a/wxPython/src/mac/calendar.cpp +++ b/wxPython/src/mac/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/mac/cmndlgs.cpp b/wxPython/src/mac/cmndlgs.cpp index 34b5c17929..a1f9c2fed5 100644 --- a/wxPython/src/mac/cmndlgs.cpp +++ b/wxPython/src/mac/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/mac/controls.cpp b/wxPython/src/mac/controls.cpp index 53efc2151e..8d20ad5467 100644 --- a/wxPython/src/mac/controls.cpp +++ b/wxPython/src/mac/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) + _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(); - 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) + _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(); - 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); + _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) { @@ -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) + _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) { @@ -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; @@ -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) + _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) { @@ -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); - 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) { @@ -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; @@ -2737,7 +2618,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; @@ -2766,7 +2647,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; @@ -2858,7 +2739,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; @@ -2888,7 +2769,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; @@ -2916,7 +2797,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; @@ -2945,7 +2826,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; @@ -2973,7 +2854,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; @@ -3001,12 +2882,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; @@ -3033,7 +2918,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; @@ -3064,26 +2949,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); + _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(); - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); + wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3117,7 +2989,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; @@ -3146,7 +3018,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; @@ -3174,7 +3046,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; @@ -3203,7 +3075,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; @@ -3233,7 +3105,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; @@ -3262,26 +3134,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; @@ -3316,7 +3175,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; @@ -3409,7 +3268,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; @@ -3435,7 +3294,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; @@ -3509,7 +3368,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; @@ -3537,7 +3396,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; @@ -3565,7 +3424,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; @@ -3593,7 +3452,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; @@ -3621,7 +3480,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; @@ -3649,7 +3508,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; @@ -3678,7 +3537,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; @@ -3707,7 +3566,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; @@ -3736,7 +3595,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; @@ -3808,22 +3667,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) - 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) { @@ -3839,7 +3685,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; @@ -3869,7 +3715,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; @@ -3922,22 +3768,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) { @@ -3953,7 +3786,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; @@ -4039,7 +3872,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; @@ -4065,7 +3898,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; @@ -4129,7 +3962,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; @@ -4200,22 +4033,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) { @@ -4231,7 +4051,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; @@ -4261,7 +4081,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; @@ -4314,22 +4134,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) { @@ -4345,7 +4152,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; @@ -4377,12 +4184,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; @@ -4410,26 +4221,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); - 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(); - wxStaticText_SetLabel(_arg0,*_arg1); + wxStaticText_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4551,7 +4349,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; @@ -4580,7 +4378,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; @@ -4671,7 +4469,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; @@ -4701,7 +4499,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; @@ -4730,7 +4528,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; @@ -4767,7 +4565,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; @@ -4814,7 +4612,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; @@ -4847,7 +4645,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; @@ -4876,7 +4674,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; @@ -4921,7 +4719,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; @@ -4953,7 +4751,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; @@ -4982,26 +4780,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); + _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(); - wxListBox_SetFirstItemStr(_arg0,*_arg1); + wxListBox_SetFirstItemStr(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5037,7 +4822,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; @@ -5067,26 +4852,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); - 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(); - wxListBox_SetString(_arg0,_arg1,*_arg2); + wxListBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5121,27 +4893,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); + _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(); - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); + wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5271,7 +5030,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; @@ -5300,7 +5059,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; @@ -5391,7 +5150,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; @@ -5423,7 +5182,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; @@ -5452,7 +5211,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; @@ -5498,7 +5257,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; @@ -5549,7 +5308,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; @@ -5582,7 +5341,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; @@ -5618,7 +5377,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; @@ -5654,7 +5413,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; @@ -5691,7 +5450,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; @@ -5720,7 +5479,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; @@ -5748,7 +5507,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; @@ -5776,7 +5535,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; @@ -5805,7 +5564,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; @@ -5835,7 +5594,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; @@ -5865,7 +5624,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; @@ -5894,7 +5653,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; @@ -5940,7 +5699,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; @@ -6033,7 +5792,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; @@ -6059,7 +5818,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; @@ -6133,7 +5892,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; @@ -6161,12 +5920,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; @@ -6194,26 +5957,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) + _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_SetValue(_arg0,*_arg1); + wxTextCtrl_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6248,12 +5998,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; @@ -6282,7 +6036,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; @@ -6311,12 +6065,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; @@ -6344,7 +6102,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; @@ -6372,7 +6130,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; @@ -6400,7 +6158,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; @@ -6437,7 +6195,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; @@ -6476,12 +6234,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; @@ -6508,7 +6270,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; @@ -6539,26 +6301,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; @@ -6592,7 +6341,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; @@ -6622,26 +6371,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; @@ -6675,26 +6411,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; @@ -6725,7 +6448,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; @@ -6754,7 +6477,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; @@ -6783,26 +6506,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; @@ -6835,26 +6545,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) + _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_AppendText(_arg0,*_arg1); + wxTextCtrl_AppendText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6898,7 +6595,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; @@ -6935,7 +6632,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; @@ -6964,7 +6661,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); @@ -7001,7 +6698,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; @@ -7039,7 +6736,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; @@ -7078,7 +6775,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; @@ -7106,7 +6803,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; @@ -7134,7 +6831,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; @@ -7162,7 +6859,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; @@ -7191,7 +6888,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; @@ -7219,7 +6916,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; @@ -7247,7 +6944,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; @@ -7274,7 +6971,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; @@ -7302,7 +6999,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; @@ -7331,7 +7028,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; @@ -7359,7 +7056,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; @@ -7387,7 +7084,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; @@ -7415,7 +7112,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; @@ -7444,7 +7141,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; @@ -7472,7 +7169,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; @@ -7501,7 +7198,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; @@ -7529,7 +7226,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; @@ -7560,7 +7257,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; @@ -7591,26 +7288,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; @@ -7647,12 +7331,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; @@ -7743,7 +7431,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; @@ -7769,7 +7457,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; @@ -7842,7 +7530,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; @@ -7870,7 +7558,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; @@ -7898,7 +7586,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; @@ -7926,7 +7614,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; @@ -7954,7 +7642,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; @@ -7982,7 +7670,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; @@ -8010,7 +7698,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; @@ -8045,7 +7733,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; @@ -8128,7 +7816,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; @@ -8154,7 +7842,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; @@ -8218,7 +7906,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; @@ -8246,7 +7934,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; @@ -8274,7 +7962,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; @@ -8302,7 +7990,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; @@ -8331,7 +8019,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; @@ -8360,7 +8048,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; @@ -8452,7 +8140,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; @@ -8478,7 +8166,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; @@ -8551,7 +8239,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; @@ -8580,7 +8268,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; @@ -8617,7 +8305,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; @@ -8654,7 +8342,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; @@ -8732,22 +8420,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); + _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) { @@ -8785,7 +8460,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; @@ -8818,7 +8493,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; @@ -8877,22 +8552,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) { @@ -8930,7 +8592,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; @@ -8967,7 +8629,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; @@ -8999,7 +8661,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; @@ -9029,26 +8691,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; @@ -9081,12 +8730,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; @@ -9115,26 +8768,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) - 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(); - wxRadioBox_SetString(_arg0,_arg1,*_arg2); + wxRadioBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9167,7 +8807,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; @@ -9195,7 +8835,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; @@ -9223,7 +8863,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; @@ -9251,12 +8891,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; @@ -9284,7 +8928,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; @@ -9312,7 +8956,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; @@ -9341,26 +8985,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) - 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(); - wxRadioBox_SetStringSelection(_arg0,*_arg1); + wxRadioBox_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9395,7 +9026,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; @@ -9427,7 +9058,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; @@ -9501,22 +9132,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) { @@ -9539,7 +9157,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; @@ -9569,7 +9187,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; @@ -9624,22 +9242,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) + _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) { @@ -9662,7 +9267,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; @@ -9694,7 +9299,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; @@ -9724,7 +9329,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; @@ -9819,7 +9424,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; @@ -9845,7 +9450,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; @@ -9921,7 +9526,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; @@ -9948,7 +9553,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; @@ -9976,7 +9581,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; @@ -10005,7 +9610,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; @@ -10033,7 +9638,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; @@ -10061,7 +9666,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; @@ -10089,7 +9694,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; @@ -10117,7 +9722,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; @@ -10145,7 +9750,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; @@ -10173,7 +9778,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; @@ -10201,7 +9806,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; @@ -10229,7 +9834,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; @@ -10258,7 +9863,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; @@ -10288,7 +9893,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; @@ -10317,7 +9922,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; @@ -10346,7 +9951,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; @@ -10376,7 +9981,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; @@ -10405,7 +10010,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; @@ -10434,7 +10039,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; @@ -10463,7 +10068,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; @@ -10558,7 +10163,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; @@ -10584,7 +10189,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; @@ -10652,7 +10257,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; @@ -10680,7 +10285,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; @@ -10708,7 +10313,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; @@ -10736,7 +10341,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; @@ -10765,7 +10370,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; @@ -10794,7 +10399,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; diff --git a/wxPython/src/mac/controls2.cpp b/wxPython/src/mac/controls2.cpp index 16b450dcb8..58ee5818b9 100644 --- a/wxPython/src/mac/controls2.cpp +++ b/wxPython/src/mac/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/mac/events.cpp b/wxPython/src/mac/events.cpp index c88f0c4bc1..f3b78a7cf3 100644 --- a/wxPython/src/mac/events.cpp +++ b/wxPython/src/mac/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/mac/filesys.cpp b/wxPython/src/mac/filesys.cpp index 47a856c644..0ccd33e6df 100644 --- a/wxPython/src/mac/filesys.cpp +++ b/wxPython/src/mac/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/mac/frames.cpp b/wxPython/src/mac/frames.cpp index 39a79c0ed9..ae08803760 100644 --- a/wxPython/src/mac/frames.cpp +++ b/wxPython/src/mac/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/mac/gdi.cpp b/wxPython/src/mac/gdi.cpp index e9159c87f2..fde243701e 100644 --- a/wxPython/src/mac/gdi.cpp +++ b/wxPython/src/mac/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); + _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 = (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) + _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 = (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) + _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; @@ -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); - return NULL; - } - 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; } @@ -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); + _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 = (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; @@ -2253,7 +2182,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; @@ -2281,7 +2210,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; @@ -2309,7 +2238,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; @@ -2337,7 +2266,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; @@ -2365,7 +2294,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; @@ -2394,7 +2323,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; @@ -2423,7 +2352,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; @@ -2460,7 +2389,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; @@ -2504,7 +2433,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; @@ -2533,7 +2462,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; @@ -2553,7 +2482,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; @@ -2586,7 +2515,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; @@ -2615,7 +2544,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; @@ -2643,7 +2572,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; @@ -2671,7 +2600,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; @@ -2699,7 +2628,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; @@ -2727,12 +2656,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; @@ -2760,7 +2693,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; @@ -2788,7 +2721,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; @@ -2816,7 +2749,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; @@ -2845,7 +2778,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; @@ -2874,7 +2807,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; @@ -2905,7 +2838,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; @@ -2934,26 +2867,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) - 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(); - wxNativeFontInfo_SetFaceName(_arg0,*_arg1); + wxNativeFontInfo_SetFaceName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2986,7 +2906,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; @@ -3015,7 +2935,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; @@ -3045,26 +2965,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; @@ -3096,12 +3003,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; @@ -3131,12 +3042,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; @@ -3165,26 +3080,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) - 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 )wxNativeFontInfo_FromUserString(_arg0,*_arg1); + _result = (bool )wxNativeFontInfo_FromUserString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3216,12 +3118,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; @@ -3241,7 +3147,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; @@ -3274,7 +3180,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; @@ -3316,27 +3222,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; @@ -3373,26 +3266,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; @@ -3427,27 +3307,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); + _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 = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); + _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3470,12 +3337,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; @@ -3494,12 +3365,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; @@ -3535,7 +3410,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; @@ -3564,26 +3439,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; @@ -3624,7 +3486,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; @@ -3653,26 +3515,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; @@ -3695,7 +3544,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; @@ -3738,7 +3587,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; @@ -3773,7 +3622,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; @@ -3806,7 +3655,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; @@ -3835,7 +3684,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; @@ -3863,7 +3712,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; @@ -3891,7 +3740,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; @@ -3919,7 +3768,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; @@ -3947,7 +3796,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; @@ -3975,7 +3824,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; @@ -4003,12 +3852,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; @@ -4036,7 +3889,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; @@ -4064,7 +3917,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; @@ -4093,7 +3946,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; @@ -4127,12 +3980,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; @@ -4160,12 +4017,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; @@ -4193,7 +4054,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; @@ -4222,7 +4083,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; @@ -4251,7 +4112,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; @@ -4280,7 +4141,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; @@ -4309,26 +4170,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; @@ -4363,7 +4211,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; @@ -4392,7 +4240,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; @@ -4429,7 +4277,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; @@ -4458,26 +4306,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) - 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(); - wxFont_SetNativeFontInfoUserDesc(_arg0,*_arg1); + wxFont_SetNativeFontInfoUserDesc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4510,12 +4345,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; @@ -4543,12 +4382,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; @@ -4576,12 +4419,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; @@ -4599,7 +4446,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; @@ -4617,7 +4464,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; @@ -4662,7 +4509,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; @@ -4701,7 +4548,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; @@ -4743,7 +4590,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; @@ -4772,7 +4619,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; @@ -4803,7 +4650,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; @@ -4835,7 +4682,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; @@ -4863,7 +4710,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; @@ -4890,7 +4737,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; @@ -4917,7 +4764,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; @@ -4944,7 +4791,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; @@ -4973,7 +4820,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; @@ -5007,7 +4854,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; @@ -5047,26 +4894,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; @@ -5112,12 +4946,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; @@ -5169,26 +5007,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); + _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(); - wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5239,7 +5064,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; @@ -5272,7 +5097,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; @@ -5301,7 +5126,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; @@ -5330,7 +5155,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; @@ -5359,7 +5184,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; @@ -5387,7 +5212,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; @@ -5415,7 +5240,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; @@ -5443,7 +5268,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; @@ -5471,7 +5296,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; @@ -5507,7 +5332,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; @@ -5536,7 +5361,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; @@ -5565,7 +5390,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; @@ -5594,7 +5419,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; @@ -5640,7 +5465,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; @@ -5698,7 +5523,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; @@ -5731,7 +5556,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; @@ -5777,7 +5602,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; @@ -5825,7 +5650,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; @@ -5865,7 +5690,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; @@ -5907,7 +5732,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; @@ -5936,7 +5761,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; @@ -5981,7 +5806,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; @@ -6014,7 +5839,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; @@ -6044,7 +5869,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; @@ -6074,7 +5899,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; @@ -6108,7 +5933,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; @@ -6136,7 +5961,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; @@ -6171,7 +5996,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; @@ -6208,7 +6033,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; @@ -6237,7 +6062,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; @@ -6282,7 +6107,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; @@ -6321,7 +6146,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; @@ -6363,7 +6188,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; @@ -6392,7 +6217,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; @@ -6427,7 +6252,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; @@ -6455,7 +6280,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; @@ -6501,7 +6326,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; @@ -6528,7 +6353,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; @@ -6558,7 +6383,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; @@ -6586,7 +6411,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; @@ -6616,7 +6441,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; @@ -6645,7 +6470,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; @@ -6674,7 +6499,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; @@ -6703,7 +6528,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; @@ -6736,7 +6561,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; @@ -6767,7 +6592,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; @@ -6799,7 +6624,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; @@ -6833,7 +6658,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; @@ -6872,7 +6697,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; @@ -6906,22 +6731,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; @@ -6930,7 +6742,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; @@ -6976,22 +6788,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) - 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; } @@ -7007,7 +6806,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; @@ -7043,7 +6842,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; @@ -7087,7 +6886,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; @@ -7135,7 +6934,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; @@ -7168,7 +6967,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; @@ -7200,7 +6999,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; @@ -7232,26 +7031,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) - 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_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); + wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7288,7 +7074,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; @@ -7330,7 +7116,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; @@ -7364,26 +7150,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; @@ -7415,7 +7188,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; @@ -7443,7 +7216,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; @@ -7471,7 +7244,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; @@ -7510,7 +7283,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; @@ -7540,7 +7313,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; @@ -7570,7 +7343,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; @@ -7599,7 +7372,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; @@ -7627,7 +7400,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; @@ -7674,7 +7447,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; @@ -7724,7 +7497,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; @@ -7753,7 +7526,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; @@ -7790,7 +7563,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; @@ -7829,7 +7602,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; @@ -7857,7 +7630,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; @@ -7886,7 +7659,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; @@ -7922,7 +7695,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; @@ -7965,7 +7738,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; @@ -8005,7 +7778,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; @@ -8035,7 +7808,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; @@ -8065,7 +7838,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; @@ -8104,26 +7877,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; @@ -8188,22 +7948,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); - 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 (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -8214,7 +7961,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; @@ -8268,7 +8015,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; @@ -8306,7 +8053,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; @@ -8346,7 +8093,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; @@ -8375,7 +8122,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; @@ -8404,7 +8151,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; @@ -8433,7 +8180,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; @@ -8461,7 +8208,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; @@ -8489,7 +8236,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; @@ -8517,7 +8264,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; @@ -8545,7 +8292,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; @@ -8573,7 +8320,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; @@ -8602,7 +8349,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; @@ -8639,7 +8386,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; @@ -8668,7 +8415,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; @@ -8700,7 +8447,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; @@ -8737,7 +8484,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; @@ -8774,7 +8521,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; @@ -8811,7 +8558,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; @@ -8848,7 +8595,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; @@ -8877,7 +8624,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; @@ -8907,7 +8654,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; @@ -8936,7 +8683,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; @@ -8967,7 +8714,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; @@ -9004,7 +8751,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; @@ -9040,7 +8787,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; @@ -9076,7 +8823,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; @@ -9106,7 +8853,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; @@ -9136,26 +8883,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); - return NULL; - } - 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 )wxDC_StartDoc(_arg0,*_arg1); + _result = (bool )wxDC_StartDoc(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9186,7 +8920,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; @@ -9226,7 +8960,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; @@ -9255,7 +8989,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; @@ -9283,7 +9017,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; @@ -9311,7 +9045,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; @@ -9340,7 +9074,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; @@ -9378,7 +9112,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; @@ -9418,7 +9152,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; @@ -9456,7 +9190,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; @@ -9500,7 +9234,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; @@ -9530,7 +9264,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; @@ -9558,7 +9292,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; @@ -9605,7 +9339,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; @@ -9732,7 +9466,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; @@ -9840,7 +9574,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; @@ -9878,7 +9612,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; @@ -9920,7 +9654,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; @@ -9957,7 +9691,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; @@ -10000,7 +9734,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; @@ -10037,7 +9771,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; @@ -10065,7 +9799,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; @@ -10110,7 +9844,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; @@ -10161,7 +9895,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; @@ -10212,7 +9946,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; @@ -10288,7 +10022,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; @@ -10330,7 +10064,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; @@ -10362,7 +10096,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; @@ -10406,7 +10140,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; @@ -10449,7 +10183,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; @@ -10481,7 +10215,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; @@ -10514,7 +10248,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; @@ -10561,7 +10295,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; @@ -10606,7 +10340,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; @@ -10643,7 +10377,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; @@ -10681,7 +10415,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; @@ -10725,7 +10459,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; @@ -10753,7 +10487,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; @@ -10782,7 +10516,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; @@ -10810,7 +10544,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; @@ -10848,7 +10582,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; @@ -10899,7 +10633,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; @@ -10932,7 +10666,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; @@ -10960,7 +10694,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; @@ -10991,7 +10725,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; @@ -11027,7 +10761,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; @@ -11063,7 +10797,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; @@ -11095,7 +10829,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; @@ -11124,7 +10858,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; @@ -11157,7 +10891,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; @@ -11193,7 +10927,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; @@ -11230,7 +10964,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; @@ -11258,7 +10992,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; @@ -11290,7 +11024,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; @@ -11326,7 +11060,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; @@ -11363,7 +11097,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; @@ -11395,7 +11129,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; @@ -11431,7 +11165,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; @@ -11468,7 +11202,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; @@ -11500,7 +11234,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; @@ -11536,7 +11270,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; @@ -11573,7 +11307,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; @@ -11610,7 +11344,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; @@ -11643,7 +11377,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; @@ -11672,7 +11406,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; @@ -11700,7 +11434,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; @@ -11728,7 +11462,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; @@ -11756,7 +11490,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; @@ -11784,7 +11518,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; @@ -11812,7 +11546,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; @@ -11841,7 +11575,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; @@ -11870,7 +11604,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; @@ -11897,7 +11631,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; @@ -11927,7 +11661,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/mac/grid.cpp b/wxPython/src/mac/grid.cpp index ea8265c3b5..8e5a390d5b 100644 --- a/wxPython/src/mac/grid.cpp +++ b/wxPython/src/mac/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/mac/help.cpp b/wxPython/src/mac/help.cpp index d51794a9e2..c30029a5d3 100644 --- a/wxPython/src/mac/help.cpp +++ b/wxPython/src/mac/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/mac/html.cpp b/wxPython/src/mac/html.cpp index 44393382e1..87291ec604 100644 --- a/wxPython/src/mac/html.cpp +++ b/wxPython/src/mac/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/mac/htmlhelp.cpp b/wxPython/src/mac/htmlhelp.cpp index 357156a9e2..a413f6765c 100644 --- a/wxPython/src/mac/htmlhelp.cpp +++ b/wxPython/src/mac/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/mac/image.cpp b/wxPython/src/mac/image.cpp index 3e24eb07e6..ec70e5ef80 100644 --- a/wxPython/src/mac/image.cpp +++ b/wxPython/src/mac/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/mac/mdi.cpp b/wxPython/src/mac/mdi.cpp index 9ebad78cd5..83769770fe 100644 --- a/wxPython/src/mac/mdi.cpp +++ b/wxPython/src/mac/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/mac/misc.cpp b/wxPython/src/mac/misc.cpp index bef62c912e..cd4ee760c1 100644 --- a/wxPython/src/mac/misc.cpp +++ b/wxPython/src/mac/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/mac/misc2.cpp b/wxPython/src/mac/misc2.cpp index 94becfc278..9ada81e205 100644 --- a/wxPython/src/mac/misc2.cpp +++ b/wxPython/src/mac/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/mac/printfw.cpp b/wxPython/src/mac/printfw.cpp index 141291b36d..2b67ddf8b7 100644 --- a/wxPython/src/mac/printfw.cpp +++ b/wxPython/src/mac/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/mac/sizers.cpp b/wxPython/src/mac/sizers.cpp index 44aaaf4321..f5ddce5e15 100644 --- a/wxPython/src/mac/sizers.cpp +++ b/wxPython/src/mac/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/mac/stattool.cpp b/wxPython/src/mac/stattool.cpp index 53d48f7c3d..5c25a53651 100644 --- a/wxPython/src/mac/stattool.cpp +++ b/wxPython/src/mac/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/mac/streams.cpp b/wxPython/src/mac/streams.cpp index 0dd41c5c08..9da98f25ba 100644 --- a/wxPython/src/mac/streams.cpp +++ b/wxPython/src/mac/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/mac/utils.cpp b/wxPython/src/mac/utils.cpp index e0dff9189c..1f124ce2e8 100644 --- a/wxPython/src/mac/utils.cpp +++ b/wxPython/src/mac/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/mac/windows.cpp b/wxPython/src/mac/windows.cpp index 7da08a5692..3233e99933 100644 --- a/wxPython/src/mac/windows.cpp +++ b/wxPython/src/mac/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; @@ -5376,7 +5278,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; @@ -5413,7 +5315,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; @@ -5443,7 +5345,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; @@ -5476,7 +5378,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; @@ -5504,7 +5406,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; @@ -5532,7 +5434,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; @@ -5561,12 +5463,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; @@ -5594,26 +5500,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; @@ -5646,26 +5539,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; @@ -5699,7 +5579,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; @@ -5728,7 +5608,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; @@ -5756,7 +5636,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; @@ -5784,7 +5664,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; @@ -5812,7 +5692,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; @@ -5840,7 +5720,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; @@ -5858,7 +5738,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; @@ -5876,7 +5756,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; @@ -5895,7 +5775,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; @@ -5914,7 +5794,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; @@ -5950,7 +5830,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; @@ -5980,7 +5860,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; @@ -6014,7 +5894,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; @@ -6050,7 +5930,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; @@ -6125,7 +6005,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; @@ -6151,7 +6031,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; @@ -6215,7 +6095,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; @@ -6242,7 +6122,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; @@ -6325,7 +6205,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; @@ -6351,7 +6231,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; @@ -6415,7 +6295,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; @@ -6448,7 +6328,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; @@ -6478,7 +6358,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; @@ -6515,7 +6395,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; @@ -6554,7 +6434,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; @@ -6591,7 +6471,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; @@ -6630,7 +6510,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; @@ -6666,7 +6546,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; @@ -6696,7 +6576,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; @@ -6731,7 +6611,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; @@ -6761,7 +6641,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; @@ -6798,7 +6678,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; @@ -6836,7 +6716,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; @@ -6886,7 +6766,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; @@ -6936,7 +6816,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; @@ -6976,7 +6856,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; @@ -7005,7 +6885,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; @@ -7033,7 +6913,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; @@ -7060,7 +6940,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; @@ -7100,26 +6980,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; @@ -7161,45 +7028,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; @@ -7241,22 +7082,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; } @@ -7267,26 +7095,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; @@ -7331,7 +7146,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; @@ -7359,7 +7174,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; @@ -7387,7 +7202,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; @@ -7419,7 +7234,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; @@ -7449,7 +7264,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; @@ -7480,7 +7295,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; @@ -7510,7 +7325,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; @@ -7539,26 +7354,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; @@ -7591,7 +7393,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; @@ -7619,12 +7421,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; @@ -7652,26 +7458,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; @@ -7705,12 +7498,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; @@ -7739,26 +7536,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; @@ -7792,12 +7576,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; @@ -7826,26 +7614,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; @@ -7886,7 +7661,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; @@ -7916,7 +7691,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; @@ -7953,7 +7728,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; @@ -7991,7 +7766,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; @@ -8020,7 +7795,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; @@ -8057,7 +7832,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; @@ -8084,7 +7859,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; @@ -8114,7 +7889,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; @@ -8151,7 +7926,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; @@ -8179,7 +7954,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; @@ -8210,7 +7985,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; @@ -8248,7 +8023,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; @@ -8277,7 +8052,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; @@ -8313,7 +8088,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; @@ -8342,7 +8117,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; @@ -8370,7 +8145,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; @@ -8398,7 +8173,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; @@ -8434,7 +8209,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; @@ -8463,7 +8238,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; @@ -8508,7 +8283,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; @@ -8552,26 +8327,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; @@ -8614,26 +8376,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; @@ -8665,7 +8414,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; @@ -8694,7 +8443,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; @@ -8733,26 +8482,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; @@ -8785,7 +8521,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; @@ -8816,7 +8552,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; @@ -8846,26 +8582,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; @@ -8899,12 +8622,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; @@ -8933,26 +8660,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; @@ -8987,44 +8701,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; @@ -9061,7 +8749,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; @@ -9092,7 +8780,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; @@ -9124,7 +8812,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; @@ -9154,7 +8842,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; @@ -9183,7 +8871,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; @@ -9212,26 +8900,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; @@ -9265,12 +8940,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; @@ -9299,26 +8978,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; @@ -9352,12 +9018,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; @@ -9403,41 +9073,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) { @@ -9449,7 +9093,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; @@ -9491,7 +9135,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; @@ -9519,7 +9163,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; @@ -9548,7 +9192,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; @@ -9576,7 +9220,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; @@ -9604,26 +9248,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; @@ -9656,12 +9287,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; @@ -9689,13 +9324,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; } @@ -9722,7 +9361,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; @@ -9751,7 +9390,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; @@ -9779,7 +9418,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; @@ -9815,7 +9454,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; @@ -9844,7 +9483,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; @@ -9874,7 +9513,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; @@ -9903,7 +9542,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; @@ -9933,7 +9572,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; @@ -9962,7 +9601,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; @@ -9989,7 +9628,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; @@ -10018,26 +9657,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; @@ -10070,13 +9696,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; } @@ -10102,7 +9732,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; @@ -10144,7 +9774,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; @@ -10164,31 +9794,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/mac/windows2.cpp b/wxPython/src/mac/windows2.cpp index 28b2c9719f..348bfaf953 100644 --- a/wxPython/src/mac/windows2.cpp +++ b/wxPython/src/mac/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/mac/windows3.cpp b/wxPython/src/mac/windows3.cpp index f31c5457f7..6b279e2a7a 100644 --- a/wxPython/src/mac/windows3.cpp +++ b/wxPython/src/mac/windows3.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 @@ -136,7 +130,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; @@ -170,7 +164,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; @@ -199,7 +193,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; @@ -234,7 +228,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; @@ -264,7 +258,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; @@ -293,7 +287,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; @@ -322,7 +316,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; @@ -396,7 +390,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; @@ -422,7 +416,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; @@ -486,7 +480,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; @@ -515,7 +509,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; @@ -543,7 +537,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; @@ -572,7 +566,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; @@ -600,7 +594,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; @@ -628,7 +622,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; @@ -656,7 +650,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; @@ -684,7 +678,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; @@ -712,7 +706,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; @@ -741,7 +735,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; @@ -769,7 +763,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; @@ -798,7 +792,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; @@ -827,7 +821,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; @@ -856,7 +850,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; @@ -885,7 +879,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; @@ -914,7 +908,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; @@ -946,7 +940,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; @@ -978,7 +972,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; @@ -1016,7 +1010,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; @@ -1050,7 +1044,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; @@ -1079,7 +1073,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; @@ -1107,7 +1101,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; @@ -1136,7 +1130,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; @@ -1171,7 +1165,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; @@ -1201,7 +1195,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; @@ -1230,7 +1224,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; @@ -1259,7 +1253,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; @@ -1287,7 +1281,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; @@ -1316,7 +1310,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; @@ -1353,7 +1347,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; @@ -1387,7 +1381,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; @@ -1416,7 +1410,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; @@ -1451,7 +1445,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; @@ -1481,7 +1475,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; @@ -1564,7 +1558,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; @@ -1590,7 +1584,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; @@ -1654,7 +1648,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; @@ -1682,7 +1676,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; @@ -1710,7 +1704,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; @@ -1738,7 +1732,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; @@ -1774,7 +1768,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; @@ -1803,7 +1797,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; @@ -1832,7 +1826,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; @@ -1865,7 +1859,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; @@ -1912,7 +1906,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; @@ -1958,7 +1952,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; @@ -2004,7 +1998,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; diff --git a/wxPython/src/mac/wx.cpp b/wxPython/src/mac/wx.cpp index 2056bde001..f9ddc82c85 100644 --- a/wxPython/src/mac/wx.cpp +++ b/wxPython/src/mac/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 { -- 2.45.2