]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/misc_wrap.cpp
docstring patch has been submitted to SF
[wxWidgets.git] / wxPython / src / gtk / misc_wrap.cpp
index 8ae0975305d494f9764f6f8611eb2c8cf9d3316e..bc7b845d9077ce635664fbce76158b3a1d302b67 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()
@@ -850,8 +1022,8 @@ bool wxConfigBase_ReadBool(wxConfigBase *self,wxString const &key,bool defaultVa
 #include <wx/datetime.h>
 
 
- static const wxString wxPyDateFormatStr(wxT(wxT("%c"))); 
- static const wxString wxPyTimeSpanFormatStr(wxT(wxT("%H:%M:%S"))); 
+ static const wxString wxPyDateFormatStr(wxT("%c")); 
+ static const wxString wxPyTimeSpanFormatStr(wxT("%H:%M:%S")); 
 
 #define LOCAL_TZ wxDateTime::Local
 
@@ -1056,8 +1228,6 @@ public:
 };    
 
 
-
-
 IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
 
 
@@ -1705,8 +1875,10 @@ static PyObject *_wrap_GetElapsedTime(PyObject *self, PyObject *args, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) goto fail;
     if (obj0) {
-        arg1 = PyInt_AsLong(obj0) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg1 = (bool) SPyObj_AsBool(obj0);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -2009,8 +2181,10 @@ static PyObject *_wrap_Usleep(PyObject *self, PyObject *args, PyObject *kwargs)
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Usleep",kwnames,&obj0)) goto fail;
-    arg1 = (unsigned long) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxUsleep(arg1);
@@ -2034,8 +2208,10 @@ static PyObject *_wrap_EnableTopLevelWindows(PyObject *self, PyObject *args, PyO
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:EnableTopLevelWindows",kwnames,&obj0)) goto fail;
-    arg1 = PyInt_AsLong(obj0) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (bool) SPyObj_AsBool(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxEnableTopLevelWindows(arg1);
@@ -2324,7 +2500,7 @@ static PyObject *_wrap_GetProcessId(PyObject *self, PyObject *args, PyObject *kw
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -2781,8 +2957,10 @@ static PyObject *_wrap_GetTextFromUser(PyObject *self, PyObject *args, PyObject
         if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -2959,8 +3137,10 @@ static PyObject *_wrap_GetSingleChoice(PyObject *self, PyObject *args, PyObject
         if ((SWIG_ConvertPtr(obj3,(void **) &arg5, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
     if (obj6) {
-        arg8 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg8 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -3048,8 +3228,10 @@ static PyObject *_wrap_GetSingleChoiceIndex(PyObject *self, PyObject *args, PyOb
         if ((SWIG_ConvertPtr(obj3,(void **) &arg5, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
     if (obj6) {
-        arg8 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg8 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -3977,8 +4159,10 @@ static PyObject *_wrap_ToolTip_Enable(PyObject *self, PyObject *args, PyObject *
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToolTip_Enable",kwnames,&obj0)) goto fail;
-    arg1 = PyInt_AsLong(obj0) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (bool) SPyObj_AsBool(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxToolTip::Enable(arg1);
@@ -5480,7 +5664,7 @@ static PyObject *_wrap_TipProvider_GetCurrentTip(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;
@@ -5551,8 +5735,10 @@ static PyObject *_wrap_new_PyTipProvider(PyObject *self, PyObject *args, PyObjec
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_PyTipProvider",kwnames,&obj0)) goto fail;
-    arg1 = (size_t) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (size_t) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxPyTipProvider *)new wxPyTipProvider(arg1);
@@ -5621,8 +5807,10 @@ static PyObject *_wrap_ShowTip(PyObject *self, PyObject *args, PyObject *kwargs)
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxTipProvider,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();
@@ -5656,8 +5844,10 @@ static PyObject *_wrap_CreateFileTipProvider(PyObject *self, PyObject *args, PyO
         if (arg1 == NULL) SWIG_fail;
         temp1 = True;
     }
-    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 = (wxTipProvider *)wxCreateFileTipProvider((wxString const &)*arg1,arg2);
@@ -5805,8 +5995,10 @@ static PyObject *_wrap_Timer_Start(PyObject *self, PyObject *args, PyObject *kwa
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:Timer_Start",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTimer,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();
@@ -6049,8 +6241,10 @@ static PyObject *_wrap_new_TimerRunner__SWIG_1(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();
@@ -6103,14 +6297,26 @@ static PyObject *_wrap_new_TimerRunner(PyObject *self, PyObject *args) {
         }
         if (_v) {
             {
-                _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
+                SPyObj_AsInt(argv[1]);
+                if (PyErr_Occurred()) {
+                    _v = 0;
+                    PyErr_Clear();
+                } else {
+                    _v = 1;
+                }
             }
             if (_v) {
                 if (argc <= 2) {
                     return _wrap_new_TimerRunner__SWIG_1(self,args);
                 }
                 {
-                    _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0;
+                    SPyObj_AsBool(argv[2]);
+                    if (PyErr_Occurred()) {
+                        _v = 0;
+                        PyErr_Clear();
+                    } else {
+                        _v = 1;
+                    }
                 }
                 if (_v) {
                     return _wrap_new_TimerRunner__SWIG_1(self,args);
@@ -6162,8 +6368,10 @@ static PyObject *_wrap_TimerRunner_Start(PyObject *self, PyObject *args, PyObjec
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:TimerRunner_Start",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTimerRunner,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();
@@ -6241,8 +6449,10 @@ static PyObject *_wrap_Log_EnableLogging(PyObject *self, PyObject *args, PyObjec
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Log_EnableLogging",kwnames,&obj0)) goto fail;
     if (obj0) {
-        arg1 = PyInt_AsLong(obj0) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg1 = (bool) SPyObj_AsBool(obj0);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -6271,11 +6481,15 @@ static PyObject *_wrap_Log_OnLog(PyObject *self, PyObject *args, PyObject *kwarg
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Log_OnLog",kwnames,&obj0,&obj1,&obj2)) goto fail;
-    arg1 = (wxLogLevel) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (wxLogLevel) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxChar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = (time_t) PyInt_AsLong(obj2);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (time_t) SPyObj_AsUnsignedInt(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxLog::OnLog(arg1,(wxChar const *)arg2,arg3);
@@ -6434,8 +6648,10 @@ static PyObject *_wrap_Log_SetVerbose(PyObject *self, PyObject *args, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Log_SetVerbose",kwnames,&obj0)) goto fail;
     if (obj0) {
-        arg1 = PyInt_AsLong(obj0) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg1 = (bool) SPyObj_AsBool(obj0);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -6460,8 +6676,10 @@ static PyObject *_wrap_Log_SetLogLevel(PyObject *self, PyObject *args, PyObject
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Log_SetLogLevel",kwnames,&obj0)) goto fail;
-    arg1 = (wxLogLevel) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (wxLogLevel) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxLog::SetLogLevel(arg1);
@@ -6506,8 +6724,10 @@ static PyObject *_wrap_Log_SetTraceMask(PyObject *self, PyObject *args, PyObject
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Log_SetTraceMask",kwnames,&obj0)) goto fail;
-    arg1 = (wxTraceMask) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (wxTraceMask) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxLog::SetTraceMask(arg1);
@@ -6705,7 +6925,7 @@ static PyObject *_wrap_Log_GetTraceMask(PyObject *self, PyObject *args, PyObject
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -6752,7 +6972,7 @@ static PyObject *_wrap_Log_GetLogLevel(PyObject *self, PyObject *args, PyObject
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -6954,12 +7174,16 @@ static PyObject *_wrap_new_LogWindow(PyObject *self, PyObject *args, PyObject *k
         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;
+        }
     }
     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();
@@ -6996,8 +7220,10 @@ static PyObject *_wrap_LogWindow_Show(PyObject *self, PyObject *args, PyObject *
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:LogWindow_Show",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLogWindow,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();
@@ -7102,8 +7328,10 @@ static PyObject *_wrap_LogWindow_PassMessages(PyObject *self, PyObject *args, Py
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LogWindow_PassMessages",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLogWindow,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)->PassMessages(arg2);
@@ -7189,8 +7417,10 @@ static PyObject *_wrap_LogChain_PassMessages(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LogChain_PassMessages",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLogChain,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)->PassMessages(arg2);
@@ -7277,7 +7507,7 @@ static PyObject *_wrap_SysErrorCode(PyObject *self, PyObject *args, PyObject *kw
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -7295,8 +7525,10 @@ static PyObject *_wrap_SysErrorMsg(PyObject *self, PyObject *args, PyObject *kwa
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:SysErrorMsg",kwnames,&obj0)) goto fail;
     if (obj0) {
-        arg1 = (unsigned long) PyInt_AsLong(obj0);
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7700,8 +7932,10 @@ static PyObject *_wrap_LogTrace__SWIG_0(PyObject *self, PyObject *args) {
     PyObject * obj1 = 0 ;
     
     if(!PyArg_ParseTuple(args,(char *)"OO:LogTrace",&obj0,&obj1)) goto fail;
-    arg1 = (unsigned long) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         arg2 = wxString_in_helper(obj1);
         if (arg2 == NULL) SWIG_fail;
@@ -7817,7 +8051,13 @@ static PyObject *_wrap_LogTrace(PyObject *self, PyObject *args) {
     if (argc == 2) {
         int _v;
         {
-            _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
+            SPyObj_AsUnsignedLong(argv[0]);
+            if (PyErr_Occurred()) {
+                _v = 0;
+                PyErr_Clear();
+            } else {
+                _v = 1;
+            }
         }
         if (_v) {
             {
@@ -7852,8 +8092,10 @@ static PyObject *_wrap_LogGeneric(PyObject *self, PyObject *args, PyObject *kwar
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LogGeneric",kwnames,&obj0,&obj1)) goto fail;
-    arg1 = (unsigned long) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         arg2 = wxString_in_helper(obj1);
         if (arg2 == NULL) SWIG_fail;
@@ -10475,8 +10717,10 @@ static PyObject *_wrap_new_Wave(PyObject *self, PyObject *args, PyObject *kwargs
         temp1 = True;
     }
     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();
@@ -10603,12 +10847,16 @@ static PyObject *_wrap_Wave_Play(PyObject *self, PyObject *args, PyObject *kwarg
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Wave_Play",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWave,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;
+        }
     }
     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();
@@ -11597,8 +11845,10 @@ static PyObject *_wrap_FileType_SetCommand(PyObject *self, PyObject *args, PyObj
         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();
@@ -12048,8 +12298,10 @@ static PyObject *_wrap_MimeTypesManager_ReadMailcap(PyObject *self, PyObject *ar
         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();
@@ -13375,8 +13627,10 @@ static PyObject *_wrap_ConfigBase_Get(PyObject *self, PyObject *args, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:ConfigBase_Get",kwnames,&obj0)) goto fail;
     if (obj0) {
-        arg1 = PyInt_AsLong(obj0) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg1 = (bool) SPyObj_AsBool(obj0);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13625,8 +13879,10 @@ static PyObject *_wrap_ConfigBase_GetNumberOfEntries(PyObject *self, PyObject *a
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_GetNumberOfEntries",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,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();
@@ -13635,7 +13891,7 @@ static PyObject *_wrap_ConfigBase_GetNumberOfEntries(PyObject *self, PyObject *a
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -13656,8 +13912,10 @@ static PyObject *_wrap_ConfigBase_GetNumberOfGroups(PyObject *self, PyObject *ar
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_GetNumberOfGroups",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,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();
@@ -13666,7 +13924,7 @@ static PyObject *_wrap_ConfigBase_GetNumberOfGroups(PyObject *self, PyObject *ar
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -14009,8 +14267,10 @@ static PyObject *_wrap_ConfigBase_ReadBool(PyObject *self, PyObject *args, PyObj
         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();
@@ -14196,8 +14456,10 @@ static PyObject *_wrap_ConfigBase_WriteBool(PyObject *self, PyObject *args, PyOb
         if (arg2 == NULL) SWIG_fail;
         temp2 = True;
     }
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->Write((wxString const &)*arg2,arg3);
@@ -14234,8 +14496,10 @@ static PyObject *_wrap_ConfigBase_Flush(PyObject *self, PyObject *args, PyObject
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_Flush",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,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();
@@ -14387,8 +14651,10 @@ static PyObject *_wrap_ConfigBase_DeleteEntry(PyObject *self, PyObject *args, Py
         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();
@@ -14516,8 +14782,10 @@ static PyObject *_wrap_ConfigBase_SetExpandEnvVars(PyObject *self, PyObject *arg
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetExpandEnvVars",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,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();
@@ -14546,8 +14814,10 @@ static PyObject *_wrap_ConfigBase_SetRecordDefaults(PyObject *self, PyObject *ar
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetRecordDefaults",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,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();
@@ -15580,6 +15850,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[] = {
@@ -15587,8 +15859,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);
@@ -15597,8 +15877,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;
 }
 
@@ -15793,8 +16089,10 @@ static PyObject *_wrap_new_DateTimeFromTimeT(PyObject *self, PyObject *args, PyO
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_DateTimeFromTimeT",kwnames,&obj0)) goto fail;
-    arg1 = (time_t) PyInt_AsLong(obj0);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg1 = (time_t) SPyObj_AsUnsignedInt(obj0);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxDateTime *)new wxDateTime(arg1);
@@ -15952,8 +16250,10 @@ static PyObject *_wrap_DateTime_SetTimeT(PyObject *self, PyObject *args, PyObjec
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DateTime_SetTimeT",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = (time_t) PyInt_AsLong(obj1);
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (time_t) SPyObj_AsUnsignedInt(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         {
@@ -16892,8 +17192,10 @@ static PyObject *_wrap_DateTime_ToTimezone(PyObject *self, PyObject *args, PyObj
         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();
@@ -16940,8 +17242,10 @@ static PyObject *_wrap_DateTime_MakeTimezone(PyObject *self, PyObject *args, PyO
         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();
@@ -16980,8 +17284,10 @@ static PyObject *_wrap_DateTime_ToGMT(PyObject *self, PyObject *args, PyObject *
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:DateTime_ToGMT",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,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();
@@ -17015,8 +17321,10 @@ static PyObject *_wrap_DateTime_MakeGMT(PyObject *self, PyObject *args, PyObject
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:DateTime_MakeGMT",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,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();
@@ -17104,7 +17412,7 @@ static PyObject *_wrap_DateTime_GetTicks(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;
@@ -21657,7 +21965,7 @@ static PyObject *_wrap_DataFormat___eq____SWIG_0(PyObject *self, PyObject *args)
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDataFormat,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (bool)((wxDataFormat const *)arg1)->operator ==((wxDataFormatId )arg2);
+        result = (bool)((wxDataFormat const *)arg1)->operator ==(arg2);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -21680,7 +21988,7 @@ static PyObject *_wrap_DataFormat___ne____SWIG_0(PyObject *self, PyObject *args)
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDataFormat,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (bool)((wxDataFormat const *)arg1)->operator !=((wxDataFormatId )arg2);
+        result = (bool)((wxDataFormat const *)arg1)->operator !=(arg2);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -21768,7 +22076,13 @@ static PyObject *_wrap_DataFormat___eq__(PyObject *self, PyObject *args) {
         }
         if (_v) {
             {
-                _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
+                SPyObj_AsInt(argv[1]);
+                if (PyErr_Occurred()) {
+                    _v = 0;
+                    PyErr_Clear();
+                } else {
+                    _v = 1;
+                }
             }
             if (_v) {
                 return _wrap_DataFormat___eq____SWIG_0(self,args);
@@ -21857,7 +22171,13 @@ static PyObject *_wrap_DataFormat___ne__(PyObject *self, PyObject *args) {
         }
         if (_v) {
             {
-                _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
+                SPyObj_AsInt(argv[1]);
+                if (PyErr_Occurred()) {
+                    _v = 0;
+                    PyErr_Clear();
+                } else {
+                    _v = 1;
+                }
             }
             if (_v) {
                 return _wrap_DataFormat___ne____SWIG_0(self,args);
@@ -22085,7 +22405,7 @@ static PyObject *_wrap_DataObject_GetFormatCount(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;
@@ -22148,7 +22468,7 @@ static PyObject *_wrap_DataObject_GetDataSize(PyObject *self, PyObject *args, Py
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -22238,8 +22558,10 @@ static PyObject *_wrap_DataObject_SetData(PyObject *self, PyObject *args, PyObje
     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;
+    }
     if ((SWIG_ConvertPtr(obj3,(void **) &arg4, 0, SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22542,7 +22864,7 @@ static PyObject *_wrap_TextDataObject_GetTextLength(PyObject *self, PyObject *ar
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    resultobj = PyInt_FromLong((long)result);
+    resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
     return resultobj;
     fail:
     return NULL;
@@ -23033,7 +23355,7 @@ static PyObject *_wrap_CustomDataObject_GetSize(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;
@@ -23226,7 +23548,7 @@ static PyObject *_wrap_IsDragResultOk(PyObject *self, PyObject *args, PyObject *
 
 static PyObject *_wrap_new_DropSource(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
-    wxWindow *arg1 = (wxWindow *) NULL ;
+    wxWindow *arg1 = (wxWindow *) 0 ;
     wxIcon const &arg2_defvalue = wxNullIcon ;
     wxIcon *arg2 = (wxIcon *) &arg2_defvalue ;
     wxIcon const &arg3_defvalue = wxNullIcon ;
@@ -23242,10 +23564,8 @@ static PyObject *_wrap_new_DropSource(PyObject *self, PyObject *args, PyObject *
         (char *) "win",(char *) "copy",(char *) "move",(char *) "none", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_DropSource",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
-    if (obj0) {
-        if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    }
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:new_DropSource",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj1) {
         if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxIcon,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
         if (arg2 == NULL) {
@@ -24438,8 +24758,10 @@ static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *a
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Clipboard_UsePrimarySelection",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxClipboard,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();