]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/controls_wrap.cpp
docstring patch has been submitted to SF
[wxWidgets.git] / wxPython / src / gtk / controls_wrap.cpp
index b5f5f1f6d0781d6d334a18ec989d083bedfb478c..61f16d2bd6ecf4516e00572876b8c68e28cbc6f2 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.20
+ * Version 1.3.22
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -137,6 +137,178 @@ SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
 
 #include "Python.h"
 
+#include <limits.h>
+#include <float.h>
+
+#ifdef __cplusplus
+#define SWIG_STATIC_INLINE static inline 
+#else
+#define SWIG_STATIC_INLINE static 
+#endif 
+
+SWIG_STATIC_INLINE long
+SPyObj_AsLong(PyObject * obj)
+{
+  return PyInt_Check(obj) ?  PyInt_AsLong(obj) : PyLong_AsLong(obj);
+}
+
+SWIG_STATIC_INLINE unsigned long
+SPyObj_AsUnsignedLong(PyObject * obj) 
+{
+  if (PyLong_Check(obj)) {
+    return PyLong_AsUnsignedLong(obj);
+  } else {
+    long i = PyInt_AsLong(obj);
+    if ( !PyErr_Occurred() && (i < 0)) {
+      PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
+    }
+    return i;
+  }
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE PyObject* 
+SPyObj_FromLongLong(long long value)
+{
+  return (value > (long)(LONG_MAX)) ?
+    PyLong_FromLongLong(value) : PyInt_FromLong((long)value); 
+}
+#endif
+
+SWIG_STATIC_INLINE PyObject* 
+SPyObj_FromUnsignedLong(unsigned long value)
+{
+  return (value > (unsigned long)(LONG_MAX)) ?
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); 
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE PyObject* 
+SPyObj_FromUnsignedLongLong(unsigned long long value)
+{
+  return (value > (unsigned long long)(LONG_MAX)) ?
+    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); 
+}
+#endif
+
+SWIG_STATIC_INLINE long
+SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value)
+{
+  long value = SPyObj_AsLong(obj);
+  if (!PyErr_Occurred()) {
+    if (value < min_value) {
+      PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum");
+    } else if (value > max_value) {
+      PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum");
+    }
+  }
+  return value;
+}
+
+SWIG_STATIC_INLINE unsigned long
+SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) 
+{
+  unsigned long value = SPyObj_AsUnsignedLong(obj);
+  if (!PyErr_Occurred()) {
+    if (value > max_value) {     
+      PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum");
+    }
+  }
+  return value;
+}
+
+SWIG_STATIC_INLINE signed char
+SPyObj_AsSignedChar(PyObject *obj) { 
+  return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX);
+}
+
+SWIG_STATIC_INLINE short
+SPyObj_AsShort(PyObject *obj) { 
+  return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX);
+}
+
+SWIG_STATIC_INLINE int
+SPyObj_AsInt(PyObject *obj) { 
+  return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned char
+SPyObj_AsUnsignedChar(PyObject *obj) { 
+  return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned short 
+SPyObj_AsUnsignedShort(PyObject *obj) { 
+  return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned int
+SPyObj_AsUnsignedInt(PyObject *obj) { 
+  return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX);
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE long long
+SPyObj_AsLongLong(PyObject *obj) {
+  return PyInt_Check(obj) ?
+    PyInt_AsLong(obj) : PyLong_AsLongLong(obj);
+}
+
+SWIG_STATIC_INLINE unsigned long long
+SPyObj_AsUnsignedLongLong(PyObject *obj) {
+  return PyLong_Check(obj) ?
+    PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj);
+}
+#endif
+
+SWIG_STATIC_INLINE double
+SPyObj_AsDouble(PyObject *obj) {
+  return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
+    (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
+}
+
+SWIG_STATIC_INLINE float
+SPyObj_AsFloat(PyObject *obj) {
+  double value = SPyObj_AsDouble(obj);
+  if (!PyErr_Occurred()) {
+    if (value < FLT_MIN) {
+      PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min");
+    } else if (value > FLT_MAX) {     
+      PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max");
+    }
+  }
+  return (float) value;
+}
+
+SWIG_STATIC_INLINE char
+SPyObj_AsChar(PyObject *obj) { 
+  char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ?
+    PyString_AsString(obj)[0] 
+    : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX);
+  if (PyErr_Occurred()) {
+    PyErr_Clear();
+    PyErr_SetString(PyExc_TypeError, "a char is required");
+  }
+  return c;
+}
+
+SWIG_STATIC_INLINE PyObject *
+SPyObj_FromChar(char c) { 
+  return PyString_FromStringAndSize(&c,1);
+}
+
+SWIG_STATIC_INLINE PyObject *
+SPyObj_FromCharPtr(const char* cptr) { 
+  return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)"");
+}
+SWIG_STATIC_INLINE int
+SPyObj_AsBool(PyObject *obj) {
+    return SPyObj_AsLong/*Long*/(obj) ?  1 : 0;
+}
+
+
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -172,7 +344,7 @@ typedef struct swig_const_info {
   SWIG_Python_NewPointerObj(p, type, flags)
 #define SWIG_MustGetPtr(p, type, argnum, flags) \
   SWIG_Python_MustGetPtr(p, type, argnum, flags)
-
 /* Python-specific SWIG API */
 #define SWIG_newvarlink() \
   SWIG_Python_newvarlink()
@@ -377,8 +549,6 @@ wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to){
  static const wxString wxPyScrollBarNameStr(wxScrollBarNameStr); 
  static const wxString wxPySPIN_BUTTON_NAME(wxSPIN_BUTTON_NAME); 
  static const wxString wxPySpinCtrlNameStr(_T("wxSpinCtrl")); 
-void wxSpinCtrl_SetSelection(wxSpinCtrl *self,long from,long to){
-        }
  static const wxString wxPyRadioBoxNameStr(wxRadioBoxNameStr); 
  static const wxString wxPyRadioButtonNameStr(wxRadioButtonNameStr); 
 int wxRadioBox_GetColumnCount(wxRadioBox const *self){ return -1; }
@@ -1857,8 +2027,10 @@ static PyObject *_wrap_CheckBox_SetValue(PyObject *self, PyObject *args, PyObjec
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CheckBox_SetValue",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCheckBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool const) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetValue(arg2);
@@ -2958,8 +3130,10 @@ static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ComboBox_SetEditable",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxComboBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetEditable(arg2);
@@ -4808,8 +4982,10 @@ static PyObject *_wrap_ListBox_SetSelection(PyObject *self, PyObject *args, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:ListBox_SetSelection",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -4922,8 +5098,10 @@ static PyObject *_wrap_ListBox_SetStringSelection(PyObject *self, PyObject *args
         temp2 = True;
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -5610,12 +5788,7 @@ static PyObject *_wrap_new_TextAttr(PyObject *self, PyObject *args) {
                     if (argc <= 3) {
                         return _wrap_new_TextAttr__SWIG_1(self,args);
                     }
-                    {
-                        _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
-                    }
-                    if (_v) {
-                        return _wrap_new_TextAttr__SWIG_1(self,args);
-                    }
+                    return _wrap_new_TextAttr__SWIG_1(self,args);
                 }
             }
         }
@@ -7194,8 +7367,10 @@ static PyObject *_wrap_TextCtrl_SetMaxLength(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_SetMaxLength",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTextCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (unsigned long) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (unsigned long) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetMaxLength(arg2);
@@ -7942,8 +8117,10 @@ static PyObject *_wrap_TextCtrl_SetEditable(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_SetEditable",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTextCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetEditable(arg2);
@@ -8516,8 +8693,10 @@ static PyObject *_wrap_ScrollBar_SetScrollbar(PyObject *self, PyObject *args, Py
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|O:ScrollBar_SetScrollbar",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxScrollBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj5) {
-        arg6 = PyInt_AsLong(obj5) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg6 = (bool) SPyObj_AsBool(obj5);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -9326,7 +9505,7 @@ static PyObject *_wrap_SpinCtrl_SetSelection(PyObject *self, PyObject *args, PyO
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSpinCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        wxSpinCtrl_SetSelection(arg1,arg2,arg3);
+        (arg1)->SetSelection(arg2,arg3);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -9982,8 +10161,10 @@ static PyObject *_wrap_RadioBox_EnableItem(PyObject *self, PyObject *args, PyObj
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:RadioBox_EnableItem",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRadioBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -10013,8 +10194,10 @@ static PyObject *_wrap_RadioBox_ShowItem(PyObject *self, PyObject *args, PyObjec
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:RadioBox_ShowItem",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRadioBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -10359,8 +10542,10 @@ static PyObject *_wrap_RadioButton_SetValue(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioButton_SetValue",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRadioButton,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetValue(arg2);
@@ -11355,8 +11540,10 @@ static PyObject *_wrap_ToggleButton_SetValue(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToggleButton_SetValue",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToggleButton,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetValue(arg2);
@@ -11481,7 +11668,7 @@ static PyObject *_wrap_BookCtrl_GetPageCount(PyObject *self, PyObject *args, PyO
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -11501,8 +11688,10 @@ static PyObject *_wrap_BookCtrl_GetPage(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_GetPage",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)(arg1)->GetPage(arg2);
@@ -11560,8 +11749,10 @@ static PyObject *_wrap_BookCtrl_SetPageText(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:BookCtrl_SetPageText",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         arg3 = wxString_in_helper(obj2);
         if (arg3 == NULL) SWIG_fail;
@@ -11602,8 +11793,10 @@ static PyObject *_wrap_BookCtrl_GetPageText(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_GetPageText",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = ((wxBookCtrl const *)arg1)->GetPageText(arg2);
@@ -11718,8 +11911,10 @@ static PyObject *_wrap_BookCtrl_GetPageImage(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_GetPageImage",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)((wxBookCtrl const *)arg1)->GetPageImage(arg2);
@@ -11748,8 +11943,10 @@ static PyObject *_wrap_BookCtrl_SetPageImage(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:BookCtrl_SetPageImage",kwnames,&obj0,&obj1,&arg3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->SetPageImage(arg2,arg3);
@@ -11844,8 +12041,10 @@ static PyObject *_wrap_BookCtrl_DeletePage(PyObject *self, PyObject *args, PyObj
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_DeletePage",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->DeletePage(arg2);
@@ -11873,8 +12072,10 @@ static PyObject *_wrap_BookCtrl_RemovePage(PyObject *self, PyObject *args, PyObj
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_RemovePage",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->RemovePage(arg2);
@@ -11940,8 +12141,10 @@ static PyObject *_wrap_BookCtrl_AddPage(PyObject *self, PyObject *args, PyObject
         temp3 = True;
     }
     if (obj3) {
-        arg4 = PyInt_AsLong(obj3) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg4 = (bool) SPyObj_AsBool(obj3);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -11986,8 +12189,10 @@ static PyObject *_wrap_BookCtrl_InsertPage(PyObject *self, PyObject *args, PyObj
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|Oi:BookCtrl_InsertPage",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         arg4 = wxString_in_helper(obj3);
@@ -11995,8 +12200,10 @@ static PyObject *_wrap_BookCtrl_InsertPage(PyObject *self, PyObject *args, PyObj
         temp4 = True;
     }
     if (obj4) {
-        arg5 = PyInt_AsLong(obj4) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg5 = (bool) SPyObj_AsBool(obj4);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -12033,8 +12240,10 @@ static PyObject *_wrap_BookCtrl_SetSelection(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_SetSelection",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)(arg1)->SetSelection(arg2);
@@ -12062,8 +12271,10 @@ static PyObject *_wrap_BookCtrl_AdvanceSelection(PyObject *self, PyObject *args,
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:BookCtrl_AdvanceSelection",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj1) {
-        arg2 = PyInt_AsLong(obj1) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg2 = (bool) SPyObj_AsBool(obj1);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13496,8 +13707,10 @@ static PyObject *_wrap_ToolBarToolBase_Enable(PyObject *self, PyObject *args, Py
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarToolBase_Enable",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->Enable(arg2);
@@ -13549,8 +13762,10 @@ static PyObject *_wrap_ToolBarToolBase_SetToggle(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarToolBase_SetToggle",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->SetToggle(arg2);
@@ -13993,8 +14208,10 @@ static PyObject *_wrap_ToolBarBase_DoInsertTool(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiOO|OiOOO:ToolBarBase_DoInsertTool",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&obj5,&arg7,&obj7,&obj8,&obj9)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         arg4 = wxString_in_helper(obj3);
         if (arg4 == NULL) SWIG_fail;
@@ -14112,8 +14329,10 @@ static PyObject *_wrap_ToolBarBase_InsertToolItem(PyObject *self, PyObject *args
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertToolItem",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -14176,8 +14395,10 @@ static PyObject *_wrap_ToolBarBase_InsertControl(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxControl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -14263,8 +14484,10 @@ static PyObject *_wrap_ToolBarBase_InsertSeparator(PyObject *self, PyObject *arg
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_InsertSeparator",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxToolBarToolBase *)(arg1)->InsertSeparator(arg2);
@@ -14322,8 +14545,10 @@ static PyObject *_wrap_ToolBarBase_DeleteToolByPos(PyObject *self, PyObject *arg
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_DeleteToolByPos",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (size_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (size_t) SPyObj_AsUnsignedLong(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->DeleteToolByPos(arg2);
@@ -14426,8 +14651,10 @@ static PyObject *_wrap_ToolBarBase_EnableTool(PyObject *self, PyObject *args, Py
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:ToolBarBase_EnableTool",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->EnableTool(arg2,arg3);
@@ -14455,8 +14682,10 @@ static PyObject *_wrap_ToolBarBase_ToggleTool(PyObject *self, PyObject *args, Py
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:ToolBarBase_ToggleTool",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->ToggleTool(arg2,arg3);
@@ -14484,8 +14713,10 @@ static PyObject *_wrap_ToolBarBase_SetToggle(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:ToolBarBase_SetToggle",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetToggle(arg2,arg3);
@@ -17687,8 +17918,10 @@ static PyObject *_wrap_ListEvent_SetEditCanceled(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ListEvent_SetEditCanceled",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetEditCanceled(arg2);
@@ -18646,8 +18879,10 @@ static PyObject *_wrap_ListCtrl_SetItemSpacing(PyObject *self, PyObject *args, P
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:ListCtrl_SetItemSpacing",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -18787,8 +19022,10 @@ static PyObject *_wrap_ListCtrl_SetSingleStyle(PyObject *self, PyObject *args, P
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Ol|O:ListCtrl_SetSingleStyle",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -19243,8 +19480,10 @@ static PyObject *_wrap_ListCtrl_FindItem(PyObject *self, PyObject *args, PyObjec
         temp3 = True;
     }
     if (obj3) {
-        arg4 = PyInt_AsLong(obj3) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg4 = (bool) SPyObj_AsBool(obj3);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -20014,8 +20253,10 @@ static PyObject *_wrap_ListView_Select(PyObject *self, PyObject *args, PyObject
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Ol|O:ListView_Select",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListView,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -20976,8 +21217,10 @@ static PyObject *_wrap_TreeEvent_SetEditCanceled(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeEvent_SetEditCanceled",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTreeEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetEditCanceled(arg2);
@@ -21266,7 +21509,7 @@ static PyObject *_wrap_TreeCtrl_GetCount(PyObject *self, PyObject *args, PyObjec
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -21291,7 +21534,7 @@ static PyObject *_wrap_TreeCtrl_GetIndent(PyObject *self, PyObject *args, PyObje
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -21310,8 +21553,10 @@ static PyObject *_wrap_TreeCtrl_SetIndent(PyObject *self, PyObject *args, PyObje
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_SetIndent",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (unsigned int) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetIndent(arg2);
@@ -21344,7 +21589,7 @@ static PyObject *_wrap_TreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyObj
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -21363,8 +21608,10 @@ static PyObject *_wrap_TreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyObj
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_SetSpacing",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (unsigned int) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetSpacing(arg2);
@@ -21940,8 +22187,10 @@ static PyObject *_wrap_TreeCtrl_SetItemHasChildren(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -21976,8 +22225,10 @@ static PyObject *_wrap_TreeCtrl_SetItemBold(PyObject *self, PyObject *args, PyOb
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22278,8 +22529,10 @@ static PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *self, PyObject *args,
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22288,7 +22541,7 @@ static PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *self, PyObject *args,
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -22885,8 +23138,10 @@ static PyObject *_wrap_TreeCtrl_InsertItemBefore(PyObject *self, PyObject *args,
     if (arg2 == NULL) {
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
-    arg3 = (size_t) PyInt_AsLong(obj2);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (size_t) SPyObj_AsUnsignedLong(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         arg4 = wxString_in_helper(obj3);
         if (arg4 == NULL) SWIG_fail;
@@ -23471,8 +23726,10 @@ static PyObject *_wrap_TreeCtrl_GetBoundingRect(PyObject *self, PyObject *args,
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -23976,8 +24233,10 @@ static PyObject *_wrap_GenericDirCtrl_ShowHidden(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GenericDirCtrl_ShowHidden",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGenericDirCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->ShowHidden(arg2);
@@ -25387,8 +25646,10 @@ static PyObject *_wrap_new_ContextHelp(PyObject *self, PyObject *args, PyObject
         if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
     if (obj1) {
-        arg2 = PyInt_AsLong(obj1) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg2 = (bool) SPyObj_AsBool(obj1);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -26058,8 +26319,10 @@ static PyObject *_wrap_DragImage_BeginDrag(PyObject *self, PyObject *args, PyObj
     }
     if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj3) {
-        arg4 = PyInt_AsLong(obj3) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg4 = (bool) SPyObj_AsBool(obj3);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     if (obj4) {
         if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
@@ -26377,10 +26640,14 @@ static PyObject *_wrap_DragImage_RedrawImage(PyObject *self, PyObject *args, PyO
         arg3 = &temp3;
         if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail;
     }
-    arg4 = PyInt_AsLong(obj3) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
-    arg5 = PyInt_AsLong(obj4) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg4 = (bool) SPyObj_AsBool(obj3);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        arg5 = (bool) SPyObj_AsBool(obj4);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->RedrawImage((wxPoint const &)*arg2,(wxPoint const &)*arg3,arg4,arg5);