From f775c30dd98039abd5c65840deb0adc990611f2f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 24 Dec 2003 02:45:57 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/msw/controls_wrap.cpp | 15 +++++- wxPython/src/msw/gdi_wrap.cpp | 75 ++++++++++++++++++++++++++++-- wxPython/src/msw/misc_wrap.cpp | 30 +++++++++++- wxPython/src/msw/windows_wrap.cpp | 15 +++++- wxPython/src/msw/wizard_wrap.cpp | 15 +++++- 5 files changed, 140 insertions(+), 10 deletions(-) diff --git a/wxPython/src/msw/controls_wrap.cpp b/wxPython/src/msw/controls_wrap.cpp index a4d4eadf2c..276d82e311 100644 --- a/wxPython/src/msw/controls_wrap.cpp +++ b/wxPython/src/msw/controls_wrap.cpp @@ -16912,6 +16912,7 @@ static PyObject *_wrap_ListItem_m_text_set(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxListItem *arg1 = (wxListItem *) 0 ; wxString *arg2 = (wxString *) 0 ; + bool temp2 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -16920,12 +16921,24 @@ static PyObject *_wrap_ListItem_m_text_set(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ListItem_m_text_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } if (arg1) (arg1)->m_text = *arg2; Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp2) + delete arg2; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } return NULL; } diff --git a/wxPython/src/msw/gdi_wrap.cpp b/wxPython/src/msw/gdi_wrap.cpp index e1bedb39d7..df99a2b7fc 100644 --- a/wxPython/src/msw/gdi_wrap.cpp +++ b/wxPython/src/msw/gdi_wrap.cpp @@ -3542,6 +3542,7 @@ static PyObject *_wrap_new_IconLocation(PyObject *self, PyObject *args, PyObject wxString *arg1 = (wxString *) &wxPyEmptyString ; int arg2 = (int) 0 ; wxIconLocation *result; + bool temp1 = False ; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "filename",(char *) "num", NULL @@ -3549,7 +3550,11 @@ static PyObject *_wrap_new_IconLocation(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|Oi:new_IconLocation",kwnames,&obj0,&arg2)) goto fail; if (obj0) { - if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = True; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3559,8 +3564,16 @@ static PyObject *_wrap_new_IconLocation(PyObject *self, PyObject *args, PyObject if (PyErr_Occurred()) SWIG_fail; } resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxIconLocation, 1); + { + if (temp1) + delete arg1; + } return resultobj; fail: + { + if (temp1) + delete arg1; + } return NULL; } @@ -3978,13 +3991,18 @@ static PyObject *_wrap_new_Cursor(PyObject *self, PyObject *args, PyObject *kwar int arg3 = (int) 0 ; int arg4 = (int) 0 ; wxCursor *result; + bool temp1 = False ; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "cursorName",(char *) "flags",(char *) "hotSpotX",(char *) "hotSpotY", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Ol|ii:new_Cursor",kwnames,&obj0,&arg2,&arg3,&arg4)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = True; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxCursor *)new_wxCursor((wxString const *)arg1,arg2,arg3,arg4); @@ -3993,8 +4011,16 @@ static PyObject *_wrap_new_Cursor(PyObject *self, PyObject *args, PyObject *kwar if (PyErr_Occurred()) SWIG_fail; } resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxCursor, 1); + { + if (temp1) + delete arg1; + } return resultobj; fail: + { + if (temp1) + delete arg1; + } return NULL; } @@ -6155,6 +6181,7 @@ static PyObject *_wrap_NativeEncodingInfo_facename_set(PyObject *self, PyObject PyObject *resultobj; wxNativeEncodingInfo *arg1 = (wxNativeEncodingInfo *) 0 ; wxString *arg2 = (wxString *) 0 ; + bool temp2 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -6163,12 +6190,24 @@ static PyObject *_wrap_NativeEncodingInfo_facename_set(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NativeEncodingInfo_facename_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNativeEncodingInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } if (arg1) (arg1)->facename = *arg2; Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp2) + delete arg2; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } return NULL; } @@ -8252,6 +8291,7 @@ static PyObject *_wrap_LanguageInfo_CanonicalName_set(PyObject *self, PyObject * PyObject *resultobj; wxLanguageInfo *arg1 = (wxLanguageInfo *) 0 ; wxString *arg2 = (wxString *) 0 ; + bool temp2 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -8260,12 +8300,24 @@ static PyObject *_wrap_LanguageInfo_CanonicalName_set(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LanguageInfo_CanonicalName_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLanguageInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } if (arg1) (arg1)->CanonicalName = *arg2; Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp2) + delete arg2; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } return NULL; } @@ -8300,6 +8352,7 @@ static PyObject *_wrap_LanguageInfo_Description_set(PyObject *self, PyObject *ar PyObject *resultobj; wxLanguageInfo *arg1 = (wxLanguageInfo *) 0 ; wxString *arg2 = (wxString *) 0 ; + bool temp2 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -8308,12 +8361,24 @@ static PyObject *_wrap_LanguageInfo_Description_set(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LanguageInfo_Description_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLanguageInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } if (arg1) (arg1)->Description = *arg2; Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp2) + delete arg2; + } return resultobj; fail: + { + if (temp2) + delete arg2; + } return NULL; } diff --git a/wxPython/src/msw/misc_wrap.cpp b/wxPython/src/msw/misc_wrap.cpp index 3fb463ebb2..66bbd1a0f7 100644 --- a/wxPython/src/msw/misc_wrap.cpp +++ b/wxPython/src/msw/misc_wrap.cpp @@ -15566,6 +15566,8 @@ static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *self, PyObject *args, P PyObject *resultobj; wxString *arg1 = (wxString *) 0 ; wxString *arg2 = (wxString *) 0 ; + bool temp1 = False ; + bool temp2 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -15573,8 +15575,16 @@ static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *self, PyObject *args, P }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DateTime_GetAmPmStrings",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = True; + } + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxDateTime::GetAmPmStrings(arg1,arg2); @@ -15583,8 +15593,24 @@ static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *self, PyObject *args, P if (PyErr_Occurred()) SWIG_fail; } Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp1) + delete arg1; + } + { + if (temp2) + delete arg2; + } return resultobj; fail: + { + if (temp1) + delete arg1; + } + { + if (temp2) + delete arg2; + } return NULL; } diff --git a/wxPython/src/msw/windows_wrap.cpp b/wxPython/src/msw/windows_wrap.cpp index 38dfbf804a..daae0f6af3 100644 --- a/wxPython/src/msw/windows_wrap.cpp +++ b/wxPython/src/msw/windows_wrap.cpp @@ -10984,6 +10984,7 @@ static PyObject *_wrap_new_MultiChoiceDialog(PyObject *self, PyObject *args, PyO wxMultiChoiceDialog *result; bool temp2 = False ; bool temp3 = False ; + bool temp5 = False ; wxPoint temp7 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -11006,7 +11007,11 @@ static PyObject *_wrap_new_MultiChoiceDialog(PyObject *self, PyObject *args, PyO if (arg3 == NULL) SWIG_fail; temp3 = True; } - if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg5 = wxString_in_helper(obj4); + if (arg5 == NULL) SWIG_fail; + temp5 = True; + } if (obj6) { { arg7 = &temp7; @@ -11029,6 +11034,10 @@ static PyObject *_wrap_new_MultiChoiceDialog(PyObject *self, PyObject *args, PyO if (temp3) delete arg3; } + { + if (temp5) + delete arg5; + } return resultobj; fail: { @@ -11039,6 +11048,10 @@ static PyObject *_wrap_new_MultiChoiceDialog(PyObject *self, PyObject *args, PyO if (temp3) delete arg3; } + { + if (temp5) + delete arg5; + } return NULL; } diff --git a/wxPython/src/msw/wizard_wrap.cpp b/wxPython/src/msw/wizard_wrap.cpp index 8280099062..78588189d1 100644 --- a/wxPython/src/msw/wizard_wrap.cpp +++ b/wxPython/src/msw/wizard_wrap.cpp @@ -615,6 +615,7 @@ static PyObject *_wrap_new_PyWizardPage(PyObject *self, PyObject *args, PyObject wxBitmap *arg2 = (wxBitmap *) &wxNullBitmap ; wxString *arg3 = (wxString *) &wxPyEmptyString ; wxPyWizardPage *result; + bool temp3 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -628,7 +629,11 @@ static PyObject *_wrap_new_PyWizardPage(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxBitmap,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } if (obj2) { - if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -638,8 +643,16 @@ static PyObject *_wrap_new_PyWizardPage(PyObject *self, PyObject *args, PyObject if (PyErr_Occurred()) SWIG_fail; } resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxPyWizardPage, 1); + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp3) + delete arg3; + } return NULL; } -- 2.45.2