From a41e16b6369fe36743aea3273460362bb503f092 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 23 Jan 2004 21:58:14 +0000 Subject: [PATCH] reSWIGged with the new SWIG runtime and also other recent changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp | 378 ++++-- .../contrib/glcanvas/gtk/glcanvas_wrap.cpp | 182 ++- wxPython/contrib/ogl/gtk/ogl_wrap.cpp | 1040 +++++++++++----- wxPython/contrib/stc/stc_wrap.cpp | 470 +++++-- wxPython/contrib/xrc/xrc.py | 8 +- wxPython/contrib/xrc/xrc_wrap.cpp | 194 ++- wxPython/src/gtk/calendar_wrap.cpp | 236 +++- wxPython/src/gtk/controls.py | 12 +- wxPython/src/gtk/controls_wrap.cpp | 503 ++++++-- wxPython/src/gtk/core.py | 118 +- wxPython/src/gtk/core_wrap.cpp | 1091 ++++++++++++----- wxPython/src/gtk/gdi.py | 86 +- wxPython/src/gtk/gdi_wrap.cpp | 432 +++++-- wxPython/src/gtk/grid_wrap.cpp | 644 +++++++--- wxPython/src/gtk/html.py | 6 +- wxPython/src/gtk/html_wrap.cpp | 202 ++- wxPython/src/gtk/misc.py | 173 +-- wxPython/src/gtk/misc_wrap.cpp | 538 ++++++-- wxPython/src/gtk/windows.py | 2 +- wxPython/src/gtk/windows_wrap.cpp | 530 ++++++-- wxPython/src/gtk/wizard.py | 2 +- wxPython/src/gtk/wizard_wrap.cpp | 188 ++- wxPython/wxPython/gdi.py | 41 +- 23 files changed, 5497 insertions(+), 1579 deletions(-) diff --git a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp index 9989c81ca9..b9babe9249 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp @@ -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 +#include + +#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() @@ -1809,8 +1981,10 @@ static PyObject *_wrap_LEDNumberCtrl_SetAlignment(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:LEDNumberCtrl_SetAlignment",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLEDNumberCtrl,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(); @@ -1840,12 +2014,16 @@ static PyObject *_wrap_LEDNumberCtrl_SetDrawFaded(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:LEDNumberCtrl_SetDrawFaded",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLEDNumberCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; + { + arg2 = (bool) SPyObj_AsBool(obj1); if (PyErr_Occurred()) SWIG_fail; } + if (obj2) { + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDrawFaded(arg2,arg3); @@ -1881,8 +2059,10 @@ static PyObject *_wrap_LEDNumberCtrl_SetValue(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(); @@ -1937,8 +2117,10 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2086,7 +2268,7 @@ static PyObject *_wrap_TreeListColumnInfo_GetWidth(PyObject *self, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2220,8 +2402,10 @@ static PyObject *_wrap_TreeListColumnInfo_SetWidth(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListColumnInfo_SetWidth",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTreeListColumnInfo,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(); (arg1)->SetWidth(arg2); @@ -2466,7 +2650,7 @@ static PyObject *_wrap_TreeListCtrl_GetCount(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; @@ -2491,7 +2675,7 @@ static PyObject *_wrap_TreeListCtrl_GetIndent(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; @@ -2510,8 +2694,10 @@ static PyObject *_wrap_TreeListCtrl_SetIndent(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetIndent",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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); @@ -2544,7 +2730,7 @@ static PyObject *_wrap_TreeListCtrl_GetSpacing(PyObject *self, PyObject *args, P wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2563,8 +2749,10 @@ static PyObject *_wrap_TreeListCtrl_SetSpacing(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetSpacing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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); @@ -2597,7 +2785,7 @@ static PyObject *_wrap_TreeListCtrl_GetLineSpacing(PyObject *self, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2616,8 +2804,10 @@ static PyObject *_wrap_TreeListCtrl_SetLineSpacing(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetLineSpacing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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)->SetLineSpacing(arg2); @@ -2960,8 +3150,10 @@ static PyObject *_wrap_TreeListCtrl_InsertColumn(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_InsertColumn",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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; @@ -3003,8 +3195,10 @@ static PyObject *_wrap_TreeListCtrl_InsertColumnInfo(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_InsertColumnInfo",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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_wxTreeListColumnInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (arg3 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; @@ -3035,8 +3229,10 @@ static PyObject *_wrap_TreeListCtrl_RemoveColumn(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_RemoveColumn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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(); (arg1)->RemoveColumn(arg2); @@ -3069,7 +3265,7 @@ static PyObject *_wrap_TreeListCtrl_GetColumnCount(PyObject *self, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -3090,10 +3286,14 @@ static PyObject *_wrap_TreeListCtrl_SetColumnWidth(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetColumnWidth",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetColumnWidth(arg2,arg3); @@ -3121,8 +3321,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnWidth(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnWidth",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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)((wxPyTreeListCtrl const *)arg1)->GetColumnWidth(arg2); @@ -3149,8 +3351,10 @@ static PyObject *_wrap_TreeListCtrl_SetMainColumn(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetMainColumn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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(); (arg1)->SetMainColumn(arg2); @@ -3183,7 +3387,7 @@ static PyObject *_wrap_TreeListCtrl_GetMainColumn(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; @@ -3205,8 +3409,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumnText(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetColumnText",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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; @@ -3247,8 +3453,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnText(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnText",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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 = ((wxPyTreeListCtrl const *)arg1)->GetColumnText(arg2); @@ -3283,8 +3491,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumn(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetColumn",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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_wxTreeListColumnInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (arg3 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; @@ -3316,8 +3526,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumn(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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(); { @@ -3348,8 +3560,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumnAlignment(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:TreeListCtrl_SetColumnAlignment",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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(); (arg1)->SetColumnAlignment(arg2,(wxTreeListColumnAlign )arg3); @@ -3377,8 +3591,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnAlignment(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnAlignment",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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)((wxPyTreeListCtrl const *)arg1)->GetColumnAlignment(arg2); @@ -3406,8 +3622,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumnImage(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:TreeListCtrl_SetColumnImage",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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(); (arg1)->SetColumnImage(arg2,arg3); @@ -3435,8 +3653,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnImage(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnImage",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,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)((wxPyTreeListCtrl const *)arg1)->GetColumnImage(arg2); @@ -3749,8 +3969,10 @@ static PyObject *_wrap_TreeListCtrl_SetItemHasChildren(PyObject *self, PyObject 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(); @@ -3785,8 +4007,10 @@ static PyObject *_wrap_TreeListCtrl_SetItemBold(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(); @@ -4223,8 +4447,10 @@ static PyObject *_wrap_TreeListCtrl_GetChildrenCount(PyObject *self, PyObject *a 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(); @@ -4233,7 +4459,7 @@ static PyObject *_wrap_TreeListCtrl_GetChildrenCount(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; @@ -4860,8 +5086,10 @@ static PyObject *_wrap_TreeListCtrl_InsertItemBefore(PyObject *self, PyObject *a 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; @@ -5257,12 +5485,16 @@ static PyObject *_wrap_TreeListCtrl_SelectItem(PyObject *self, PyObject *args, P 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; + } } 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(); @@ -5408,8 +5640,10 @@ static PyObject *_wrap_TreeListCtrl_GetBoundingRect(PyObject *self, PyObject *ar 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(); diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp index 3ee151395e..6049427448 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp @@ -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 +#include + +#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() @@ -277,8 +449,10 @@ static PyObject *_wrap_new_GLContext(PyObject *self, PyObject *args, PyObject *k }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_GLContext",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGLCanvas,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxPalette,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; diff --git a/wxPython/contrib/ogl/gtk/ogl_wrap.cpp b/wxPython/contrib/ogl/gtk/ogl_wrap.cpp index 5457033f2c..d3fa2c8cba 100644 --- a/wxPython/contrib/ogl/gtk/ogl_wrap.cpp +++ b/wxPython/contrib/ogl/gtk/ogl_wrap.cpp @@ -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 +#include + +#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() @@ -2018,8 +2190,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDrawBranches(PyObject *self, PyO 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(); @@ -2289,8 +2463,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMovePre(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -2329,8 +2505,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMovePost(PyObject *self, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -2362,8 +2540,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDragLeft(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShapeEvtHandler_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -2450,8 +2630,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDragRight(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShapeEvtHandler_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -2635,8 +2817,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMoveLink(PyObject *self, PyObjec 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(); @@ -2671,8 +2855,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnSizingDragLeft(PyObject *self, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyShapeEvtHandler_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -3368,8 +3554,10 @@ static PyObject *_wrap_PyShape_SetDrawHandles(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetDrawHandles",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->SetDrawHandles(arg2); @@ -3652,8 +3840,10 @@ static PyObject *_wrap_PyShape_Select(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_Select",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -3687,12 +3877,16 @@ static PyObject *_wrap_PyShape_SetHighlight(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_SetHighlight",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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(); @@ -3797,8 +3991,10 @@ static PyObject *_wrap_PyShape_SetSensitivityFilter(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:PyShape_SetSensitivityFilter",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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(); @@ -3853,12 +4049,16 @@ static PyObject *_wrap_PyShape_SetDraggable(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyShape_SetDraggable",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; + { + arg2 = (bool) SPyObj_AsBool(obj1); if (PyErr_Occurred()) SWIG_fail; } + if (obj2) { + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDraggable(arg2,arg3); @@ -3887,10 +4087,14 @@ static PyObject *_wrap_PyShape_SetFixedSize(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyShape_SetFixedSize",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetFixedSize(arg2,arg3); @@ -4005,8 +4209,10 @@ static PyObject *_wrap_PyShape_SetSpaceAttachments(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetSpaceAttachments",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->SetSpaceAttachments(arg2); @@ -4060,8 +4266,10 @@ static PyObject *_wrap_PyShape_SetShadowMode(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:PyShape_SetShadowMode",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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(); @@ -4155,8 +4363,10 @@ static PyObject *_wrap_PyShape_SetCentreResize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetCentreResize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->SetCentreResize(arg2); @@ -4208,8 +4418,10 @@ static PyObject *_wrap_PyShape_SetMaintainAspectRatio(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetMaintainAspectRatio",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->SetMaintainAspectRatio(arg2); @@ -4286,8 +4498,10 @@ static PyObject *_wrap_PyShape_SetDisableLabel(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetDisableLabel",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->SetDisableLabel(arg2); @@ -4525,8 +4739,10 @@ static PyObject *_wrap_PyShape_Show(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->Show(arg2); @@ -4587,8 +4803,10 @@ static PyObject *_wrap_PyShape_Move(PyObject *self, PyObject *args, PyObject *kw PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } 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(); @@ -4793,8 +5011,10 @@ static PyObject *_wrap_PyShape_SetSize(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Odd|O:PyShape_SetSize",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6027,8 +6247,10 @@ static PyObject *_wrap_PyShape_EraseLinks(PyObject *self, PyObject *args, PyObje PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -6064,8 +6286,10 @@ static PyObject *_wrap_PyShape_DrawLinks(PyObject *self, PyObject *args, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -6616,12 +6840,16 @@ static PyObject *_wrap_PyShape_CreateNewCopy(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_CreateNewCopy",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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(); @@ -7021,8 +7249,10 @@ static PyObject *_wrap_PyShape_base_OnDrawBranches(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(); @@ -7292,8 +7522,10 @@ static PyObject *_wrap_PyShape_base_OnMovePre(PyObject *self, PyObject *args, Py PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -7332,8 +7564,10 @@ static PyObject *_wrap_PyShape_base_OnMovePost(PyObject *self, PyObject *args, P PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -7365,8 +7599,10 @@ static PyObject *_wrap_PyShape_base_OnDragLeft(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -7453,8 +7689,10 @@ static PyObject *_wrap_PyShape_base_OnDragRight(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -7638,8 +7876,10 @@ static PyObject *_wrap_PyShape_base_OnMoveLink(PyObject *self, PyObject *args, P 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(); @@ -7674,8 +7914,10 @@ static PyObject *_wrap_PyShape_base_OnSizingDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -8172,8 +8414,10 @@ static PyObject *_wrap_PseudoMetaFile_SetRotateable(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PseudoMetaFile_SetRotateable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPseudoMetaFile,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)->SetRotateable(arg2); @@ -8911,8 +9155,10 @@ static PyObject *_wrap_PseudoMetaFile_SetPen(PyObject *self, PyObject *args, PyO arg2 = NULL; } 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(); @@ -8959,8 +9205,10 @@ static PyObject *_wrap_PseudoMetaFile_SetBrush(PyObject *self, PyObject *args, P arg2 = NULL; } 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(); @@ -9325,8 +9573,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDrawBranches(PyObject *self, 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(); @@ -9596,8 +9846,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMovePre(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -9636,8 +9888,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMovePost(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -9669,8 +9923,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDragLeft(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyRectangleShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -9757,8 +10013,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDragRight(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyRectangleShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -9942,8 +10200,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMoveLink(PyObject *self, PyObject 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(); @@ -9978,8 +10238,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnSizingDragLeft(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyRectangleShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -10309,8 +10571,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDrawBranches(PyObject *self, PyObje 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(); @@ -10580,8 +10844,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -10620,8 +10886,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -10653,8 +10921,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyControlPoint_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -10741,8 +11011,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyControlPoint_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -10926,8 +11198,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMoveLink(PyObject *self, PyObject * 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(); @@ -10962,8 +11236,10 @@ static PyObject *_wrap_PyControlPoint_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyControlPoint_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -11383,8 +11659,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDrawBranches(PyObject *self, PyObjec 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(); @@ -11654,8 +11932,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMovePre(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -11694,8 +11974,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMovePost(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -11727,8 +12009,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyBitmapShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -11815,8 +12099,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDragRight(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyBitmapShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -12000,8 +12286,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMoveLink(PyObject *self, PyObject *a 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(); @@ -12036,8 +12324,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnSizingDragLeft(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyBitmapShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -12904,8 +13194,10 @@ static PyObject *_wrap_PyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *args arg2 = NULL; } 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(); @@ -13002,8 +13294,10 @@ static PyObject *_wrap_PyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args, arg2 = NULL; } 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(); @@ -13088,8 +13382,10 @@ static PyObject *_wrap_PyDrawnShape_SetSaveToFile(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyDrawnShape_SetSaveToFile",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,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)->SetSaveToFile(arg2); @@ -13233,8 +13529,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDrawBranches(PyObject *self, PyObject 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(); @@ -13504,8 +13802,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMovePre(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -13544,8 +13844,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMovePost(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -13577,8 +13879,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDragLeft(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDrawnShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -13665,8 +13969,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDragRight(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDrawnShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -13850,8 +14156,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMoveLink(PyObject *self, PyObject *ar 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(); @@ -13886,8 +14194,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnSizingDragLeft(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDrawnShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -14683,8 +14993,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDrawBranches(PyObject *self, 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(); @@ -14954,8 +15266,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMovePre(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -14994,8 +15308,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMovePost(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -15027,8 +15343,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDragLeft(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCompositeShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -15115,8 +15433,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDragRight(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCompositeShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -15300,8 +15620,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMoveLink(PyObject *self, PyObject 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(); @@ -15336,8 +15658,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnSizingDragLeft(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyCompositeShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -15678,8 +16002,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDrawBranches(PyObject *self, PyObje 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(); @@ -15949,8 +16275,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -15989,8 +16317,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -16022,8 +16352,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDividedShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -16110,8 +16442,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDividedShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -16295,8 +16629,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMoveLink(PyObject *self, PyObject * 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(); @@ -16331,8 +16667,10 @@ static PyObject *_wrap_PyDividedShape_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDividedShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -16535,8 +16873,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustBottom(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustBottom",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,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)->AdjustBottom(arg2,arg3); @@ -16564,8 +16904,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustLeft(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustLeft",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,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)->AdjustLeft(arg2,arg3); @@ -16593,8 +16935,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustRight(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustRight",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,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)->AdjustRight(arg2,arg3); @@ -16622,8 +16966,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustTop(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustTop",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,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)->AdjustTop(arg2,arg3); @@ -16916,8 +17262,10 @@ static PyObject *_wrap_PyDivisionShape_ResizeAdjoining(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OidO:PyDivisionShape_ResizeAdjoining",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ResizeAdjoining(arg2,arg3,arg4); @@ -17362,8 +17710,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDrawBranches(PyObject *self, PyObj 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(); @@ -17633,8 +17983,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMovePre(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -17673,8 +18025,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMovePost(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -17706,8 +18060,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDragLeft(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDivisionShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -17794,8 +18150,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDivisionShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -17979,8 +18337,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMoveLink(PyObject *self, PyObject 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(); @@ -18015,8 +18375,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnSizingDragLeft(PyObject *self, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDivisionShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -18285,8 +18647,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDrawBranches(PyObject *self, PyObje 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(); @@ -18556,8 +18920,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -18596,8 +18962,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -18629,8 +18997,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyEllipseShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -18717,8 +19087,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyEllipseShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -18902,8 +19274,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMoveLink(PyObject *self, PyObject * 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(); @@ -18938,8 +19312,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyEllipseShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -19207,8 +19583,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDrawBranches(PyObject *self, PyObjec 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(); @@ -19478,8 +19856,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMovePre(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -19518,8 +19898,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMovePost(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -19551,8 +19933,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCircleShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -19639,8 +20023,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDragRight(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCircleShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -19824,8 +20210,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMoveLink(PyObject *self, PyObject *a 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(); @@ -19860,8 +20248,10 @@ static PyObject *_wrap_PyCircleShape_base_OnSizingDragLeft(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyCircleShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -20713,8 +21103,10 @@ static PyObject *_wrap_PyLineShape_DrawArrow(PyObject *self, PyObject *args, PyO PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxArrowHead,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->DrawArrow(*arg2,arg3,arg4,arg5); @@ -21119,8 +21511,10 @@ static PyObject *_wrap_PyLineShape_FindNth(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyLineShape_FindNth",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg5 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->FindNth(arg2,arg3,arg4,arg5); @@ -21663,8 +22057,10 @@ static PyObject *_wrap_PyLineShape_SetIgnoreOffsets(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_SetIgnoreOffsets",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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)->SetIgnoreOffsets(arg2); @@ -21691,8 +22087,10 @@ static PyObject *_wrap_PyLineShape_SetSpline(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_SetSpline",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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)->SetSpline(arg2); @@ -21801,10 +22199,14 @@ static PyObject *_wrap_PyLineShape_SetAlignmentOrientation(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyLineShape_SetAlignmentOrientation",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAlignmentOrientation(arg2,arg3); @@ -21832,8 +22234,10 @@ static PyObject *_wrap_PyLineShape_SetAlignmentType(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:PyLineShape_SetAlignmentType",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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)->SetAlignmentType(arg2,arg3); @@ -21861,8 +22265,10 @@ static PyObject *_wrap_PyLineShape_GetAlignmentOrientation(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_GetAlignmentOrientation",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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)->GetAlignmentOrientation(arg2); @@ -21890,8 +22296,10 @@ static PyObject *_wrap_PyLineShape_GetAlignmentType(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_GetAlignmentType",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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 = (int)(arg1)->GetAlignmentType(arg2); @@ -22035,8 +22443,10 @@ static PyObject *_wrap_PyLineShape_base_OnDrawBranches(PyObject *self, PyObject 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(); @@ -22306,8 +22716,10 @@ static PyObject *_wrap_PyLineShape_base_OnMovePre(PyObject *self, PyObject *args PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -22346,8 +22758,10 @@ static PyObject *_wrap_PyLineShape_base_OnMovePost(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -22379,8 +22793,10 @@ static PyObject *_wrap_PyLineShape_base_OnDragLeft(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyLineShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -22467,8 +22883,10 @@ static PyObject *_wrap_PyLineShape_base_OnDragRight(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyLineShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -22652,8 +23070,10 @@ static PyObject *_wrap_PyLineShape_base_OnMoveLink(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(); @@ -22688,8 +23108,10 @@ static PyObject *_wrap_PyLineShape_base_OnSizingDragLeft(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyLineShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -23232,8 +23654,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDrawBranches(PyObject *self, PyObje 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(); @@ -23503,8 +23927,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -23543,8 +23969,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -23576,8 +24004,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyPolygonShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -23664,8 +24094,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyPolygonShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -23849,8 +24281,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMoveLink(PyObject *self, PyObject * 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(); @@ -23885,8 +24319,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyPolygonShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -24179,8 +24615,10 @@ static PyObject *_wrap_PyTextShape_base_OnDrawBranches(PyObject *self, PyObject 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(); @@ -24450,8 +24888,10 @@ static PyObject *_wrap_PyTextShape_base_OnMovePre(PyObject *self, PyObject *args PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -24490,8 +24930,10 @@ static PyObject *_wrap_PyTextShape_base_OnMovePost(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); 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(); @@ -24523,8 +24965,10 @@ static PyObject *_wrap_PyTextShape_base_OnDragLeft(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyTextShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,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)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -24611,8 +25055,10 @@ static PyObject *_wrap_PyTextShape_base_OnDragRight(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyTextShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,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)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -24796,8 +25242,10 @@ static PyObject *_wrap_PyTextShape_base_OnMoveLink(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(); @@ -24832,8 +25280,10 @@ static PyObject *_wrap_PyTextShape_base_OnSizingDragLeft(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyTextShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,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)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -25545,8 +25995,10 @@ static PyObject *_wrap_Diagram_SetQuickEditMode(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_SetQuickEditMode",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,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)->SetQuickEditMode(arg2); @@ -25573,8 +26025,10 @@ static PyObject *_wrap_Diagram_SetSnapToGrid(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_SetSnapToGrid",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,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)->SetSnapToGrid(arg2); @@ -25601,8 +26055,10 @@ static PyObject *_wrap_Diagram_ShowAll(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_ShowAll",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,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)->ShowAll(arg2); @@ -26089,8 +26545,10 @@ static PyObject *_wrap_PyShapeCanvas_base_OnDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|i:PyShapeCanvas_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeCanvas,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)->base_OnDragLeft(arg2,arg3,arg4,arg5); @@ -26120,8 +26578,10 @@ static PyObject *_wrap_PyShapeCanvas_base_OnDragRight(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|i:PyShapeCanvas_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeCanvas,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)->base_OnDragRight(arg2,arg3,arg4,arg5); diff --git a/wxPython/contrib/stc/stc_wrap.cpp b/wxPython/contrib/stc/stc_wrap.cpp index 1597f564e8..5e9996ce5d 100644 --- a/wxPython/contrib/stc/stc_wrap.cpp +++ b/wxPython/contrib/stc/stc_wrap.cpp @@ -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 +#include + +#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() @@ -775,8 +947,10 @@ static PyObject *_wrap_StyledTextCtrl_SetUndoCollection(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetUndoCollection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetUndoCollection(arg2); @@ -1380,8 +1554,10 @@ static PyObject *_wrap_StyledTextCtrl_SetBufferedDraw(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetBufferedDraw",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetBufferedDraw(arg2); @@ -1939,8 +2115,10 @@ static PyObject *_wrap_StyledTextCtrl_SetMarginSensitive(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_SetMarginSensitive",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetMarginSensitive(arg2,arg3); @@ -2082,8 +2260,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetBold(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetBold",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetBold(arg2,arg3); @@ -2111,8 +2291,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetItalic(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetItalic",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetItalic(arg2,arg3); @@ -2207,8 +2389,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetEOLFilled(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetEOLFilled",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetEOLFilled(arg2,arg3); @@ -2260,8 +2444,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetUnderline(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetUnderline",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetUnderline(arg2,arg3); @@ -2341,8 +2527,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetHotSpot(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetHotSpot",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetHotSpot(arg2,arg3); @@ -2372,8 +2560,10 @@ static PyObject *_wrap_StyledTextCtrl_SetSelForeground(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetSelForeground",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -2407,8 +2597,10 @@ static PyObject *_wrap_StyledTextCtrl_SetSelBackground(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetSelBackground",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -2574,8 +2766,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetVisible(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetVisible",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetVisible(arg2,arg3); @@ -2857,8 +3051,10 @@ static PyObject *_wrap_StyledTextCtrl_SetWhitespaceForeground(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetWhitespaceForeground",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -2892,8 +3088,10 @@ static PyObject *_wrap_StyledTextCtrl_SetWhitespaceBackground(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetWhitespaceBackground",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -3076,8 +3274,10 @@ static PyObject *_wrap_StyledTextCtrl_SetCaretLineVisible(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetCaretLineVisible",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetCaretLineVisible(arg2); @@ -3165,8 +3365,10 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetChangeable(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_StyleSetChangeable",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->StyleSetChangeable(arg2,arg3); @@ -3462,8 +3664,10 @@ static PyObject *_wrap_StyledTextCtrl_AutoCompSetCancelAtStart(PyObject *self, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_AutoCompSetCancelAtStart",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->AutoCompSetCancelAtStart(arg2); @@ -3555,8 +3759,10 @@ static PyObject *_wrap_StyledTextCtrl_AutoCompSetChooseSingle(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_AutoCompSetChooseSingle",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->AutoCompSetChooseSingle(arg2); @@ -3608,8 +3814,10 @@ static PyObject *_wrap_StyledTextCtrl_AutoCompSetIgnoreCase(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_AutoCompSetIgnoreCase",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->AutoCompSetIgnoreCase(arg2); @@ -3702,8 +3910,10 @@ static PyObject *_wrap_StyledTextCtrl_AutoCompSetAutoHide(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_AutoCompSetAutoHide",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->AutoCompSetAutoHide(arg2); @@ -3755,8 +3965,10 @@ static PyObject *_wrap_StyledTextCtrl_AutoCompSetDropRestOfWord(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_AutoCompSetDropRestOfWord",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->AutoCompSetDropRestOfWord(arg2); @@ -3963,8 +4175,10 @@ static PyObject *_wrap_StyledTextCtrl_SetUseTabs(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetUseTabs",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetUseTabs(arg2); @@ -4120,8 +4334,10 @@ static PyObject *_wrap_StyledTextCtrl_SetUseHorizontalScrollBar(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetUseHorizontalScrollBar",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetUseHorizontalScrollBar(arg2); @@ -4173,8 +4389,10 @@ static PyObject *_wrap_StyledTextCtrl_SetIndentationGuides(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetIndentationGuides",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetIndentationGuides(arg2); @@ -4663,8 +4881,10 @@ static PyObject *_wrap_StyledTextCtrl_FormatRange(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiiOOOO:StyledTextCtrl_FormatRange",kwnames,&obj0,&obj1,&arg3,&arg4,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj5,(void **) &arg6, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj6,(void **) &argp7, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; @@ -4994,8 +5214,10 @@ static PyObject *_wrap_StyledTextCtrl_HideSelection(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_HideSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->HideSelection(arg2); @@ -5164,8 +5386,10 @@ static PyObject *_wrap_StyledTextCtrl_SetReadOnly(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetReadOnly",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetReadOnly(arg2); @@ -5482,8 +5706,10 @@ static PyObject *_wrap_StyledTextCtrl_SetOvertype(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetOvertype",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetOvertype(arg2); @@ -6328,8 +6554,10 @@ static PyObject *_wrap_StyledTextCtrl_SetFoldExpanded(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_SetFoldExpanded",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetFoldExpanded(arg2,arg3); @@ -6482,8 +6710,10 @@ static PyObject *_wrap_StyledTextCtrl_SetTabIndents(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetTabIndents",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetTabIndents(arg2); @@ -6535,8 +6765,10 @@ static PyObject *_wrap_StyledTextCtrl_SetBackSpaceUnIndents(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetBackSpaceUnIndents",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetBackSpaceUnIndents(arg2); @@ -6640,8 +6872,10 @@ static PyObject *_wrap_StyledTextCtrl_WordStartPosition(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_WordStartPosition",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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(); result = (int)(arg1)->WordStartPosition(arg2,arg3); @@ -6670,8 +6904,10 @@ static PyObject *_wrap_StyledTextCtrl_WordEndPosition(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StyledTextCtrl_WordEndPosition",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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(); result = (int)(arg1)->WordEndPosition(arg2,arg3); @@ -6890,8 +7126,10 @@ static PyObject *_wrap_StyledTextCtrl_SetEndAtLastLine(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetEndAtLastLine",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetEndAtLastLine(arg2); @@ -6969,8 +7207,10 @@ static PyObject *_wrap_StyledTextCtrl_SetUseVerticalScrollBar(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetUseVerticalScrollBar",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetUseVerticalScrollBar(arg2); @@ -7088,8 +7328,10 @@ static PyObject *_wrap_StyledTextCtrl_SetTwoPhaseDraw(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetTwoPhaseDraw",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetTwoPhaseDraw(arg2); @@ -7192,8 +7434,10 @@ static PyObject *_wrap_StyledTextCtrl_SetFoldMarginColour(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetFoldMarginColour",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -7227,8 +7471,10 @@ static PyObject *_wrap_StyledTextCtrl_SetFoldMarginHiColour(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetFoldMarginHiColour",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -7555,8 +7801,10 @@ static PyObject *_wrap_StyledTextCtrl_SetViewEOL(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetViewEOL",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetViewEOL(arg2); @@ -7953,8 +8201,10 @@ static PyObject *_wrap_StyledTextCtrl_UsePopUp(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_UsePopUp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->UsePopUp(arg2); @@ -8160,8 +8410,10 @@ static PyObject *_wrap_StyledTextCtrl_SetSTCFocus(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetSTCFocus",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetSTCFocus(arg2); @@ -8263,8 +8515,10 @@ static PyObject *_wrap_StyledTextCtrl_SetMouseDownCaptures(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetMouseDownCaptures",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetMouseDownCaptures(arg2); @@ -8765,8 +9019,10 @@ static PyObject *_wrap_StyledTextCtrl_SetHotspotActiveForeground(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetHotspotActiveForeground",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -8800,8 +9056,10 @@ static PyObject *_wrap_StyledTextCtrl_SetHotspotActiveBackground(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:StyledTextCtrl_SetHotspotActiveBackground",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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; + } { arg3 = &temp3; if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; @@ -8832,8 +9090,10 @@ static PyObject *_wrap_StyledTextCtrl_SetHotspotActiveUnderline(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetHotspotActiveUnderline",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetHotspotActiveUnderline(arg2); @@ -9351,12 +9611,18 @@ static PyObject *_wrap_StyledTextCtrl_StyleSetFontAttr(PyObject *self, PyObject if (arg4 == NULL) SWIG_fail; temp4 = True; } - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->StyleSetFontAttr(arg2,arg3,(wxString const &)*arg4,arg5,arg6,arg7); @@ -9667,8 +9933,10 @@ static PyObject *_wrap_StyledTextCtrl_SetLastKeydownProcessed(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextCtrl_SetLastKeydownProcessed",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextCtrl,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)->SetLastKeydownProcessed(arg2); @@ -10391,8 +10659,10 @@ static PyObject *_wrap_StyledTextEvent_SetDragAllowMove(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StyledTextEvent_SetDragAllowMove",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStyledTextEvent,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)->SetDragAllowMove(arg2); diff --git a/wxPython/contrib/xrc/xrc.py b/wxPython/contrib/xrc/xrc.py index 90845bdf53..46dc524566 100644 --- a/wxPython/contrib/xrc/xrc.py +++ b/wxPython/contrib/xrc/xrc.py @@ -55,7 +55,7 @@ class XmlResource(core.Object): return _xrc.XmlResource_ClearHandlers(*args, **kwargs) def AddSubclassFactory(*args, **kwargs): - """XmlResource.AddSubclassFactory(XmlSubclassFactory factory)""" + """AddSubclassFactory(XmlSubclassFactory factory)""" return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs) AddSubclassFactory = staticmethod(AddSubclassFactory) @@ -120,7 +120,7 @@ class XmlResource(core.Object): return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs) def GetXRCID(*args, **kwargs): - """XmlResource.GetXRCID(String str_id) -> int""" + """GetXRCID(String str_id) -> int""" return _xrc.XmlResource_GetXRCID(*args, **kwargs) GetXRCID = staticmethod(GetXRCID) @@ -133,12 +133,12 @@ class XmlResource(core.Object): return _xrc.XmlResource_CompareVersion(*args, **kwargs) def Get(*args, **kwargs): - """XmlResource.Get() -> XmlResource""" + """Get() -> XmlResource""" return _xrc.XmlResource_Get(*args, **kwargs) Get = staticmethod(Get) def Set(*args, **kwargs): - """XmlResource.Set(XmlResource res) -> XmlResource""" + """Set(XmlResource res) -> XmlResource""" return _xrc.XmlResource_Set(*args, **kwargs) Set = staticmethod(Set) diff --git a/wxPython/contrib/xrc/xrc_wrap.cpp b/wxPython/contrib/xrc/xrc_wrap.cpp index 89ae9be242..e3e0983abb 100644 --- a/wxPython/contrib/xrc/xrc_wrap.cpp +++ b/wxPython/contrib/xrc/xrc_wrap.cpp @@ -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 +#include + +#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() @@ -4204,8 +4376,10 @@ static PyObject *_wrap_XmlResourceHandler_GetText(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(); @@ -4313,8 +4487,10 @@ static PyObject *_wrap_XmlResourceHandler_GetBool(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(); @@ -4782,8 +4958,10 @@ static PyObject *_wrap_XmlResourceHandler_CreateChildren(PyObject *self, PyObjec if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyXmlResourceHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxObject,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(); diff --git a/wxPython/src/gtk/calendar_wrap.cpp b/wxPython/src/gtk/calendar_wrap.cpp index fecb539043..a07bde18ce 100644 --- a/wxPython/src/gtk/calendar_wrap.cpp +++ b/wxPython/src/gtk/calendar_wrap.cpp @@ -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 +#include + +#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() @@ -496,8 +668,10 @@ static PyObject *_wrap_CalendarDateAttr_SetHoliday(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarDateAttr_SetHoliday",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarDateAttr,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)->SetHoliday(arg2); @@ -1384,8 +1558,10 @@ static PyObject *_wrap_CalendarCtrl_EnableYearChange(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableYearChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); @@ -1414,8 +1590,10 @@ static PyObject *_wrap_CalendarCtrl_EnableMonthChange(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableMonthChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); @@ -1444,8 +1622,10 @@ static PyObject *_wrap_CalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableHolidayDisplay",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); @@ -1762,8 +1942,10 @@ static PyObject *_wrap_CalendarCtrl_GetAttr(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_GetAttr",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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 = (wxCalendarDateAttr *)((wxCalendarCtrl const *)arg1)->GetAttr(arg2); @@ -1792,8 +1974,10 @@ static PyObject *_wrap_CalendarCtrl_SetAttr(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:CalendarCtrl_SetAttr",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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_wxCalendarDateAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1821,8 +2005,10 @@ static PyObject *_wrap_CalendarCtrl_SetHoliday(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_SetHoliday",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); (arg1)->SetHoliday(arg2); @@ -1849,8 +2035,10 @@ static PyObject *_wrap_CalendarCtrl_ResetAttr(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_ResetAttr",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); (arg1)->ResetAttr(arg2); @@ -1921,8 +2109,10 @@ static PyObject *_wrap_CalendarCtrl_Enable(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); @@ -1952,8 +2142,10 @@ static PyObject *_wrap_CalendarCtrl_Show(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,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(); diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index 7bfb824929..3e4aee8e68 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -54,7 +54,7 @@ class Button(core.Control): return _controls.Button_SetDefault(*args, **kwargs) def GetDefaultSize(*args, **kwargs): - """Button.GetDefaultSize() -> Size""" + """GetDefaultSize() -> Size""" return _controls.Button_GetDefaultSize(*args, **kwargs) GetDefaultSize = staticmethod(GetDefaultSize) @@ -597,7 +597,7 @@ class StaticLine(core.Control): return _controls.StaticLine_IsVertical(*args, **kwargs) def GetDefaultSize(*args, **kwargs): - """StaticLine.GetDefaultSize() -> int""" + """GetDefaultSize() -> int""" return _controls.StaticLine_GetDefaultSize(*args, **kwargs) GetDefaultSize = staticmethod(GetDefaultSize) @@ -1026,7 +1026,7 @@ class TextAttr(object): return _controls.TextAttr_IsDefault(*args, **kwargs) def Combine(*args, **kwargs): - """TextAttr.Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" + """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" return _controls.TextAttr_Combine(*args, **kwargs) Combine = staticmethod(Combine) @@ -2075,7 +2075,7 @@ class Notebook(BookCtrl): """ HitTest(Point pt) -> (tab, where) - Returns the tab which is hit, and flags indicating where using wxNB_HITTEST_ flags. + Returns the tab which is hit, and flags indicating where using wx.NB_HITTEST_ flags. """ return _controls.Notebook_HitTest(*args, **kwargs) @@ -4603,12 +4603,12 @@ class HelpProvider(object): def __repr__(self): return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Set(*args, **kwargs): - """HelpProvider.Set(HelpProvider helpProvider) -> HelpProvider""" + """Set(HelpProvider helpProvider) -> HelpProvider""" return _controls.HelpProvider_Set(*args, **kwargs) Set = staticmethod(Set) def Get(*args, **kwargs): - """HelpProvider.Get() -> HelpProvider""" + """Get() -> HelpProvider""" return _controls.HelpProvider_Get(*args, **kwargs) Get = staticmethod(Get) diff --git a/wxPython/src/gtk/controls_wrap.cpp b/wxPython/src/gtk/controls_wrap.cpp index b5f5f1f6d0..61f16d2bd6 100644 --- a/wxPython/src/gtk/controls_wrap.cpp +++ b/wxPython/src/gtk/controls_wrap.cpp @@ -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 +#include + +#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); diff --git a/wxPython/src/gtk/core.py b/wxPython/src/gtk/core.py index c89c954373..34fde12ac2 100644 --- a/wxPython/src/gtk/core.py +++ b/wxPython/src/gtk/core.py @@ -1711,17 +1711,17 @@ class FileSystem(Object): return _core.FileSystem_FindNext(*args, **kwargs) def AddHandler(*args, **kwargs): - """FileSystem.AddHandler(CPPFileSystemHandler handler)""" + """AddHandler(CPPFileSystemHandler handler)""" return _core.FileSystem_AddHandler(*args, **kwargs) AddHandler = staticmethod(AddHandler) def CleanUpHandlers(*args, **kwargs): - """FileSystem.CleanUpHandlers()""" + """CleanUpHandlers()""" return _core.FileSystem_CleanUpHandlers(*args, **kwargs) CleanUpHandlers = staticmethod(CleanUpHandlers) def FileNameToURL(*args, **kwargs): - """FileSystem.FileNameToURL(String filename) -> String""" + """FileNameToURL(String filename) -> String""" return _core.FileSystem_FileNameToURL(*args, **kwargs) FileNameToURL = staticmethod(FileNameToURL) @@ -1838,7 +1838,7 @@ class MemoryFSHandler(CPPFileSystemHandler): self.thisown = 1 del newobj.thisown def RemoveFile(*args, **kwargs): - """MemoryFSHandler.RemoveFile(String filename)""" + """RemoveFile(String filename)""" return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) RemoveFile = staticmethod(RemoveFile) @@ -1932,7 +1932,7 @@ class ImageHistogram(object): del newobj.thisown def MakeKey(*args, **kwargs): """ - ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long + MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long Get the key in the histogram for the given RGB values """ @@ -2047,12 +2047,12 @@ class Image(Object): return _core.Image_SetMaskFromImage(*args, **kwargs) def CanRead(*args, **kwargs): - """Image.CanRead(String name) -> bool""" + """CanRead(String name) -> bool""" return _core.Image_CanRead(*args, **kwargs) CanRead = staticmethod(CanRead) def GetImageCount(*args, **kwargs): - """Image.GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" + """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" return _core.Image_GetImageCount(*args, **kwargs) GetImageCount = staticmethod(GetImageCount) @@ -2073,7 +2073,7 @@ class Image(Object): return _core.Image_SaveMimeFile(*args, **kwargs) def CanReadStream(*args, **kwargs): - """Image.CanReadStream(InputStream stream) -> bool""" + """CanReadStream(InputStream stream) -> bool""" return _core.Image_CanReadStream(*args, **kwargs) CanReadStream = staticmethod(CanReadStream) @@ -2220,22 +2220,22 @@ class Image(Object): return _core.Image_ComputeHistogram(*args, **kwargs) def AddHandler(*args, **kwargs): - """Image.AddHandler(ImageHandler handler)""" + """AddHandler(ImageHandler handler)""" return _core.Image_AddHandler(*args, **kwargs) AddHandler = staticmethod(AddHandler) def InsertHandler(*args, **kwargs): - """Image.InsertHandler(ImageHandler handler)""" + """InsertHandler(ImageHandler handler)""" return _core.Image_InsertHandler(*args, **kwargs) InsertHandler = staticmethod(InsertHandler) def RemoveHandler(*args, **kwargs): - """Image.RemoveHandler(String name) -> bool""" + """RemoveHandler(String name) -> bool""" return _core.Image_RemoveHandler(*args, **kwargs) RemoveHandler = staticmethod(RemoveHandler) def GetImageExtWildcard(*args, **kwargs): - """Image.GetImageExtWildcard() -> String""" + """GetImageExtWildcard() -> String""" return _core.Image_GetImageExtWildcard(*args, **kwargs) GetImageExtWildcard = staticmethod(GetImageExtWildcard) @@ -4031,32 +4031,32 @@ class UpdateUIEvent(CommandEvent): return _core.UpdateUIEvent_SetText(*args, **kwargs) def SetUpdateInterval(*args, **kwargs): - """UpdateUIEvent.SetUpdateInterval(long updateInterval)""" + """SetUpdateInterval(long updateInterval)""" return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) SetUpdateInterval = staticmethod(SetUpdateInterval) def GetUpdateInterval(*args, **kwargs): - """UpdateUIEvent.GetUpdateInterval() -> long""" + """GetUpdateInterval() -> long""" return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) GetUpdateInterval = staticmethod(GetUpdateInterval) def CanUpdate(*args, **kwargs): - """UpdateUIEvent.CanUpdate(Window win) -> bool""" + """CanUpdate(Window win) -> bool""" return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) CanUpdate = staticmethod(CanUpdate) def ResetUpdateTime(*args, **kwargs): - """UpdateUIEvent.ResetUpdateTime()""" + """ResetUpdateTime()""" return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) ResetUpdateTime = staticmethod(ResetUpdateTime) def SetMode(*args, **kwargs): - """UpdateUIEvent.SetMode(int mode)""" + """SetMode(int mode)""" return _core.UpdateUIEvent_SetMode(*args, **kwargs) SetMode = staticmethod(SetMode) def GetMode(*args, **kwargs): - """UpdateUIEvent.GetMode() -> int""" + """GetMode() -> int""" return _core.UpdateUIEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) @@ -4343,17 +4343,17 @@ class IdleEvent(Event): return _core.IdleEvent_MoreRequested(*args, **kwargs) def SetMode(*args, **kwargs): - """IdleEvent.SetMode(int mode)""" + """SetMode(int mode)""" return _core.IdleEvent_SetMode(*args, **kwargs) SetMode = staticmethod(SetMode) def GetMode(*args, **kwargs): - """IdleEvent.GetMode() -> int""" + """GetMode() -> int""" return _core.IdleEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) def CanSend(*args, **kwargs): - """IdleEvent.CanSend(Window win) -> bool""" + """CanSend(Window win) -> bool""" return _core.IdleEvent_CanSend(*args, **kwargs) CanSend = staticmethod(CanSend) @@ -4729,52 +4729,52 @@ class PyApp(EvtHandler): return _core.PyApp_GetAssertMode(*args, **kwargs) def GetMacSupportPCMenuShortcuts(*args, **kwargs): - """PyApp.GetMacSupportPCMenuShortcuts() -> bool""" + """GetMacSupportPCMenuShortcuts() -> bool""" return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) def GetMacAboutMenuItemId(*args, **kwargs): - """PyApp.GetMacAboutMenuItemId() -> long""" + """GetMacAboutMenuItemId() -> long""" return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) def GetMacPreferencesMenuItemId(*args, **kwargs): - """PyApp.GetMacPreferencesMenuItemId() -> long""" + """GetMacPreferencesMenuItemId() -> long""" return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) def GetMacExitMenuItemId(*args, **kwargs): - """PyApp.GetMacExitMenuItemId() -> long""" + """GetMacExitMenuItemId() -> long""" return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) def GetMacHelpMenuTitleName(*args, **kwargs): - """PyApp.GetMacHelpMenuTitleName() -> String""" + """GetMacHelpMenuTitleName() -> String""" return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) def SetMacSupportPCMenuShortcuts(*args, **kwargs): - """PyApp.SetMacSupportPCMenuShortcuts(bool val)""" + """SetMacSupportPCMenuShortcuts(bool val)""" return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) def SetMacAboutMenuItemId(*args, **kwargs): - """PyApp.SetMacAboutMenuItemId(long val)""" + """SetMacAboutMenuItemId(long val)""" return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) def SetMacPreferencesMenuItemId(*args, **kwargs): - """PyApp.SetMacPreferencesMenuItemId(long val)""" + """SetMacPreferencesMenuItemId(long val)""" return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) def SetMacExitMenuItemId(*args, **kwargs): - """PyApp.SetMacExitMenuItemId(long val)""" + """SetMacExitMenuItemId(long val)""" return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) def SetMacHelpMenuTitleName(*args, **kwargs): - """PyApp.SetMacHelpMenuTitleName(String val)""" + """SetMacHelpMenuTitleName(String val)""" return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) @@ -4788,7 +4788,7 @@ class PyApp(EvtHandler): def GetComCtl32Version(*args, **kwargs): """ - PyApp.GetComCtl32Version() -> int + GetComCtl32Version() -> int Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it wasn't found at all. Raises an exception on non-Windows platforms. @@ -5299,17 +5299,17 @@ class Window(EvtHandler): return _core.Window_GetId(*args, **kwargs) def NewControlId(*args, **kwargs): - """Window.NewControlId() -> int""" + """NewControlId() -> int""" return _core.Window_NewControlId(*args, **kwargs) NewControlId = staticmethod(NewControlId) def NextControlId(*args, **kwargs): - """Window.NextControlId(int winid) -> int""" + """NextControlId(int winid) -> int""" return _core.Window_NextControlId(*args, **kwargs) NextControlId = staticmethod(NextControlId) def PrevControlId(*args, **kwargs): - """Window.PrevControlId(int winid) -> int""" + """PrevControlId(int winid) -> int""" return _core.Window_PrevControlId(*args, **kwargs) PrevControlId = staticmethod(PrevControlId) @@ -5619,7 +5619,7 @@ class Window(EvtHandler): return _core.Window_SetFocusFromKbd(*args, **kwargs) def FindFocus(*args, **kwargs): - """Window.FindFocus() -> Window""" + """FindFocus() -> Window""" return _core.Window_FindFocus(*args, **kwargs) FindFocus = staticmethod(FindFocus) @@ -5760,7 +5760,7 @@ class Window(EvtHandler): return _core.Window_ReleaseMouse(*args, **kwargs) def GetCapture(*args, **kwargs): - """Window.GetCapture() -> Window""" + """GetCapture() -> Window""" return _core.Window_GetCapture(*args, **kwargs) GetCapture = staticmethod(GetCapture) @@ -6168,12 +6168,12 @@ class Validator(EvtHandler): return _core.Validator_SetWindow(*args, **kwargs) def IsSilent(*args, **kwargs): - """Validator.IsSilent() -> bool""" + """IsSilent() -> bool""" return _core.Validator_IsSilent(*args, **kwargs) IsSilent = staticmethod(IsSilent) def SetBellOnError(*args, **kwargs): - """Validator.SetBellOnError(int doIt=True)""" + """SetBellOnError(int doIt=True)""" return _core.Validator_SetBellOnError(*args, **kwargs) SetBellOnError = staticmethod(SetBellOnError) @@ -6232,27 +6232,27 @@ class Menu(EvtHandler): self._setOORInfo(self) def Append(*args, **kwargs): - """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL)""" + """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" return _core.Menu_Append(*args, **kwargs) def AppendSeparator(*args, **kwargs): - """AppendSeparator()""" + """AppendSeparator() -> MenuItem""" return _core.Menu_AppendSeparator(*args, **kwargs) def AppendCheckItem(*args, **kwargs): - """AppendCheckItem(int id, String text, String help=EmptyString)""" + """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_AppendCheckItem(*args, **kwargs) def AppendRadioItem(*args, **kwargs): - """AppendRadioItem(int id, String text, String help=EmptyString)""" + """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_AppendRadioItem(*args, **kwargs) def AppendMenu(*args, **kwargs): - """AppendMenu(int id, String text, Menu submenu, String help=EmptyString)""" + """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" return _core.Menu_AppendMenu(*args, **kwargs) def AppendItem(*args, **kwargs): - """AppendItem(MenuItem item)""" + """AppendItem(MenuItem item) -> MenuItem""" return _core.Menu_AppendItem(*args, **kwargs) def Break(*args, **kwargs): @@ -6260,54 +6260,54 @@ class Menu(EvtHandler): return _core.Menu_Break(*args, **kwargs) def InsertItem(*args, **kwargs): - """InsertItem(size_t pos, MenuItem item) -> bool""" + """InsertItem(size_t pos, MenuItem item) -> MenuItem""" return _core.Menu_InsertItem(*args, **kwargs) def Insert(*args, **kwargs): """ Insert(size_t pos, int id, String text, String help=EmptyString, - int kind=ITEM_NORMAL) + int kind=ITEM_NORMAL) -> MenuItem """ return _core.Menu_Insert(*args, **kwargs) def InsertSeparator(*args, **kwargs): - """InsertSeparator(size_t pos)""" + """InsertSeparator(size_t pos) -> MenuItem""" return _core.Menu_InsertSeparator(*args, **kwargs) def InsertCheckItem(*args, **kwargs): - """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString)""" + """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_InsertCheckItem(*args, **kwargs) def InsertRadioItem(*args, **kwargs): - """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString)""" + """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_InsertRadioItem(*args, **kwargs) def InsertMenu(*args, **kwargs): - """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString)""" + """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" return _core.Menu_InsertMenu(*args, **kwargs) def PrependItem(*args, **kwargs): - """PrependItem(MenuItem item)""" + """PrependItem(MenuItem item) -> MenuItem""" return _core.Menu_PrependItem(*args, **kwargs) def Prepend(*args, **kwargs): - """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL)""" + """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" return _core.Menu_Prepend(*args, **kwargs) def PrependSeparator(*args, **kwargs): - """PrependSeparator()""" + """PrependSeparator() -> MenuItem""" return _core.Menu_PrependSeparator(*args, **kwargs) def PrependCheckItem(*args, **kwargs): - """PrependCheckItem(int id, String text, String help=EmptyString)""" + """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_PrependCheckItem(*args, **kwargs) def PrependRadioItem(*args, **kwargs): - """PrependRadioItem(int id, String text, String help=EmptyString)""" + """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_PrependRadioItem(*args, **kwargs) def PrependMenu(*args, **kwargs): - """PrependMenu(int id, String text, Menu submenu, String help=EmptyString)""" + """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" return _core.Menu_PrependMenu(*args, **kwargs) def Remove(*args, **kwargs): @@ -6636,7 +6636,7 @@ class MenuItem(Object): return _core.MenuItem_GetText(*args, **kwargs) def GetLabelFromText(*args, **kwargs): - """MenuItem.GetLabelFromText(String text) -> String""" + """GetLabelFromText(String text) -> String""" return _core.MenuItem_GetLabelFromText(*args, **kwargs) GetLabelFromText = staticmethod(GetLabelFromText) @@ -6701,7 +6701,7 @@ class MenuItem(Object): return _core.MenuItem_SetAccel(*args, **kwargs) def GetDefaultMarginWidth(*args, **kwargs): - """MenuItem.GetDefaultMarginWidth() -> int""" + """GetDefaultMarginWidth() -> int""" return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) diff --git a/wxPython/src/gtk/core_wrap.cpp b/wxPython/src/gtk/core_wrap.cpp index 88785eac97..3684f47fe6 100644 --- a/wxPython/src/gtk/core_wrap.cpp +++ b/wxPython/src/gtk/core_wrap.cpp @@ -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 +#include + +#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() @@ -5008,7 +5180,7 @@ static PyObject *_wrap_InputStream_Peek(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = Py_BuildValue((char*)"c",result); + resultobj = SPyObj_FromChar(result); return resultobj; fail: return NULL; @@ -5033,7 +5205,7 @@ static PyObject *_wrap_InputStream_GetC(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = Py_BuildValue((char*)"c",result); + resultobj = SPyObj_FromChar(result); return resultobj; fail: return NULL; @@ -5058,7 +5230,7 @@ static PyObject *_wrap_InputStream_LastRead(PyObject *self, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6070,8 +6242,10 @@ static PyObject *_wrap_FileSystem_ChangePathTo(PyObject *self, PyObject *args, P 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(); @@ -7415,12 +7589,18 @@ static PyObject *_wrap_ImageHistogram_MakeKey(PyObject *self, PyObject *args, Py }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ImageHistogram_MakeKey",kwnames,&obj0,&obj1,&obj2)) goto fail; - arg1 = (unsigned char) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned char) SPyObj_AsUnsignedChar(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (unsigned long)wxImageHistogram::MakeKey(arg1,arg2,arg3); @@ -7428,7 +7608,7 @@ static PyObject *_wrap_ImageHistogram_MakeKey(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; @@ -7462,16 +7642,22 @@ static PyObject *_wrap_ImageHistogram_FindFirstUnusedColour(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:ImageHistogram_FindFirstUnusedColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImageHistogram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg5 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg6 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { - arg7 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7753,8 +7939,10 @@ static PyObject *_wrap_new_EmptyImage(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iiO:new_EmptyImage",kwnames,&arg1,&arg2,&obj2)) goto 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(); @@ -7985,12 +8173,18 @@ static PyObject *_wrap_Image_SetRGB(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiOOO:Image_SetRGB",kwnames,&obj0,&arg2,&arg3,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (unsigned char) PyInt_AsLong(obj4); - if (PyErr_Occurred()) SWIG_fail; - arg6 = (unsigned char) PyInt_AsLong(obj5); - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (unsigned char) SPyObj_AsUnsignedChar(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg6 = (unsigned char) SPyObj_AsUnsignedChar(obj5); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetRGB(arg2,arg3,arg4,arg5,arg6); @@ -8100,8 +8294,10 @@ static PyObject *_wrap_Image_SetAlpha(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiO:Image_SetAlpha",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAlpha(arg2,arg3,arg4); @@ -8195,16 +8391,22 @@ static PyObject *_wrap_Image_FindFirstUnusedColour(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:Image_FindFirstUnusedColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg5 = (byte) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (byte) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg6 = (byte) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (byte) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { - arg7 = (byte) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (byte) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8255,12 +8457,18 @@ static PyObject *_wrap_Image_SetMaskFromImage(PyObject *self, PyObject *args, Py if (arg2 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg3 = (byte) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (byte) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (byte) PyInt_AsLong(obj4); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (byte) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (byte) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (byte) SPyObj_AsUnsignedChar(obj4); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SetMaskFromImage((wxImage const &)*arg2,arg3,arg4,arg5); @@ -9117,12 +9325,18 @@ static PyObject *_wrap_Image_SetMaskColour(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_SetMaskColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetMaskColour(arg2,arg3,arg4); @@ -9225,8 +9439,10 @@ static PyObject *_wrap_Image_SetMask(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_SetMask",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,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(); @@ -9291,8 +9507,10 @@ static PyObject *_wrap_Image_Rotate(PyObject *self, PyObject *args, PyObject *kw if ( ! wxPoint_helper(obj2, &arg3)) 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_wxPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -9329,8 +9547,10 @@ static PyObject *_wrap_Image_Rotate90(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_Rotate90",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,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(); @@ -9364,8 +9584,10 @@ static PyObject *_wrap_Image_Mirror(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_Mirror",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,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(); @@ -9407,18 +9629,30 @@ static PyObject *_wrap_Image_Replace(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:Image_Replace",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (unsigned char) PyInt_AsLong(obj4); - if (PyErr_Occurred()) SWIG_fail; - arg6 = (unsigned char) PyInt_AsLong(obj5); - if (PyErr_Occurred()) SWIG_fail; - arg7 = (unsigned char) PyInt_AsLong(obj6); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (unsigned char) SPyObj_AsUnsignedChar(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg6 = (unsigned char) SPyObj_AsUnsignedChar(obj5); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg7 = (unsigned char) SPyObj_AsUnsignedChar(obj6); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Replace(arg2,arg3,arg4,arg5,arg6,arg7); @@ -9450,12 +9684,18 @@ static PyObject *_wrap_Image_ConvertToMono(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_ConvertToMono",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxImage const *)arg1)->ConvertToMono(arg2,arg3,arg4); @@ -9714,8 +9954,10 @@ static PyObject *_wrap_Image_CountColours(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_CountColours",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - 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(); @@ -9724,7 +9966,7 @@ static PyObject *_wrap_Image_CountColours(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; @@ -9755,7 +9997,7 @@ static PyObject *_wrap_Image_ComputeHistogram(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; @@ -9922,12 +10164,18 @@ static PyObject *_wrap_Image_ConvertToMonoBitmap(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_ConvertToMonoBitmap",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxImage_ConvertToMonoBitmap(arg1,arg2,arg3,arg4); @@ -10576,8 +10824,10 @@ static PyObject *_wrap_EvtHandler_SetEvtHandlerEnabled(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:EvtHandler_SetEvtHandlerEnabled",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxEvtHandler,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)->SetEvtHandlerEnabled(arg2); @@ -11057,8 +11307,10 @@ static PyObject *_wrap_Event_Skip(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Event_Skip",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxEvent,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(); @@ -13044,8 +13296,10 @@ static PyObject *_wrap_MouseEvent_m_leftDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_leftDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_leftDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13087,8 +13341,10 @@ static PyObject *_wrap_MouseEvent_m_middleDown_set(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_middleDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_middleDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13130,8 +13386,10 @@ static PyObject *_wrap_MouseEvent_m_rightDown_set(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_rightDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_rightDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13173,8 +13431,10 @@ static PyObject *_wrap_MouseEvent_m_controlDown_set(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_controlDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_controlDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13216,8 +13476,10 @@ static PyObject *_wrap_MouseEvent_m_shiftDown_set(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_shiftDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_shiftDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13259,8 +13521,10 @@ static PyObject *_wrap_MouseEvent_m_altDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_altDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_altDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13302,8 +13566,10 @@ static PyObject *_wrap_MouseEvent_m_metaDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_metaDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,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; + } if (arg1) (arg1)->m_metaDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13840,7 +14106,7 @@ static PyObject *_wrap_KeyEvent_GetRawKeyCode(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; @@ -13865,7 +14131,7 @@ static PyObject *_wrap_KeyEvent_GetRawKeyFlags(PyObject *self, PyObject *args, P wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -14121,8 +14387,10 @@ static PyObject *_wrap_KeyEvent_m_controlDown_set(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_controlDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_controlDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14164,8 +14432,10 @@ static PyObject *_wrap_KeyEvent_m_shiftDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_shiftDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_shiftDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14207,8 +14477,10 @@ static PyObject *_wrap_KeyEvent_m_altDown_set(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_altDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_altDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14250,8 +14522,10 @@ static PyObject *_wrap_KeyEvent_m_metaDown_set(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_metaDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_metaDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14293,8 +14567,10 @@ static PyObject *_wrap_KeyEvent_m_scanCode_set(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_scanCode_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_scanCode = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14336,8 +14612,10 @@ static PyObject *_wrap_KeyEvent_m_rawCode_set(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_rawCode_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_rawCode = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14360,7 +14638,7 @@ static PyObject *_wrap_KeyEvent_m_rawCode_get(PyObject *self, PyObject *args, Py if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; result = (unsigned int) ((arg1)->m_rawCode); - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -14379,8 +14657,10 @@ static PyObject *_wrap_KeyEvent_m_rawFlags_set(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_rawFlags_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,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; + } if (arg1) (arg1)->m_rawFlags = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14403,7 +14683,7 @@ static PyObject *_wrap_KeyEvent_m_rawFlags_get(PyObject *self, PyObject *args, P if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; result = (unsigned int) ((arg1)->m_rawFlags); - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -15178,8 +15458,10 @@ static PyObject *_wrap_new_ActivateEvent(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iOi:new_ActivateEvent",kwnames,&arg1,&obj1,&arg3)) goto 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(); @@ -15406,8 +15688,10 @@ static PyObject *_wrap_CloseEvent_SetLoggingOff(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CloseEvent_SetLoggingOff",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCloseEvent,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)->SetLoggingOff(arg2); @@ -15460,8 +15744,10 @@ static PyObject *_wrap_CloseEvent_Veto(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CloseEvent_Veto",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCloseEvent,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(); @@ -15489,8 +15775,10 @@ static PyObject *_wrap_CloseEvent_SetCanVeto(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CloseEvent_SetCanVeto",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCloseEvent,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)->SetCanVeto(arg2); @@ -15574,8 +15862,10 @@ static PyObject *_wrap_new_ShowEvent(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iO:new_ShowEvent",kwnames,&arg1,&obj1)) goto 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(); @@ -15603,8 +15893,10 @@ static PyObject *_wrap_ShowEvent_SetShow(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ShowEvent_SetShow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxShowEvent,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)->SetShow(arg2); @@ -15663,8 +15955,10 @@ static PyObject *_wrap_new_IconizeEvent(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iO:new_IconizeEvent",kwnames,&arg1,&obj1)) goto 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(); @@ -16019,8 +16313,10 @@ static PyObject *_wrap_UpdateUIEvent_Check(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:UpdateUIEvent_Check",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxUpdateUIEvent,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)->Check(arg2); @@ -16047,8 +16343,10 @@ static PyObject *_wrap_UpdateUIEvent_Enable(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:UpdateUIEvent_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxUpdateUIEvent,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)->Enable(arg2); @@ -16483,8 +16781,10 @@ static PyObject *_wrap_QueryNewPaletteEvent_SetPaletteRealized(PyObject *self, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:QueryNewPaletteEvent_SetPaletteRealized",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxQueryNewPaletteEvent,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)->SetPaletteRealized(arg2); @@ -16590,8 +16890,10 @@ static PyObject *_wrap_NavigationKeyEvent_SetDirection(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NavigationKeyEvent_SetDirection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNavigationKeyEvent,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)->SetDirection(arg2); @@ -16643,8 +16945,10 @@ static PyObject *_wrap_NavigationKeyEvent_SetWindowChange(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NavigationKeyEvent_SetWindowChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNavigationKeyEvent,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)->SetWindowChange(arg2); @@ -16977,8 +17281,10 @@ static PyObject *_wrap_IdleEvent_RequestMore(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:IdleEvent_RequestMore",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIdleEvent,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(); @@ -17666,8 +17972,10 @@ static PyObject *_wrap_PyApp_Yield(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PyApp_Yield",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyApp,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(); @@ -17980,8 +18288,10 @@ static PyObject *_wrap_PyApp_SetExitOnFrameDelete(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyApp_SetExitOnFrameDelete",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyApp,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)->SetExitOnFrameDelete(arg2); @@ -18033,8 +18343,10 @@ static PyObject *_wrap_PyApp_SetUseBestVisual(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyApp_SetUseBestVisual",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyApp,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)->SetUseBestVisual(arg2); @@ -18299,8 +18611,10 @@ static PyObject *_wrap_PyApp_SetMacSupportPCMenuShortcuts(PyObject *self, PyObje }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PyApp_SetMacSupportPCMenuShortcuts",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(); wxPyApp::SetMacSupportPCMenuShortcuts(arg1); @@ -18552,8 +18866,10 @@ static PyObject *_wrap_SafeYield(PyObject *self, PyObject *args, PyObject *kwarg 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(); @@ -19226,8 +19542,10 @@ static PyObject *_wrap_Window_Close(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_Close",kwnames,&obj0,&obj1)) goto fail; 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(); @@ -20823,8 +21141,10 @@ static PyObject *_wrap_Window_Show(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_Show",kwnames,&obj0,&obj1)) goto fail; 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(); @@ -20879,8 +21199,10 @@ static PyObject *_wrap_Window_Enable(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_Enable",kwnames,&obj0,&obj1)) goto fail; 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(); @@ -21185,8 +21507,10 @@ static PyObject *_wrap_Window_MakeModal(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_MakeModal",kwnames,&obj0,&obj1)) goto fail; 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(); @@ -21214,8 +21538,10 @@ static PyObject *_wrap_Window_SetThemeEnabled(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetThemeEnabled",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,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)->SetThemeEnabled(arg2); @@ -21838,8 +22164,10 @@ static PyObject *_wrap_Window_PopEventHandler(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_PopEventHandler",kwnames,&obj0,&obj1)) goto fail; 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(); @@ -22405,8 +22733,10 @@ static PyObject *_wrap_Window_Refresh(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Window_Refresh",kwnames,&obj0,&obj1,&obj2)) goto fail; 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; + } } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -23637,8 +23967,10 @@ static PyObject *_wrap_Window_SetScrollbar(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|O:Window_SetScrollbar",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,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(); @@ -23669,8 +24001,10 @@ static PyObject *_wrap_Window_SetScrollPos(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:Window_SetScrollPos",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, 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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24268,8 +24602,10 @@ static PyObject *_wrap_Window_SetAutoLayout(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetAutoLayout",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,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)->SetAutoLayout(arg2); @@ -24350,8 +24686,10 @@ static PyObject *_wrap_Window_SetSizer(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxSizer,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(); @@ -24383,8 +24721,10 @@ static PyObject *_wrap_Window_SetSizerAndFit(PyObject *self, PyObject *args, PyO if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxSizer,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(); @@ -24618,8 +24958,10 @@ static PyObject *_wrap_Window_FromHWND(PyObject *self, PyObject *args, PyObject }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_FromHWND",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(); result = (wxWindow *)wxWindow_FromHWND(arg1); @@ -24996,6 +25338,7 @@ static PyObject *_wrap_Menu_Append(PyObject *self, PyObject *args, PyObject *kwa wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; int arg5 = (int) wxITEM_NORMAL ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25021,12 +25364,14 @@ static PyObject *_wrap_Menu_Append(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Append(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); + result = (wxMenuItem *)(arg1)->Append(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25052,6 +25397,7 @@ static PyObject *_wrap_Menu_Append(PyObject *self, PyObject *args, PyObject *kwa static PyObject *_wrap_Menu_AppendSeparator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -25061,12 +25407,14 @@ static PyObject *_wrap_Menu_AppendSeparator(PyObject *self, PyObject *args, PyOb if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AppendSeparator(); + result = (wxMenuItem *)(arg1)->AppendSeparator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25080,6 +25428,7 @@ static PyObject *_wrap_Menu_AppendCheckItem(PyObject *self, PyObject *args, PyOb wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25105,12 +25454,14 @@ static PyObject *_wrap_Menu_AppendCheckItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AppendCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->AppendCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25140,6 +25491,7 @@ static PyObject *_wrap_Menu_AppendRadioItem(PyObject *self, PyObject *args, PyOb wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25165,12 +25517,14 @@ static PyObject *_wrap_Menu_AppendRadioItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AppendRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->AppendRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25201,6 +25555,7 @@ static PyObject *_wrap_Menu_AppendMenu(PyObject *self, PyObject *args, PyObject wxMenu *arg4 = (wxMenu *) 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25228,12 +25583,14 @@ static PyObject *_wrap_Menu_AppendMenu(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Append(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->Append(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25260,6 +25617,7 @@ static PyObject *_wrap_Menu_AppendItem(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; wxMenuItem *arg2 = (wxMenuItem *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -25271,12 +25629,14 @@ static PyObject *_wrap_Menu_AppendItem(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Append(arg2); + result = (wxMenuItem *)(arg1)->Append(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25312,7 +25672,7 @@ static PyObject *_wrap_Menu_InsertItem(PyObject *self, PyObject *args, PyObject wxMenu *arg1 = (wxMenu *) 0 ; size_t arg2 ; wxMenuItem *arg3 = (wxMenuItem *) 0 ; - bool result; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -25322,17 +25682,21 @@ static PyObject *_wrap_Menu_InsertItem(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Menu_InsertItem",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->Insert(arg2,arg3); + result = (wxMenuItem *)(arg1)->Insert(arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25348,6 +25712,7 @@ static PyObject *_wrap_Menu_Insert(PyObject *self, PyObject *args, PyObject *kwa wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; int arg6 = (int) wxITEM_NORMAL ; + wxMenuItem *result; bool temp4 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25360,8 +25725,10 @@ static PyObject *_wrap_Menu_Insert(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiO|Oi:Menu_Insert",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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; @@ -25376,12 +25743,14 @@ static PyObject *_wrap_Menu_Insert(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Insert(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5,(wxItemKind )arg6); + result = (wxMenuItem *)(arg1)->Insert(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5,(wxItemKind )arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25408,6 +25777,7 @@ static PyObject *_wrap_Menu_InsertSeparator(PyObject *self, PyObject *args, PyOb PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; size_t arg2 ; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -25416,16 +25786,20 @@ static PyObject *_wrap_Menu_InsertSeparator(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Menu_InsertSeparator",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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(); - (arg1)->InsertSeparator(arg2); + result = (wxMenuItem *)(arg1)->InsertSeparator(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25440,6 +25814,7 @@ static PyObject *_wrap_Menu_InsertCheckItem(PyObject *self, PyObject *args, PyOb wxString *arg4 = 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp4 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25452,8 +25827,10 @@ static PyObject *_wrap_Menu_InsertCheckItem(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiO|O:Menu_InsertCheckItem",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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; @@ -25468,12 +25845,14 @@ static PyObject *_wrap_Menu_InsertCheckItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->InsertCheckItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->InsertCheckItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25504,6 +25883,7 @@ static PyObject *_wrap_Menu_InsertRadioItem(PyObject *self, PyObject *args, PyOb wxString *arg4 = 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp4 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25516,8 +25896,10 @@ static PyObject *_wrap_Menu_InsertRadioItem(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiO|O:Menu_InsertRadioItem",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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; @@ -25532,12 +25914,14 @@ static PyObject *_wrap_Menu_InsertRadioItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->InsertRadioItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->InsertRadioItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25569,6 +25953,7 @@ static PyObject *_wrap_Menu_InsertMenu(PyObject *self, PyObject *args, PyObject wxMenu *arg5 = (wxMenu *) 0 ; wxString const &arg6_defvalue = wxPyEmptyString ; wxString *arg6 = (wxString *) &arg6_defvalue ; + wxMenuItem *result; bool temp4 = False ; bool temp6 = False ; PyObject * obj0 = 0 ; @@ -25582,8 +25967,10 @@ static PyObject *_wrap_Menu_InsertMenu(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiOO|O:Menu_InsertMenu",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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; @@ -25599,12 +25986,14 @@ static PyObject *_wrap_Menu_InsertMenu(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Insert(arg2,arg3,(wxString const &)*arg4,arg5,(wxString const &)*arg6); + result = (wxMenuItem *)(arg1)->Insert(arg2,arg3,(wxString const &)*arg4,arg5,(wxString const &)*arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25631,6 +26020,7 @@ static PyObject *_wrap_Menu_PrependItem(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; wxMenuItem *arg2 = (wxMenuItem *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -25642,12 +26032,14 @@ static PyObject *_wrap_Menu_PrependItem(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2); + result = (wxMenuItem *)(arg1)->Prepend(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25662,6 +26054,7 @@ static PyObject *_wrap_Menu_Prepend(PyObject *self, PyObject *args, PyObject *kw wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; int arg5 = (int) wxITEM_NORMAL ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25687,12 +26080,14 @@ static PyObject *_wrap_Menu_Prepend(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); + result = (wxMenuItem *)(arg1)->Prepend(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25718,6 +26113,7 @@ static PyObject *_wrap_Menu_Prepend(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_Menu_PrependSeparator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -25727,12 +26123,14 @@ static PyObject *_wrap_Menu_PrependSeparator(PyObject *self, PyObject *args, PyO if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->PrependSeparator(); + result = (wxMenuItem *)(arg1)->PrependSeparator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25746,6 +26144,7 @@ static PyObject *_wrap_Menu_PrependCheckItem(PyObject *self, PyObject *args, PyO wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25771,12 +26170,14 @@ static PyObject *_wrap_Menu_PrependCheckItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->PrependCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->PrependCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25806,6 +26207,7 @@ static PyObject *_wrap_Menu_PrependRadioItem(PyObject *self, PyObject *args, PyO wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25831,12 +26233,14 @@ static PyObject *_wrap_Menu_PrependRadioItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->PrependRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->PrependRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25867,6 +26271,7 @@ static PyObject *_wrap_Menu_PrependMenu(PyObject *self, PyObject *args, PyObject wxMenu *arg4 = (wxMenu *) 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25894,12 +26299,14 @@ static PyObject *_wrap_Menu_PrependMenu(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->Prepend(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -26130,7 +26537,7 @@ static PyObject *_wrap_Menu_GetMenuItemCount(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; @@ -26244,8 +26651,10 @@ static PyObject *_wrap_Menu_FindItemByPosition(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Menu_FindItemByPosition",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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 = (wxMenuItem *)((wxMenu const *)arg1)->FindItemByPosition(arg2); @@ -26275,8 +26684,10 @@ static PyObject *_wrap_Menu_Enable(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:Menu_Enable",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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)->Enable(arg2,arg3); @@ -26330,8 +26741,10 @@ static PyObject *_wrap_Menu_Check(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:Menu_Check",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,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)->Check(arg2,arg3); @@ -27002,8 +27415,10 @@ static PyObject *_wrap_MenuBar_Insert(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:MenuBar_Insert",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { arg4 = wxString_in_helper(obj3); @@ -27050,7 +27465,7 @@ static PyObject *_wrap_MenuBar_GetMenuCount(PyObject *self, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -27070,8 +27485,10 @@ static PyObject *_wrap_MenuBar_GetMenu(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_GetMenu",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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 = (wxMenu *)((wxMenuBar const *)arg1)->GetMenu(arg2); @@ -27106,8 +27523,10 @@ static PyObject *_wrap_MenuBar_Replace(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:MenuBar_Replace",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { arg4 = wxString_in_helper(obj3); @@ -27151,8 +27570,10 @@ static PyObject *_wrap_MenuBar_Remove(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_Remove",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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 = (wxMenu *)(arg1)->Remove(arg2); @@ -27183,10 +27604,14 @@ static PyObject *_wrap_MenuBar_EnableTop(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MenuBar_EnableTop",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableTop(arg2,arg3); @@ -27214,8 +27639,10 @@ static PyObject *_wrap_MenuBar_IsEnabledTop(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_IsEnabledTop",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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)((wxMenuBar const *)arg1)->IsEnabledTop(arg2); @@ -27245,8 +27672,10 @@ static PyObject *_wrap_MenuBar_SetLabelTop(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MenuBar_SetLabelTop",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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; @@ -27287,8 +27716,10 @@ static PyObject *_wrap_MenuBar_GetLabelTop(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_GetLabelTop",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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 = ((wxMenuBar const *)arg1)->GetLabelTop(arg2); @@ -27448,8 +27879,10 @@ static PyObject *_wrap_MenuBar_Enable(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:MenuBar_Enable",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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)->Enable(arg2,arg3); @@ -27477,8 +27910,10 @@ static PyObject *_wrap_MenuBar_Check(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:MenuBar_Check",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,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)->Check(arg2,arg3); @@ -28190,8 +28625,10 @@ static PyObject *_wrap_MenuItem_SetCheckable(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuItem_SetCheckable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,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)->SetCheckable(arg2); @@ -28323,8 +28760,10 @@ static PyObject *_wrap_MenuItem_Enable(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:MenuItem_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,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(); @@ -28378,8 +28817,10 @@ static PyObject *_wrap_MenuItem_Check(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:MenuItem_Check",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,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(); @@ -30315,8 +30756,10 @@ static PyObject *_wrap_SizerItem_Show(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerItem_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizerItem,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)->Show(arg2); @@ -30653,8 +31096,10 @@ static PyObject *_wrap_Sizer_InsertItem(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_InsertItem",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,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_wxSizerItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -31046,8 +31491,10 @@ static PyObject *_wrap_Sizer_Clear(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Sizer_Clear",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,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(); @@ -31128,8 +31575,10 @@ static PyObject *_wrap_Sizer_Show(PyObject *self, PyObject *args, PyObject *kwar if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; arg2 = obj1; 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(); @@ -31212,8 +31661,10 @@ static PyObject *_wrap_Sizer_ShowItems(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_ShowItems",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,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)->ShowItems(arg2); @@ -31918,8 +32369,10 @@ static PyObject *_wrap_FlexGridSizer_AddGrowableRow(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|i:FlexGridSizer_AddGrowableRow",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,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(); (arg1)->AddGrowableRow(arg2,arg3); @@ -31946,8 +32399,10 @@ static PyObject *_wrap_FlexGridSizer_RemoveGrowableRow(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FlexGridSizer_RemoveGrowableRow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,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(); (arg1)->RemoveGrowableRow(arg2); @@ -31975,8 +32430,10 @@ static PyObject *_wrap_FlexGridSizer_AddGrowableCol(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|i:FlexGridSizer_AddGrowableCol",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,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(); (arg1)->AddGrowableCol(arg2,arg3); @@ -32003,8 +32460,10 @@ static PyObject *_wrap_FlexGridSizer_RemoveGrowableCol(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FlexGridSizer_RemoveGrowableCol",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,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(); (arg1)->RemoveGrowableCol(arg2); @@ -33436,8 +33895,10 @@ static PyObject *_wrap_GridBagSizer_GetItemPosition__SWIG_2(PyObject *self, PyOb if(!PyArg_ParseTuple(args,(char *)"OO:GridBagSizer_GetItemPosition",&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,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 = (arg1)->GetItemPosition(arg2); @@ -33530,7 +33991,13 @@ static PyObject *_wrap_GridBagSizer_GetItemPosition(PyObject *self, PyObject *ar } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_GridBagSizer_GetItemPosition__SWIG_2(self,args); @@ -33620,8 +34087,10 @@ static PyObject *_wrap_GridBagSizer_SetItemPosition__SWIG_2(PyObject *self, PyOb if(!PyArg_ParseTuple(args,(char *)"OOO:GridBagSizer_SetItemPosition",&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,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 = &temp3; if ( ! wxGBPosition_helper(obj2, &arg3)) SWIG_fail; @@ -33724,7 +34193,13 @@ static PyObject *_wrap_GridBagSizer_SetItemPosition(PyObject *self, PyObject *ar } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { @@ -33810,8 +34285,10 @@ static PyObject *_wrap_GridBagSizer_GetItemSpan__SWIG_2(PyObject *self, PyObject if(!PyArg_ParseTuple(args,(char *)"OO:GridBagSizer_GetItemSpan",&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,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 = (arg1)->GetItemSpan(arg2); @@ -33904,7 +34381,13 @@ static PyObject *_wrap_GridBagSizer_GetItemSpan(PyObject *self, PyObject *args) } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_GridBagSizer_GetItemSpan__SWIG_2(self,args); @@ -33994,8 +34477,10 @@ static PyObject *_wrap_GridBagSizer_SetItemSpan__SWIG_2(PyObject *self, PyObject if(!PyArg_ParseTuple(args,(char *)"OOO:GridBagSizer_SetItemSpan",&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,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 = &temp3; if ( ! wxGBSpan_helper(obj2, &arg3)) SWIG_fail; @@ -34098,7 +34583,13 @@ static PyObject *_wrap_GridBagSizer_SetItemSpan(PyObject *self, PyObject *args) } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { @@ -35088,8 +35579,10 @@ static PyObject *_wrap_IndividualLayoutConstraint_SetDone(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IndividualLayoutConstraint_SetDone",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIndividualLayoutConstraint,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)->SetDone(arg2); diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 6a705589c4..96d359bde6 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -1070,6 +1070,48 @@ FONTENCODING_UTF16BE = _gdi.FONTENCODING_UTF16BE FONTENCODING_UTF16LE = _gdi.FONTENCODING_UTF16LE FONTENCODING_UTF32BE = _gdi.FONTENCODING_UTF32BE FONTENCODING_UTF32LE = _gdi.FONTENCODING_UTF32LE +FONTENCODING_MACROMAN = _gdi.FONTENCODING_MACROMAN +FONTENCODING_MACJAPANESE = _gdi.FONTENCODING_MACJAPANESE +FONTENCODING_MACCHINESETRAD = _gdi.FONTENCODING_MACCHINESETRAD +FONTENCODING_MACKOREAN = _gdi.FONTENCODING_MACKOREAN +FONTENCODING_MACARABIC = _gdi.FONTENCODING_MACARABIC +FONTENCODING_MACHEBREW = _gdi.FONTENCODING_MACHEBREW +FONTENCODING_MACGREEK = _gdi.FONTENCODING_MACGREEK +FONTENCODING_MACCYRILLIC = _gdi.FONTENCODING_MACCYRILLIC +FONTENCODING_MACDEVANAGARI = _gdi.FONTENCODING_MACDEVANAGARI +FONTENCODING_MACGURMUKHI = _gdi.FONTENCODING_MACGURMUKHI +FONTENCODING_MACGUJARATI = _gdi.FONTENCODING_MACGUJARATI +FONTENCODING_MACORIYA = _gdi.FONTENCODING_MACORIYA +FONTENCODING_MACBENGALI = _gdi.FONTENCODING_MACBENGALI +FONTENCODING_MACTAMIL = _gdi.FONTENCODING_MACTAMIL +FONTENCODING_MACTELUGU = _gdi.FONTENCODING_MACTELUGU +FONTENCODING_MACKANNADA = _gdi.FONTENCODING_MACKANNADA +FONTENCODING_MACMALAJALAM = _gdi.FONTENCODING_MACMALAJALAM +FONTENCODING_MACSINHALESE = _gdi.FONTENCODING_MACSINHALESE +FONTENCODING_MACBURMESE = _gdi.FONTENCODING_MACBURMESE +FONTENCODING_MACKHMER = _gdi.FONTENCODING_MACKHMER +FONTENCODING_MACTHAI = _gdi.FONTENCODING_MACTHAI +FONTENCODING_MACLAOTIAN = _gdi.FONTENCODING_MACLAOTIAN +FONTENCODING_MACGEORGIAN = _gdi.FONTENCODING_MACGEORGIAN +FONTENCODING_MACARMENIAN = _gdi.FONTENCODING_MACARMENIAN +FONTENCODING_MACCHINESESIMP = _gdi.FONTENCODING_MACCHINESESIMP +FONTENCODING_MACTIBETAN = _gdi.FONTENCODING_MACTIBETAN +FONTENCODING_MACMONGOLIAN = _gdi.FONTENCODING_MACMONGOLIAN +FONTENCODING_MACETHIOPIC = _gdi.FONTENCODING_MACETHIOPIC +FONTENCODING_MACCENTRALEUR = _gdi.FONTENCODING_MACCENTRALEUR +FONTENCODING_MACVIATNAMESE = _gdi.FONTENCODING_MACVIATNAMESE +FONTENCODING_MACARABICEXT = _gdi.FONTENCODING_MACARABICEXT +FONTENCODING_MACSYMBOL = _gdi.FONTENCODING_MACSYMBOL +FONTENCODING_MACDINGBATS = _gdi.FONTENCODING_MACDINGBATS +FONTENCODING_MACTURKISH = _gdi.FONTENCODING_MACTURKISH +FONTENCODING_MACCROATIAN = _gdi.FONTENCODING_MACCROATIAN +FONTENCODING_MACICELANDIC = _gdi.FONTENCODING_MACICELANDIC +FONTENCODING_MACROMANIAN = _gdi.FONTENCODING_MACROMANIAN +FONTENCODING_MACCELTIC = _gdi.FONTENCODING_MACCELTIC +FONTENCODING_MACGAELIC = _gdi.FONTENCODING_MACGAELIC +FONTENCODING_MACKEYBOARD = _gdi.FONTENCODING_MACKEYBOARD +FONTENCODING_MACMIN = _gdi.FONTENCODING_MACMIN +FONTENCODING_MACMAX = _gdi.FONTENCODING_MACMAX FONTENCODING_MAX = _gdi.FONTENCODING_MAX FONTENCODING_UTF16 = _gdi.FONTENCODING_UTF16 FONTENCODING_UTF32 = _gdi.FONTENCODING_UTF32 @@ -1245,12 +1287,12 @@ class FontMapper(object): except: pass def Get(*args, **kwargs): - """FontMapper.Get() -> FontMapper""" + """Get() -> FontMapper""" return _gdi.FontMapper_Get(*args, **kwargs) Get = staticmethod(Get) def Set(*args, **kwargs): - """FontMapper.Set(FontMapper mapper) -> FontMapper""" + """Set(FontMapper mapper) -> FontMapper""" return _gdi.FontMapper_Set(*args, **kwargs) Set = staticmethod(Set) @@ -1259,22 +1301,22 @@ class FontMapper(object): return _gdi.FontMapper_CharsetToEncoding(*args, **kwargs) def GetSupportedEncodingsCount(*args, **kwargs): - """FontMapper.GetSupportedEncodingsCount() -> size_t""" + """GetSupportedEncodingsCount() -> size_t""" return _gdi.FontMapper_GetSupportedEncodingsCount(*args, **kwargs) GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount) def GetEncoding(*args, **kwargs): - """FontMapper.GetEncoding(size_t n) -> int""" + """GetEncoding(size_t n) -> int""" return _gdi.FontMapper_GetEncoding(*args, **kwargs) GetEncoding = staticmethod(GetEncoding) def GetEncodingName(*args, **kwargs): - """FontMapper.GetEncodingName(int encoding) -> String""" + """GetEncodingName(int encoding) -> String""" return _gdi.FontMapper_GetEncodingName(*args, **kwargs) GetEncodingName = staticmethod(GetEncodingName) def GetEncodingDescription(*args, **kwargs): - """FontMapper.GetEncodingDescription(int encoding) -> String""" + """GetEncodingDescription(int encoding) -> String""" return _gdi.FontMapper_GetEncodingDescription(*args, **kwargs) GetEncodingDescription = staticmethod(GetEncodingDescription) @@ -1287,7 +1329,7 @@ class FontMapper(object): return _gdi.FontMapper_SetConfigPath(*args, **kwargs) def GetDefaultConfigPath(*args, **kwargs): - """FontMapper.GetDefaultConfigPath() -> String""" + """GetDefaultConfigPath() -> String""" return _gdi.FontMapper_GetDefaultConfigPath(*args, **kwargs) GetDefaultConfigPath = staticmethod(GetDefaultConfigPath) @@ -1482,12 +1524,12 @@ class Font(GDIObject): return _gdi.Font_GetNoAntiAliasing(*args, **kwargs) def GetDefaultEncoding(*args, **kwargs): - """Font.GetDefaultEncoding() -> int""" + """GetDefaultEncoding() -> int""" return _gdi.Font_GetDefaultEncoding(*args, **kwargs) GetDefaultEncoding = staticmethod(GetDefaultEncoding) def SetDefaultEncoding(*args, **kwargs): - """Font.SetDefaultEncoding(int encoding)""" + """SetDefaultEncoding(int encoding)""" return _gdi.Font_SetDefaultEncoding(*args, **kwargs) SetDefaultEncoding = staticmethod(SetDefaultEncoding) @@ -1866,17 +1908,17 @@ class Locale(object): return val def GetSystemLanguage(*args, **kwargs): - """Locale.GetSystemLanguage() -> int""" + """GetSystemLanguage() -> int""" return _gdi.Locale_GetSystemLanguage(*args, **kwargs) GetSystemLanguage = staticmethod(GetSystemLanguage) def GetSystemEncoding(*args, **kwargs): - """Locale.GetSystemEncoding() -> int""" + """GetSystemEncoding() -> int""" return _gdi.Locale_GetSystemEncoding(*args, **kwargs) GetSystemEncoding = staticmethod(GetSystemEncoding) def GetSystemEncodingName(*args, **kwargs): - """Locale.GetSystemEncodingName() -> String""" + """GetSystemEncodingName() -> String""" return _gdi.Locale_GetSystemEncodingName(*args, **kwargs) GetSystemEncodingName = staticmethod(GetSystemEncodingName) @@ -1902,7 +1944,7 @@ class Locale(object): return _gdi.Locale_GetCanonicalName(*args, **kwargs) def AddCatalogLookupPathPrefix(*args, **kwargs): - """Locale.AddCatalogLookupPathPrefix(String prefix)""" + """AddCatalogLookupPathPrefix(String prefix)""" return _gdi.Locale_AddCatalogLookupPathPrefix(*args, **kwargs) AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix) @@ -1915,22 +1957,22 @@ class Locale(object): return _gdi.Locale_IsLoaded(*args, **kwargs) def GetLanguageInfo(*args, **kwargs): - """Locale.GetLanguageInfo(int lang) -> LanguageInfo""" + """GetLanguageInfo(int lang) -> LanguageInfo""" return _gdi.Locale_GetLanguageInfo(*args, **kwargs) GetLanguageInfo = staticmethod(GetLanguageInfo) def GetLanguageName(*args, **kwargs): - """Locale.GetLanguageName(int lang) -> String""" + """GetLanguageName(int lang) -> String""" return _gdi.Locale_GetLanguageName(*args, **kwargs) GetLanguageName = staticmethod(GetLanguageName) def FindLanguageInfo(*args, **kwargs): - """Locale.FindLanguageInfo(String locale) -> LanguageInfo""" + """FindLanguageInfo(String locale) -> LanguageInfo""" return _gdi.Locale_FindLanguageInfo(*args, **kwargs) FindLanguageInfo = staticmethod(FindLanguageInfo) def AddLanguage(*args, **kwargs): - """Locale.AddLanguage(LanguageInfo info)""" + """AddLanguage(LanguageInfo info)""" return _gdi.Locale_AddLanguage(*args, **kwargs) AddLanguage = staticmethod(AddLanguage) @@ -2019,17 +2061,17 @@ class EncodingConverter(core.Object): return _gdi.EncodingConverter_Convert(*args, **kwargs) def GetPlatformEquivalents(*args, **kwargs): - """EncodingConverter.GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" + """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" return _gdi.EncodingConverter_GetPlatformEquivalents(*args, **kwargs) GetPlatformEquivalents = staticmethod(GetPlatformEquivalents) def GetAllEquivalents(*args, **kwargs): - """EncodingConverter.GetAllEquivalents(int enc) -> wxFontEncodingArray""" + """GetAllEquivalents(int enc) -> wxFontEncodingArray""" return _gdi.EncodingConverter_GetAllEquivalents(*args, **kwargs) GetAllEquivalents = staticmethod(GetAllEquivalents) def CanConvert(*args, **kwargs): - """EncodingConverter.CanConvert(int encIn, int encOut) -> bool""" + """CanConvert(int encIn, int encOut) -> bool""" return _gdi.EncodingConverter_CanConvert(*args, **kwargs) CanConvert = staticmethod(CanConvert) @@ -2943,12 +2985,12 @@ class PostScriptDC(DC): return _gdi.PostScriptDC_SetPrintData(*args, **kwargs) def SetResolution(*args, **kwargs): - """PostScriptDC.SetResolution(int ppi)""" + """SetResolution(int ppi)""" return _gdi.PostScriptDC_SetResolution(*args, **kwargs) SetResolution = staticmethod(SetResolution) def GetResolution(*args, **kwargs): - """PostScriptDC.GetResolution() -> int""" + """GetResolution() -> int""" return _gdi.PostScriptDC_GetResolution(*args, **kwargs) GetResolution = staticmethod(GetResolution) diff --git a/wxPython/src/gtk/gdi_wrap.cpp b/wxPython/src/gtk/gdi_wrap.cpp index 534027e2b8..f5f6cd11a6 100644 --- a/wxPython/src/gtk/gdi_wrap.cpp +++ b/wxPython/src/gtk/gdi_wrap.cpp @@ -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 +#include + +#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() @@ -689,8 +861,10 @@ static PyObject *_wrap_GDIObject_SetVisible(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GDIObject_SetVisible",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGDIObject,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)->SetVisible(arg2); @@ -752,16 +926,22 @@ static PyObject *_wrap_new_Colour(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:new_Colour",kwnames,&obj0,&obj1,&obj2)) goto fail; if (obj0) { - arg1 = (unsigned char) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned char) SPyObj_AsUnsignedChar(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj1) { - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -849,8 +1029,10 @@ static PyObject *_wrap_new_ColourRGB(PyObject *self, PyObject *args, PyObject *k }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_ColourRGB",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(); result = (wxColour *)new wxColour(arg1); @@ -981,12 +1163,18 @@ static PyObject *_wrap_Colour_Set(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Colour_Set",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Set(arg2,arg3,arg4); @@ -1013,8 +1201,10 @@ static PyObject *_wrap_Colour_SetRGB(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_SetRGB",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,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)->Set(arg2); @@ -1238,12 +1428,18 @@ static PyObject *_wrap_Palette_GetPixel(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Palette_GetPixel",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPalette,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (byte) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (byte) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (byte) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (byte) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (byte) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (byte) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)(arg1)->GetPixel(arg2,arg3,arg4); @@ -5392,8 +5588,10 @@ static PyObject *_wrap_NativeFontInfo_SetUnderlined(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NativeFontInfo_SetUnderlined",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNativeFontInfo,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)->SetUnderlined(arg2); @@ -6064,8 +6262,10 @@ static PyObject *_wrap_FontMapper_CharsetToEncoding(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(); @@ -6104,7 +6304,7 @@ static PyObject *_wrap_FontMapper_GetSupportedEncodingsCount(PyObject *self, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6121,8 +6321,10 @@ static PyObject *_wrap_FontMapper_GetEncoding(PyObject *self, PyObject *args, Py }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FontMapper_GetEncoding",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 = (int)wxFontMapper::GetEncoding(arg1); @@ -6316,8 +6518,10 @@ static PyObject *_wrap_FontMapper_GetAltForEncoding(PyObject *self, PyObject *ar } } 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(); @@ -6480,8 +6684,10 @@ static PyObject *_wrap_new_Font(PyObject *self, PyObject *args, PyObject *kwargs if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"iiii|OOi:new_Font",kwnames,&arg1,&arg2,&arg3,&arg4,&obj4,&obj5,&arg7)) goto fail; if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj5) { { @@ -7179,8 +7385,10 @@ static PyObject *_wrap_Font_SetUnderlined(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Font_SetUnderlined",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFont,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)->SetUnderlined(arg2); @@ -7436,8 +7644,10 @@ static PyObject *_wrap_Font_SetNoAntiAliasing(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Font_SetNoAntiAliasing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFont,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(); @@ -7593,8 +7803,10 @@ static PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *self, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyFontEnumerator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; arg2 = obj1; arg3 = obj2; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); @@ -7624,8 +7836,10 @@ static PyObject *_wrap_FontEnumerator_EnumerateFacenames(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:FontEnumerator_EnumerateFacenames",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyFontEnumerator,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(); @@ -8005,12 +8219,16 @@ static PyObject *_wrap_Locale_Init1(PyObject *self, PyObject *args, PyObject *kw } } if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) 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(); @@ -8721,8 +8939,10 @@ static PyObject *_wrap_GetTranslation__SWIG_1(PyObject *self, PyObject *args) { if (arg2 == NULL) SWIG_fail; temp2 = True; } - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxGetTranslation((wxString const &)*arg1,(wxString const &)*arg2,arg3); @@ -8806,7 +9026,13 @@ static PyObject *_wrap_GetTranslation(PyObject *self, PyObject *args) { } if (_v) { { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_GetTranslation__SWIG_1(self,args); @@ -10074,8 +10300,10 @@ static PyObject *_wrap_DC_DrawBitmapXY(PyObject *self, PyObject *args, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } 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(); @@ -10117,8 +10345,10 @@ static PyObject *_wrap_DC_DrawBitmap(PyObject *self, PyObject *args, PyObject *k if ( ! wxPoint_helper(obj2, &arg3)) 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(); @@ -10340,8 +10570,10 @@ static PyObject *_wrap_DC_BlitXY(PyObject *self, PyObject *args, PyObject *kwarg if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj5,(void **) &arg6, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10400,8 +10632,10 @@ static PyObject *_wrap_DC_Blit(PyObject *self, PyObject *args, PyObject *kwargs) if ( ! wxPoint_helper(obj4, &arg5)) 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; + } } if (obj7) { { @@ -12539,10 +12773,14 @@ static PyObject *_wrap_DC_SetAxisOrientation(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:DC_SetAxisOrientation",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAxisOrientation(arg2,arg3); @@ -12619,8 +12857,10 @@ static PyObject *_wrap_DC_SetOptimization(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DC_SetOptimization",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,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)->SetOptimization(arg2); @@ -13519,8 +13759,10 @@ static PyObject *_wrap_new_MirrorDC(PyObject *self, PyObject *args, PyObject *kw if (arg1 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); 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 = (wxMirrorDC *)new wxMirrorDC(*arg1,arg2); @@ -14048,8 +14290,10 @@ static PyObject *_wrap_ImageList_Draw(PyObject *self, PyObject *args, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool const) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14702,8 +14946,10 @@ static PyObject *_wrap_FontList_FindOrCreateFont(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|OOi:FontList_FindOrCreateFont",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5,&obj6,&arg8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontList,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; + } } if (obj6) { { @@ -17018,6 +17264,48 @@ static swig_const_info swig_const_table[] = { { SWIG_PY_INT, (char *)"FONTENCODING_UTF16LE", (long) wxFONTENCODING_UTF16LE, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF32BE", (long) wxFONTENCODING_UTF32BE, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF32LE", (long) wxFONTENCODING_UTF32LE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACROMAN", (long) wxFONTENCODING_MACROMAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACJAPANESE", (long) wxFONTENCODING_MACJAPANESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCHINESETRAD", (long) wxFONTENCODING_MACCHINESETRAD, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKOREAN", (long) wxFONTENCODING_MACKOREAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACARABIC", (long) wxFONTENCODING_MACARABIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACHEBREW", (long) wxFONTENCODING_MACHEBREW, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGREEK", (long) wxFONTENCODING_MACGREEK, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCYRILLIC", (long) wxFONTENCODING_MACCYRILLIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACDEVANAGARI", (long) wxFONTENCODING_MACDEVANAGARI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGURMUKHI", (long) wxFONTENCODING_MACGURMUKHI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGUJARATI", (long) wxFONTENCODING_MACGUJARATI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACORIYA", (long) wxFONTENCODING_MACORIYA, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACBENGALI", (long) wxFONTENCODING_MACBENGALI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTAMIL", (long) wxFONTENCODING_MACTAMIL, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTELUGU", (long) wxFONTENCODING_MACTELUGU, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKANNADA", (long) wxFONTENCODING_MACKANNADA, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMALAJALAM", (long) wxFONTENCODING_MACMALAJALAM, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACSINHALESE", (long) wxFONTENCODING_MACSINHALESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACBURMESE", (long) wxFONTENCODING_MACBURMESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKHMER", (long) wxFONTENCODING_MACKHMER, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTHAI", (long) wxFONTENCODING_MACTHAI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACLAOTIAN", (long) wxFONTENCODING_MACLAOTIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGEORGIAN", (long) wxFONTENCODING_MACGEORGIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACARMENIAN", (long) wxFONTENCODING_MACARMENIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCHINESESIMP", (long) wxFONTENCODING_MACCHINESESIMP, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTIBETAN", (long) wxFONTENCODING_MACTIBETAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMONGOLIAN", (long) wxFONTENCODING_MACMONGOLIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACETHIOPIC", (long) wxFONTENCODING_MACETHIOPIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCENTRALEUR", (long) wxFONTENCODING_MACCENTRALEUR, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACVIATNAMESE", (long) wxFONTENCODING_MACVIATNAMESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACARABICEXT", (long) wxFONTENCODING_MACARABICEXT, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACSYMBOL", (long) wxFONTENCODING_MACSYMBOL, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACDINGBATS", (long) wxFONTENCODING_MACDINGBATS, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTURKISH", (long) wxFONTENCODING_MACTURKISH, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCROATIAN", (long) wxFONTENCODING_MACCROATIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACICELANDIC", (long) wxFONTENCODING_MACICELANDIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACROMANIAN", (long) wxFONTENCODING_MACROMANIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCELTIC", (long) wxFONTENCODING_MACCELTIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGAELIC", (long) wxFONTENCODING_MACGAELIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKEYBOARD", (long) wxFONTENCODING_MACKEYBOARD, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMIN", (long) wxFONTENCODING_MACMIN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMAX", (long) wxFONTENCODING_MACMAX, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_MAX", (long) wxFONTENCODING_MAX, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF16", (long) wxFONTENCODING_UTF16, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF32", (long) wxFONTENCODING_UTF32, 0, 0, 0}, diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index 9b3882cab2..a690fc8100 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -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 +#include + +#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() @@ -1406,8 +1578,10 @@ static PyObject *_wrap_GridCellRenderer_Draw(PyObject *self, PyObject *args, PyO arg5 = &temp5; if ( ! wxRect_helper(obj4, &arg5)) SWIG_fail; } - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Draw(*arg2,*arg3,*arg4,(wxRect const &)*arg5,arg6,arg7,arg8); @@ -2382,8 +2556,10 @@ static PyObject *_wrap_GridCellEditor_Show(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:GridCellEditor_Show",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellEditor,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; + } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGridCellAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } @@ -2678,8 +2854,10 @@ static PyObject *_wrap_PyGridCellEditor_base_Show(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyGridCellEditor_base_Show",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridCellEditor,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; + } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGridCellAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } @@ -3180,8 +3358,10 @@ static PyObject *_wrap_new_GridCellChoiceEditor(PyObject *self, PyObject *args, } } if (obj1) { - arg3 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3695,8 +3875,10 @@ static PyObject *_wrap_GridCellAttr_SetOverflow(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridCellAttr_SetOverflow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttr,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(); @@ -3725,8 +3907,10 @@ static PyObject *_wrap_GridCellAttr_SetReadOnly(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridCellAttr_SetReadOnly",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttr,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(); @@ -4511,8 +4695,10 @@ static PyObject *_wrap_GridCellAttrProvider_UpdateAttrRows(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:GridCellAttrProvider_UpdateAttrRows",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttrProvider,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(); (arg1)->UpdateAttrRows(arg2,arg3); @@ -4540,8 +4726,10 @@ static PyObject *_wrap_GridCellAttrProvider_UpdateAttrCols(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:GridCellAttrProvider_UpdateAttrCols",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttrProvider,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(); (arg1)->UpdateAttrCols(arg2,arg3); @@ -5292,8 +5480,10 @@ static PyObject *_wrap_GridTableBase_SetValueAsBool(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiO:GridTableBase_SetValueAsBool",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetValueAsBool(arg2,arg3,arg4); @@ -5348,12 +5538,16 @@ static PyObject *_wrap_GridTableBase_InsertRows(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_InsertRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5383,8 +5577,10 @@ static PyObject *_wrap_GridTableBase_AppendRows(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridTableBase_AppendRows",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - 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(); @@ -5416,12 +5612,16 @@ static PyObject *_wrap_GridTableBase_DeleteRows(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_DeleteRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5453,12 +5653,16 @@ static PyObject *_wrap_GridTableBase_InsertCols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_InsertCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5488,8 +5692,10 @@ static PyObject *_wrap_GridTableBase_AppendCols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridTableBase_AppendCols",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - 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(); @@ -5521,12 +5727,16 @@ static PyObject *_wrap_GridTableBase_DeleteCols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_DeleteCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6070,12 +6280,16 @@ static PyObject *_wrap_PyGridTableBase_base_InsertRows(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_InsertRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6105,8 +6319,10 @@ static PyObject *_wrap_PyGridTableBase_base_AppendRows(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PyGridTableBase_base_AppendRows",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - 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(); @@ -6138,12 +6354,16 @@ static PyObject *_wrap_PyGridTableBase_base_DeleteRows(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_DeleteRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6175,12 +6395,16 @@ static PyObject *_wrap_PyGridTableBase_base_InsertCols(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_InsertCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6210,8 +6434,10 @@ static PyObject *_wrap_PyGridTableBase_base_AppendCols(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PyGridTableBase_base_AppendCols",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - 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(); @@ -6243,12 +6469,16 @@ static PyObject *_wrap_PyGridTableBase_base_DeleteCols(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_DeleteCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7391,8 +7621,10 @@ static PyObject *_wrap_Grid_SetTable(PyObject *self, PyObject *args, PyObject *k if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGridTableBase,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(); @@ -7448,8 +7680,10 @@ static PyObject *_wrap_Grid_InsertRows(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_InsertRows",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7480,8 +7714,10 @@ static PyObject *_wrap_Grid_AppendRows(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:Grid_AppendRows",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -7513,8 +7749,10 @@ static PyObject *_wrap_Grid_DeleteRows(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_DeleteRows",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7546,8 +7784,10 @@ static PyObject *_wrap_Grid_InsertCols(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_InsertCols",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7578,8 +7818,10 @@ static PyObject *_wrap_Grid_AppendCols(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:Grid_AppendCols",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -7611,8 +7853,10 @@ static PyObject *_wrap_Grid_DeleteCols(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_DeleteCols",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7900,8 +8144,10 @@ static PyObject *_wrap_Grid_Refresh(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Grid_Refresh",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -7957,8 +8203,10 @@ static PyObject *_wrap_Grid_EnableEditing(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_EnableEditing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->EnableEditing(arg2); @@ -7986,8 +8234,10 @@ static PyObject *_wrap_Grid_EnableCellEditControl(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableCellEditControl",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -8431,8 +8681,10 @@ static PyObject *_wrap_Grid_IsVisible(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:Grid_IsVisible",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8513,8 +8765,10 @@ static PyObject *_wrap_Grid_MoveCursorUp(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorUp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorUp(arg2); @@ -8542,8 +8796,10 @@ static PyObject *_wrap_Grid_MoveCursorDown(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorDown",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorDown(arg2); @@ -8571,8 +8827,10 @@ static PyObject *_wrap_Grid_MoveCursorLeft(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorLeft",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorLeft(arg2); @@ -8600,8 +8858,10 @@ static PyObject *_wrap_Grid_MoveCursorRight(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorRight",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorRight(arg2); @@ -8679,8 +8939,10 @@ static PyObject *_wrap_Grid_MoveCursorUpBlock(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorUpBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorUpBlock(arg2); @@ -8708,8 +8970,10 @@ static PyObject *_wrap_Grid_MoveCursorDownBlock(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorDownBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorDownBlock(arg2); @@ -8737,8 +9001,10 @@ static PyObject *_wrap_Grid_MoveCursorLeftBlock(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorLeftBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorLeftBlock(arg2); @@ -8766,8 +9032,10 @@ static PyObject *_wrap_Grid_MoveCursorRightBlock(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorRightBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->MoveCursorRightBlock(arg2); @@ -9668,8 +9936,10 @@ static PyObject *_wrap_Grid_EnableDragRowSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragRowSize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -9747,8 +10017,10 @@ static PyObject *_wrap_Grid_EnableDragColSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragColSize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -9826,8 +10098,10 @@ static PyObject *_wrap_Grid_EnableDragGridSize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragGridSize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10108,8 +10382,10 @@ static PyObject *_wrap_Grid_EnableGridLines(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableGridLines",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10616,8 +10892,10 @@ static PyObject *_wrap_Grid_SetDefaultRowSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SetDefaultRowSize",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10673,8 +10951,10 @@ static PyObject *_wrap_Grid_SetDefaultColSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SetDefaultColSize",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10730,8 +11010,10 @@ static PyObject *_wrap_Grid_AutoSizeColumn(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_AutoSizeColumn",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10761,8 +11043,10 @@ static PyObject *_wrap_Grid_AutoSizeRow(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_AutoSizeRow",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10791,8 +11075,10 @@ static PyObject *_wrap_Grid_AutoSizeColumns(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_AutoSizeColumns",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -10821,8 +11107,10 @@ static PyObject *_wrap_Grid_AutoSizeRows(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_AutoSizeRows",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -11320,8 +11608,10 @@ static PyObject *_wrap_Grid_SetDefaultCellOverflow(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_SetDefaultCellOverflow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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)->SetDefaultCellOverflow(arg2); @@ -11350,8 +11640,10 @@ static PyObject *_wrap_Grid_SetCellOverflow(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiO:Grid_SetCellOverflow",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCellOverflow(arg2,arg3,arg4); @@ -11735,8 +12027,10 @@ static PyObject *_wrap_Grid_SetReadOnly(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:Grid_SetReadOnly",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11766,8 +12060,10 @@ static PyObject *_wrap_Grid_SelectRow(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SelectRow",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -11797,8 +12093,10 @@ static PyObject *_wrap_Grid_SelectCol(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SelectCol",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -11831,8 +12129,10 @@ static PyObject *_wrap_Grid_SelectBlock(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|O:Grid_SelectBlock",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,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(); @@ -12693,24 +12993,34 @@ static PyObject *_wrap_new_GridEvent(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"iiO|iiiiOOOOO:new_GridEvent",kwnames,&arg1,&arg2,&obj2,&arg4,&arg5,&arg6,&arg7,&obj7,&obj8,&obj9,&obj10,&obj11)) goto fail; if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj8) { - arg9 = PyInt_AsLong(obj8) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg9 = (bool) SPyObj_AsBool(obj8); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj10) { - arg11 = PyInt_AsLong(obj10) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg11 = (bool) SPyObj_AsBool(obj10); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj11) { - arg12 = PyInt_AsLong(obj11) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg12 = (bool) SPyObj_AsBool(obj11); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12962,20 +13272,28 @@ static PyObject *_wrap_new_GridSizeEvent(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"iiO|iiiOOOO:new_GridSizeEvent",kwnames,&arg1,&arg2,&obj2,&arg4,&arg5,&arg6,&obj6,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGrid,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; + } } if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj8) { - arg9 = PyInt_AsLong(obj8) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg9 = (bool) SPyObj_AsBool(obj8); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13190,24 +13508,34 @@ static PyObject *_wrap_new_GridRangeSelectEvent(PyObject *self, PyObject *args, if (! wxGridCellCoords_helper(obj4, &arg5)) 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; + } } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj8) { - arg9 = PyInt_AsLong(obj8) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg9 = (bool) SPyObj_AsBool(obj8); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index 603ae204c2..85e1da4dc2 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -1052,7 +1052,7 @@ class HtmlWindow(windows.ScrolledWindow): return _html.HtmlWindow_HasAnchor(*args, **kwargs) def AddFilter(*args, **kwargs): - """HtmlWindow.AddFilter(HtmlFilter filter)""" + """AddFilter(HtmlFilter filter)""" return _html.HtmlWindow_AddFilter(*args, **kwargs) AddFilter = staticmethod(AddFilter) @@ -1182,12 +1182,12 @@ class HtmlPrintout(windows.Printout): return _html.HtmlPrintout_SetMargins(*args, **kwargs) def AddFilter(*args, **kwargs): - """HtmlPrintout.AddFilter(wxHtmlFilter filter)""" + """AddFilter(wxHtmlFilter filter)""" return _html.HtmlPrintout_AddFilter(*args, **kwargs) AddFilter = staticmethod(AddFilter) def CleanUpStatics(*args, **kwargs): - """HtmlPrintout.CleanUpStatics()""" + """CleanUpStatics()""" return _html.HtmlPrintout_CleanUpStatics(*args, **kwargs) CleanUpStatics = staticmethod(CleanUpStatics) diff --git a/wxPython/src/gtk/html_wrap.cpp b/wxPython/src/gtk/html_wrap.cpp index a5073aefee..823b48ae0b 100644 --- a/wxPython/src/gtk/html_wrap.cpp +++ b/wxPython/src/gtk/html_wrap.cpp @@ -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 +#include + +#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() @@ -4246,8 +4418,10 @@ static PyObject *_wrap_HtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlCell_SetCanLiveOnPagebreak",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxHtmlCell,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)->SetCanLiveOnPagebreak(arg2); @@ -4328,8 +4502,10 @@ static PyObject *_wrap_HtmlCell_FindCellByPos(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:HtmlCell_FindCellByPos",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxHtmlCell,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = (unsigned int) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (unsigned int) SPyObj_AsUnsignedInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4442,7 +4618,7 @@ static PyObject *_wrap_HtmlCell_GetDepth(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; @@ -6481,8 +6657,10 @@ static PyObject *_wrap_HtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *args } } 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(); @@ -6700,8 +6878,10 @@ static PyObject *_wrap_HtmlPrintout_SetHtmlText(PyObject *self, PyObject *args, } } 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(); diff --git a/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py index 1ee13ae784..7e5f2b3e48 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -103,32 +103,32 @@ class SystemSettings(object): def __repr__(self): return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def GetColour(*args, **kwargs): - """SystemSettings.GetColour(int index) -> Colour""" + """GetColour(int index) -> Colour""" return _misc.SystemSettings_GetColour(*args, **kwargs) GetColour = staticmethod(GetColour) def GetFont(*args, **kwargs): - """SystemSettings.GetFont(int index) -> Font""" + """GetFont(int index) -> Font""" return _misc.SystemSettings_GetFont(*args, **kwargs) GetFont = staticmethod(GetFont) def GetMetric(*args, **kwargs): - """SystemSettings.GetMetric(int index) -> int""" + """GetMetric(int index) -> int""" return _misc.SystemSettings_GetMetric(*args, **kwargs) GetMetric = staticmethod(GetMetric) def HasFeature(*args, **kwargs): - """SystemSettings.HasFeature(int index) -> bool""" + """HasFeature(int index) -> bool""" return _misc.SystemSettings_HasFeature(*args, **kwargs) HasFeature = staticmethod(HasFeature) def GetScreenType(*args, **kwargs): - """SystemSettings.GetScreenType() -> int""" + """GetScreenType() -> int""" return _misc.SystemSettings_GetScreenType(*args, **kwargs) GetScreenType = staticmethod(GetScreenType) def SetScreenType(*args, **kwargs): - """SystemSettings.SetScreenType(int screen)""" + """SetScreenType(int screen)""" return _misc.SystemSettings_SetScreenType(*args, **kwargs) SetScreenType = staticmethod(SetScreenType) @@ -174,27 +174,27 @@ class SystemOptions(core.Object): self.thisown = 1 del newobj.thisown def SetOption(*args, **kwargs): - """SystemOptions.SetOption(String name, String value)""" + """SetOption(String name, String value)""" return _misc.SystemOptions_SetOption(*args, **kwargs) SetOption = staticmethod(SetOption) def SetOptionInt(*args, **kwargs): - """SystemOptions.SetOptionInt(String name, int value)""" + """SetOptionInt(String name, int value)""" return _misc.SystemOptions_SetOptionInt(*args, **kwargs) SetOptionInt = staticmethod(SetOptionInt) def GetOption(*args, **kwargs): - """SystemOptions.GetOption(String name) -> String""" + """GetOption(String name) -> String""" return _misc.SystemOptions_GetOption(*args, **kwargs) GetOption = staticmethod(GetOption) def GetOptionInt(*args, **kwargs): - """SystemOptions.GetOptionInt(String name) -> int""" + """GetOptionInt(String name) -> int""" return _misc.SystemOptions_GetOptionInt(*args, **kwargs) GetOptionInt = staticmethod(GetOptionInt) def HasOption(*args, **kwargs): - """SystemOptions.HasOption(String name) -> bool""" + """HasOption(String name) -> bool""" return _misc.SystemOptions_HasOption(*args, **kwargs) HasOption = staticmethod(HasOption) @@ -553,12 +553,12 @@ class ToolTip(core.Object): return _misc.ToolTip_GetWindow(*args, **kwargs) def Enable(*args, **kwargs): - """ToolTip.Enable(bool flag)""" + """Enable(bool flag)""" return _misc.ToolTip_Enable(*args, **kwargs) Enable = staticmethod(Enable) def SetDelay(*args, **kwargs): - """ToolTip.SetDelay(long milliseconds)""" + """SetDelay(long milliseconds)""" return _misc.ToolTip_SetDelay(*args, **kwargs) SetDelay = staticmethod(SetDelay) @@ -823,6 +823,7 @@ class FileHistory(core.Object): """GetCount() -> int""" return _misc.FileHistory_GetCount(*args, **kwargs) + GetNoHistoryFiles = GetCount class FileHistoryPtr(FileHistory): def __init__(self, this): @@ -1093,17 +1094,17 @@ class Log(object): self.thisown = 1 del newobj.thisown def IsEnabled(*args, **kwargs): - """Log.IsEnabled() -> bool""" + """IsEnabled() -> bool""" return _misc.Log_IsEnabled(*args, **kwargs) IsEnabled = staticmethod(IsEnabled) def EnableLogging(*args, **kwargs): - """Log.EnableLogging(bool doIt=True) -> bool""" + """EnableLogging(bool doIt=True) -> bool""" return _misc.Log_EnableLogging(*args, **kwargs) EnableLogging = staticmethod(EnableLogging) def OnLog(*args, **kwargs): - """Log.OnLog(wxLogLevel level, wxChar szString, time_t t)""" + """OnLog(wxLogLevel level, wxChar szString, time_t t)""" return _misc.Log_OnLog(*args, **kwargs) OnLog = staticmethod(OnLog) @@ -1112,102 +1113,102 @@ class Log(object): return _misc.Log_Flush(*args, **kwargs) def FlushActive(*args, **kwargs): - """Log.FlushActive()""" + """FlushActive()""" return _misc.Log_FlushActive(*args, **kwargs) FlushActive = staticmethod(FlushActive) def GetActiveTarget(*args, **kwargs): - """Log.GetActiveTarget() -> Log""" + """GetActiveTarget() -> Log""" return _misc.Log_GetActiveTarget(*args, **kwargs) GetActiveTarget = staticmethod(GetActiveTarget) def SetActiveTarget(*args, **kwargs): - """Log.SetActiveTarget(Log pLogger) -> Log""" + """SetActiveTarget(Log pLogger) -> Log""" return _misc.Log_SetActiveTarget(*args, **kwargs) SetActiveTarget = staticmethod(SetActiveTarget) def Suspend(*args, **kwargs): - """Log.Suspend()""" + """Suspend()""" return _misc.Log_Suspend(*args, **kwargs) Suspend = staticmethod(Suspend) def Resume(*args, **kwargs): - """Log.Resume()""" + """Resume()""" return _misc.Log_Resume(*args, **kwargs) Resume = staticmethod(Resume) def SetVerbose(*args, **kwargs): - """Log.SetVerbose(bool bVerbose=True)""" + """SetVerbose(bool bVerbose=True)""" return _misc.Log_SetVerbose(*args, **kwargs) SetVerbose = staticmethod(SetVerbose) def SetLogLevel(*args, **kwargs): - """Log.SetLogLevel(wxLogLevel logLevel)""" + """SetLogLevel(wxLogLevel logLevel)""" return _misc.Log_SetLogLevel(*args, **kwargs) SetLogLevel = staticmethod(SetLogLevel) def DontCreateOnDemand(*args, **kwargs): - """Log.DontCreateOnDemand()""" + """DontCreateOnDemand()""" return _misc.Log_DontCreateOnDemand(*args, **kwargs) DontCreateOnDemand = staticmethod(DontCreateOnDemand) def SetTraceMask(*args, **kwargs): - """Log.SetTraceMask(wxTraceMask ulMask)""" + """SetTraceMask(wxTraceMask ulMask)""" return _misc.Log_SetTraceMask(*args, **kwargs) SetTraceMask = staticmethod(SetTraceMask) def AddTraceMask(*args, **kwargs): - """Log.AddTraceMask(String str)""" + """AddTraceMask(String str)""" return _misc.Log_AddTraceMask(*args, **kwargs) AddTraceMask = staticmethod(AddTraceMask) def RemoveTraceMask(*args, **kwargs): - """Log.RemoveTraceMask(String str)""" + """RemoveTraceMask(String str)""" return _misc.Log_RemoveTraceMask(*args, **kwargs) RemoveTraceMask = staticmethod(RemoveTraceMask) def ClearTraceMasks(*args, **kwargs): - """Log.ClearTraceMasks()""" + """ClearTraceMasks()""" return _misc.Log_ClearTraceMasks(*args, **kwargs) ClearTraceMasks = staticmethod(ClearTraceMasks) def GetTraceMasks(*args, **kwargs): - """Log.GetTraceMasks() -> wxArrayString""" + """GetTraceMasks() -> wxArrayString""" return _misc.Log_GetTraceMasks(*args, **kwargs) GetTraceMasks = staticmethod(GetTraceMasks) def SetTimestamp(*args, **kwargs): - """Log.SetTimestamp(wxChar ts)""" + """SetTimestamp(wxChar ts)""" return _misc.Log_SetTimestamp(*args, **kwargs) SetTimestamp = staticmethod(SetTimestamp) def GetVerbose(*args, **kwargs): - """Log.GetVerbose() -> bool""" + """GetVerbose() -> bool""" return _misc.Log_GetVerbose(*args, **kwargs) GetVerbose = staticmethod(GetVerbose) def GetTraceMask(*args, **kwargs): - """Log.GetTraceMask() -> wxTraceMask""" + """GetTraceMask() -> wxTraceMask""" return _misc.Log_GetTraceMask(*args, **kwargs) GetTraceMask = staticmethod(GetTraceMask) def IsAllowedTraceMask(*args, **kwargs): - """Log.IsAllowedTraceMask(wxChar mask) -> bool""" + """IsAllowedTraceMask(wxChar mask) -> bool""" return _misc.Log_IsAllowedTraceMask(*args, **kwargs) IsAllowedTraceMask = staticmethod(IsAllowedTraceMask) def GetLogLevel(*args, **kwargs): - """Log.GetLogLevel() -> wxLogLevel""" + """GetLogLevel() -> wxLogLevel""" return _misc.Log_GetLogLevel(*args, **kwargs) GetLogLevel = staticmethod(GetLogLevel) def GetTimestamp(*args, **kwargs): - """Log.GetTimestamp() -> wxChar""" + """GetTimestamp() -> wxChar""" return _misc.Log_GetTimestamp(*args, **kwargs) GetTimestamp = staticmethod(GetTimestamp) def TimeStamp(*args, **kwargs): - """Log.TimeStamp() -> String""" + """TimeStamp() -> String""" return _misc.Log_TimeStamp(*args, **kwargs) TimeStamp = staticmethod(TimeStamp) @@ -1575,17 +1576,17 @@ class Process(core.EvtHandler): def __repr__(self): return "<%s.%s; proxy of C++ wxPyProcess instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Kill(*args, **kwargs): - """Process.Kill(int pid, int sig=SIGTERM) -> int""" + """Kill(int pid, int sig=SIGTERM) -> int""" return _misc.Process_Kill(*args, **kwargs) Kill = staticmethod(Kill) def Exists(*args, **kwargs): - """Process.Exists(int pid) -> bool""" + """Exists(int pid) -> bool""" return _misc.Process_Exists(*args, **kwargs) Exists = staticmethod(Exists) def Open(*args, **kwargs): - """Process.Open(String cmd, int flags=EXEC_ASYNC) -> Process""" + """Open(String cmd, int flags=EXEC_ASYNC) -> Process""" return _misc.Process_Open(*args, **kwargs) Open = staticmethod(Open) @@ -2197,7 +2198,7 @@ class FileType(object): return _misc.FileType_Unassociate(*args, **kwargs) def ExpandCommand(*args, **kwargs): - """FileType.ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" + """ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" return _misc.FileType_ExpandCommand(*args, **kwargs) ExpandCommand = staticmethod(ExpandCommand) @@ -2217,7 +2218,7 @@ class MimeTypesManager(object): def __repr__(self): return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def IsOfType(*args, **kwargs): - """MimeTypesManager.IsOfType(String mimeType, String wildcard) -> bool""" + """IsOfType(String mimeType, String wildcard) -> bool""" return _misc.MimeTypesManager_IsOfType(*args, **kwargs) IsOfType = staticmethod(IsOfType) @@ -2305,7 +2306,7 @@ class ArtProvider(object): def PushProvider(*args, **kwargs): """ - ArtProvider.PushProvider(ArtProvider provider) + PushProvider(ArtProvider provider) Add new provider to the top of providers stack. """ @@ -2314,7 +2315,7 @@ class ArtProvider(object): PushProvider = staticmethod(PushProvider) def PopProvider(*args, **kwargs): """ - ArtProvider.PopProvider() -> bool + PopProvider() -> bool Remove latest added provider and delete it. """ @@ -2323,7 +2324,7 @@ class ArtProvider(object): PopProvider = staticmethod(PopProvider) def RemoveProvider(*args, **kwargs): """ - ArtProvider.RemoveProvider(ArtProvider provider) -> bool + RemoveProvider(ArtProvider provider) -> bool Remove provider. The provider must have been added previously! The provider is _not_ deleted. @@ -2333,7 +2334,7 @@ class ArtProvider(object): RemoveProvider = staticmethod(RemoveProvider) def GetBitmap(*args, **kwargs): """ - ArtProvider.GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap + GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap Query the providers for bitmap with given ID and return it. Return wx.NullBitmap if no provider provides it. @@ -2343,7 +2344,7 @@ class ArtProvider(object): GetBitmap = staticmethod(GetBitmap) def GetIcon(*args, **kwargs): """ - ArtProvider.GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon + GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon Query the providers for icon with given ID and return it. Return wx.NullIcon if no provider provides it. @@ -2466,22 +2467,22 @@ class ConfigBase(object): Type_Integer = _misc.ConfigBase_Type_Integer Type_Float = _misc.ConfigBase_Type_Float def Set(*args, **kwargs): - """ConfigBase.Set(ConfigBase pConfig) -> ConfigBase""" + """Set(ConfigBase pConfig) -> ConfigBase""" return _misc.ConfigBase_Set(*args, **kwargs) Set = staticmethod(Set) def Get(*args, **kwargs): - """ConfigBase.Get(bool createOnDemand=True) -> ConfigBase""" + """Get(bool createOnDemand=True) -> ConfigBase""" return _misc.ConfigBase_Get(*args, **kwargs) Get = staticmethod(Get) def Create(*args, **kwargs): - """ConfigBase.Create() -> ConfigBase""" + """Create() -> ConfigBase""" return _misc.ConfigBase_Create(*args, **kwargs) Create = staticmethod(Create) def DontCreateOnDemand(*args, **kwargs): - """ConfigBase.DontCreateOnDemand()""" + """DontCreateOnDemand()""" return _misc.ConfigBase_DontCreateOnDemand(*args, **kwargs) DontCreateOnDemand = staticmethod(DontCreateOnDemand) @@ -2903,62 +2904,62 @@ class DateTime(object): Monday_First = _misc.DateTime_Monday_First Sunday_First = _misc.DateTime_Sunday_First def SetCountry(*args, **kwargs): - """DateTime.SetCountry(int country)""" + """SetCountry(int country)""" return _misc.DateTime_SetCountry(*args, **kwargs) SetCountry = staticmethod(SetCountry) def GetCountry(*args, **kwargs): - """DateTime.GetCountry() -> int""" + """GetCountry() -> int""" return _misc.DateTime_GetCountry(*args, **kwargs) GetCountry = staticmethod(GetCountry) def IsWestEuropeanCountry(*args, **kwargs): - """DateTime.IsWestEuropeanCountry(int country=Country_Default) -> bool""" + """IsWestEuropeanCountry(int country=Country_Default) -> bool""" return _misc.DateTime_IsWestEuropeanCountry(*args, **kwargs) IsWestEuropeanCountry = staticmethod(IsWestEuropeanCountry) def GetCurrentYear(*args, **kwargs): - """DateTime.GetCurrentYear(int cal=Gregorian) -> int""" + """GetCurrentYear(int cal=Gregorian) -> int""" return _misc.DateTime_GetCurrentYear(*args, **kwargs) GetCurrentYear = staticmethod(GetCurrentYear) def ConvertYearToBC(*args, **kwargs): - """DateTime.ConvertYearToBC(int year) -> int""" + """ConvertYearToBC(int year) -> int""" return _misc.DateTime_ConvertYearToBC(*args, **kwargs) ConvertYearToBC = staticmethod(ConvertYearToBC) def GetCurrentMonth(*args, **kwargs): - """DateTime.GetCurrentMonth(int cal=Gregorian) -> int""" + """GetCurrentMonth(int cal=Gregorian) -> int""" return _misc.DateTime_GetCurrentMonth(*args, **kwargs) GetCurrentMonth = staticmethod(GetCurrentMonth) def IsLeapYear(*args, **kwargs): - """DateTime.IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" + """IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" return _misc.DateTime_IsLeapYear(*args, **kwargs) IsLeapYear = staticmethod(IsLeapYear) def GetCentury(*args, **kwargs): - """DateTime.GetCentury(int year=Inv_Year) -> int""" + """GetCentury(int year=Inv_Year) -> int""" return _misc.DateTime_GetCentury(*args, **kwargs) GetCentury = staticmethod(GetCentury) def GetNumberOfDaysinYear(*args, **kwargs): - """DateTime.GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" + """GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" return _misc.DateTime_GetNumberOfDaysinYear(*args, **kwargs) GetNumberOfDaysinYear = staticmethod(GetNumberOfDaysinYear) def GetNumberOfDaysInMonth(*args, **kwargs): - """DateTime.GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" + """GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" return _misc.DateTime_GetNumberOfDaysInMonth(*args, **kwargs) GetNumberOfDaysInMonth = staticmethod(GetNumberOfDaysInMonth) def GetMonthName(*args, **kwargs): - """DateTime.GetMonthName(int month, int flags=Name_Full) -> String""" + """GetMonthName(int month, int flags=Name_Full) -> String""" return _misc.DateTime_GetMonthName(*args, **kwargs) GetMonthName = staticmethod(GetMonthName) def GetWeekDayName(*args, **kwargs): - """DateTime.GetWeekDayName(int weekday, int flags=Name_Full) -> String""" + """GetWeekDayName(int weekday, int flags=Name_Full) -> String""" return _misc.DateTime_GetWeekDayName(*args, **kwargs) GetWeekDayName = staticmethod(GetWeekDayName) @@ -2972,32 +2973,32 @@ class DateTime(object): GetAmPmStrings = staticmethod(GetAmPmStrings) def IsDSTApplicable(*args, **kwargs): - """DateTime.IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" + """IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" return _misc.DateTime_IsDSTApplicable(*args, **kwargs) IsDSTApplicable = staticmethod(IsDSTApplicable) def GetBeginDST(*args, **kwargs): - """DateTime.GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" + """GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" return _misc.DateTime_GetBeginDST(*args, **kwargs) GetBeginDST = staticmethod(GetBeginDST) def GetEndDST(*args, **kwargs): - """DateTime.GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" + """GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" return _misc.DateTime_GetEndDST(*args, **kwargs) GetEndDST = staticmethod(GetEndDST) def Now(*args, **kwargs): - """DateTime.Now() -> DateTime""" + """Now() -> DateTime""" return _misc.DateTime_Now(*args, **kwargs) Now = staticmethod(Now) def UNow(*args, **kwargs): - """DateTime.UNow() -> DateTime""" + """UNow() -> DateTime""" return _misc.DateTime_UNow(*args, **kwargs) UNow = staticmethod(UNow) def Today(*args, **kwargs): - """DateTime.Today() -> DateTime""" + """Today() -> DateTime""" return _misc.DateTime_Today(*args, **kwargs) Today = staticmethod(Today) @@ -3495,52 +3496,52 @@ class TimeSpan(object): def __repr__(self): return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Seconds(*args, **kwargs): - """TimeSpan.Seconds(long sec) -> TimeSpan""" + """Seconds(long sec) -> TimeSpan""" return _misc.TimeSpan_Seconds(*args, **kwargs) Seconds = staticmethod(Seconds) def Second(*args, **kwargs): - """TimeSpan.Second() -> TimeSpan""" + """Second() -> TimeSpan""" return _misc.TimeSpan_Second(*args, **kwargs) Second = staticmethod(Second) def Minutes(*args, **kwargs): - """TimeSpan.Minutes(long min) -> TimeSpan""" + """Minutes(long min) -> TimeSpan""" return _misc.TimeSpan_Minutes(*args, **kwargs) Minutes = staticmethod(Minutes) def Minute(*args, **kwargs): - """TimeSpan.Minute() -> TimeSpan""" + """Minute() -> TimeSpan""" return _misc.TimeSpan_Minute(*args, **kwargs) Minute = staticmethod(Minute) def Hours(*args, **kwargs): - """TimeSpan.Hours(long hours) -> TimeSpan""" + """Hours(long hours) -> TimeSpan""" return _misc.TimeSpan_Hours(*args, **kwargs) Hours = staticmethod(Hours) def Hour(*args, **kwargs): - """TimeSpan.Hour() -> TimeSpan""" + """Hour() -> TimeSpan""" return _misc.TimeSpan_Hour(*args, **kwargs) Hour = staticmethod(Hour) def Days(*args, **kwargs): - """TimeSpan.Days(long days) -> TimeSpan""" + """Days(long days) -> TimeSpan""" return _misc.TimeSpan_Days(*args, **kwargs) Days = staticmethod(Days) def Day(*args, **kwargs): - """TimeSpan.Day() -> TimeSpan""" + """Day() -> TimeSpan""" return _misc.TimeSpan_Day(*args, **kwargs) Day = staticmethod(Day) def Weeks(*args, **kwargs): - """TimeSpan.Weeks(long days) -> TimeSpan""" + """Weeks(long days) -> TimeSpan""" return _misc.TimeSpan_Weeks(*args, **kwargs) Weeks = staticmethod(Weeks) def Week(*args, **kwargs): - """TimeSpan.Week() -> TimeSpan""" + """Week() -> TimeSpan""" return _misc.TimeSpan_Week(*args, **kwargs) Week = staticmethod(Week) @@ -3753,42 +3754,42 @@ class DateSpan(object): except: pass def Days(*args, **kwargs): - """DateSpan.Days(int days) -> DateSpan""" + """Days(int days) -> DateSpan""" return _misc.DateSpan_Days(*args, **kwargs) Days = staticmethod(Days) def Day(*args, **kwargs): - """DateSpan.Day() -> DateSpan""" + """Day() -> DateSpan""" return _misc.DateSpan_Day(*args, **kwargs) Day = staticmethod(Day) def Weeks(*args, **kwargs): - """DateSpan.Weeks(int weeks) -> DateSpan""" + """Weeks(int weeks) -> DateSpan""" return _misc.DateSpan_Weeks(*args, **kwargs) Weeks = staticmethod(Weeks) def Week(*args, **kwargs): - """DateSpan.Week() -> DateSpan""" + """Week() -> DateSpan""" return _misc.DateSpan_Week(*args, **kwargs) Week = staticmethod(Week) def Months(*args, **kwargs): - """DateSpan.Months(int mon) -> DateSpan""" + """Months(int mon) -> DateSpan""" return _misc.DateSpan_Months(*args, **kwargs) Months = staticmethod(Months) def Month(*args, **kwargs): - """DateSpan.Month() -> DateSpan""" + """Month() -> DateSpan""" return _misc.DateSpan_Month(*args, **kwargs) Month = staticmethod(Month) def Years(*args, **kwargs): - """DateSpan.Years(int years) -> DateSpan""" + """Years(int years) -> DateSpan""" return _misc.DateSpan_Years(*args, **kwargs) Years = staticmethod(Years) def Year(*args, **kwargs): - """DateSpan.Year() -> DateSpan""" + """Year() -> DateSpan""" return _misc.DateSpan_Year(*args, **kwargs) Year = staticmethod(Year) diff --git a/wxPython/src/gtk/misc_wrap.cpp b/wxPython/src/gtk/misc_wrap.cpp index c54d8de5f6..bc7b845d90 100644 --- a/wxPython/src/gtk/misc_wrap.cpp +++ b/wxPython/src/gtk/misc_wrap.cpp @@ -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 +#include + +#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() @@ -1703,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(); @@ -2007,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); @@ -2032,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); @@ -2322,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; @@ -2779,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(); @@ -2957,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(); @@ -3046,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(); @@ -3975,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); @@ -5478,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; @@ -5549,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); @@ -5619,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(); @@ -5654,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); @@ -5803,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(); @@ -6047,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(); @@ -6101,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); @@ -6160,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(); @@ -6239,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(); @@ -6269,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); @@ -6432,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(); @@ -6458,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); @@ -6504,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); @@ -6703,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; @@ -6750,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; @@ -6952,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(); @@ -6994,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(); @@ -7100,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); @@ -7187,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); @@ -7275,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; @@ -7293,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(); @@ -7698,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; @@ -7815,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) { { @@ -7850,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; @@ -10473,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(); @@ -10601,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(); @@ -11595,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(); @@ -12046,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(); @@ -13373,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(); @@ -13623,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(); @@ -13633,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; @@ -13654,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(); @@ -13664,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; @@ -14007,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(); @@ -14194,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); @@ -14232,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(); @@ -14385,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(); @@ -14514,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(); @@ -14544,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(); @@ -15817,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); @@ -15976,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(); { @@ -16916,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(); @@ -16964,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(); @@ -17004,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(); @@ -17039,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(); @@ -17128,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; @@ -21681,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; @@ -21704,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; @@ -21792,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); @@ -21881,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); @@ -22109,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; @@ -22172,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; @@ -22262,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(); @@ -22566,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; @@ -23057,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; @@ -24460,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(); diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 6d1cb29f78..f3021f13a0 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -3223,7 +3223,7 @@ class Printer(core.Object): return _windows.Printer_GetAbort(*args, **kwargs) def GetLastError(*args, **kwargs): - """Printer.GetLastError() -> int""" + """GetLastError() -> int""" return _windows.Printer_GetLastError(*args, **kwargs) GetLastError = staticmethod(GetLastError) diff --git a/wxPython/src/gtk/windows_wrap.cpp b/wxPython/src/gtk/windows_wrap.cpp index 3c5aa870ca..3a673b5e51 100644 --- a/wxPython/src/gtk/windows_wrap.cpp +++ b/wxPython/src/gtk/windows_wrap.cpp @@ -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 +#include + +#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() @@ -1336,8 +1508,10 @@ static PyObject *_wrap_ScrolledWindow_SetScrollbars(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|iiO:ScrolledWindow_SetScrollbars",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&arg6,&arg7,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1509,10 +1683,14 @@ static PyObject *_wrap_ScrolledWindow_EnableScrolling(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ScrolledWindow_EnableScrolling",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableScrolling(arg2,arg3); @@ -1753,11 +1931,23 @@ static PyObject *_wrap_ScrolledWindow_CalcScrolledPosition(PyObject *self, PyObj } 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) { { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsInt(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_ScrolledWindow_CalcScrolledPosition__SWIG_1(self,args); @@ -1883,11 +2073,23 @@ static PyObject *_wrap_ScrolledWindow_CalcUnscrolledPosition(PyObject *self, PyO } 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) { { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsInt(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_ScrolledWindow_CalcUnscrolledPosition__SWIG_1(self,args); @@ -2110,8 +2312,10 @@ static PyObject *_wrap_TopLevelWindow_Maximize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_Maximize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTopLevelWindow,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(); @@ -2164,8 +2368,10 @@ static PyObject *_wrap_TopLevelWindow_Iconize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_Iconize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTopLevelWindow,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(); @@ -2334,8 +2540,10 @@ static PyObject *_wrap_TopLevelWindow_ShowFullScreen(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|l:TopLevelWindow_ShowFullScreen",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTopLevelWindow,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)->ShowFullScreen(arg2,arg3); @@ -3230,8 +3438,10 @@ static PyObject *_wrap_Frame_DoGiveHelp(PyObject *self, PyObject *args, PyObject 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(); (arg1)->DoGiveHelp((wxString const &)*arg2,arg3); @@ -5190,8 +5400,10 @@ static PyObject *_wrap_SplitterWindow_SetSashPosition(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:SplitterWindow_SetSashPosition",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSplitterWindow,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(); @@ -5346,8 +5558,10 @@ static PyObject *_wrap_SplitterWindow_SetNeedUpdating(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SplitterWindow_SetNeedUpdating",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSplitterWindow,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)->SetNeedUpdating(arg2); @@ -5766,8 +5980,10 @@ static PyObject *_wrap_SashWindow_SetSashVisible(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:SashWindow_SetSashVisible",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSashWindow,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)->SetSashVisible((wxSashEdgePosition )arg2,arg3); @@ -5821,8 +6037,10 @@ static PyObject *_wrap_SashWindow_SetSashBorder(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:SashWindow_SetSashBorder",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSashWindow,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)->SetSashBorder((wxSashEdgePosition )arg2,arg3); @@ -7884,8 +8102,10 @@ static PyObject *_wrap_VScrolledWindow_SetLineCount(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_SetLineCount",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,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(); (arg1)->SetLineCount(arg2); @@ -7913,8 +8133,10 @@ static PyObject *_wrap_VScrolledWindow_ScrollToLine(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_ScrollToLine",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,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)->ScrollToLine(arg2); @@ -7993,8 +8215,10 @@ static PyObject *_wrap_VScrolledWindow_RefreshLine(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_RefreshLine",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,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(); (arg1)->RefreshLine(arg2); @@ -8023,10 +8247,14 @@ static PyObject *_wrap_VScrolledWindow_RefreshLines(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:VScrolledWindow_RefreshLines",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->RefreshLines(arg2,arg3); @@ -8142,7 +8370,7 @@ static PyObject *_wrap_VScrolledWindow_GetLineCount(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; @@ -8167,7 +8395,7 @@ static PyObject *_wrap_VScrolledWindow_GetFirstVisibleLine(PyObject *self, PyObj wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8192,7 +8420,7 @@ static PyObject *_wrap_VScrolledWindow_GetLastVisibleLine(PyObject *self, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8212,8 +8440,10 @@ static PyObject *_wrap_VScrolledWindow_IsVisible(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_IsVisible",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,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)((wxPyVScrolledWindow const *)arg1)->IsVisible(arg2); @@ -8460,7 +8690,7 @@ static PyObject *_wrap_VListBox_GetItemCount(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; @@ -8530,8 +8760,10 @@ static PyObject *_wrap_VListBox_IsCurrent(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_IsCurrent",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,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)((wxPyVListBox const *)arg1)->IsCurrent(arg2); @@ -8559,8 +8791,10 @@ static PyObject *_wrap_VListBox_IsSelected(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_IsSelected",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,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)((wxPyVListBox const *)arg1)->IsSelected(arg2); @@ -8593,7 +8827,7 @@ static PyObject *_wrap_VListBox_GetSelectedCount(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; @@ -8731,8 +8965,10 @@ static PyObject *_wrap_VListBox_SetItemCount(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_SetItemCount",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,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(); (arg1)->SetItemCount(arg2); @@ -8811,12 +9047,16 @@ static PyObject *_wrap_VListBox_Select(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:VListBox_Select",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); if (PyErr_Occurred()) SWIG_fail; } + if (obj2) { + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->Select(arg2,arg3); @@ -8846,10 +9086,14 @@ static PyObject *_wrap_VListBox_SelectRange(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:VListBox_SelectRange",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SelectRange(arg2,arg3); @@ -8876,8 +9120,10 @@ static PyObject *_wrap_VListBox_Toggle(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_Toggle",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,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(); (arg1)->Toggle(arg2); @@ -9260,8 +9506,10 @@ static PyObject *_wrap_HtmlListBox_SetItemCount(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlListBox_SetItemCount",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyHtmlListBox,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(); (arg1)->SetItemCount(arg2); @@ -11493,8 +11741,10 @@ static PyObject *_wrap_FontData_EnableEffects(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontData_EnableEffects",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontData,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)->EnableEffects(arg2); @@ -11683,8 +11933,10 @@ static PyObject *_wrap_FontData_SetAllowSymbols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontData_SetAllowSymbols",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontData,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)->SetAllowSymbols(arg2); @@ -11828,8 +12080,10 @@ static PyObject *_wrap_FontData_SetShowHelp(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontData_SetShowHelp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontData,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)->SetShowHelp(arg2); @@ -13488,8 +13742,10 @@ static PyObject *_wrap_MDIChildFrame_Maximize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MDIChildFrame_Maximize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMDIChildFrame,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)->Maximize(arg2); @@ -15240,8 +15496,10 @@ static PyObject *_wrap_PrintData_SetCollate(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetCollate",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintData,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)->SetCollate(arg2); @@ -15333,8 +15591,10 @@ static PyObject *_wrap_PrintData_SetColour(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetColour",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintData,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)->SetColour(arg2); @@ -16192,8 +16452,10 @@ static PyObject *_wrap_PageSetupDialogData_EnableHelp(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnableHelp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->EnableHelp(arg2); @@ -16220,8 +16482,10 @@ static PyObject *_wrap_PageSetupDialogData_EnableMargins(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnableMargins",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->EnableMargins(arg2); @@ -16248,8 +16512,10 @@ static PyObject *_wrap_PageSetupDialogData_EnableOrientation(PyObject *self, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnableOrientation",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->EnableOrientation(arg2); @@ -16276,8 +16542,10 @@ static PyObject *_wrap_PageSetupDialogData_EnablePaper(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnablePaper",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->EnablePaper(arg2); @@ -16304,8 +16572,10 @@ static PyObject *_wrap_PageSetupDialogData_EnablePrinter(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnablePrinter",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->EnablePrinter(arg2); @@ -16730,8 +17000,10 @@ static PyObject *_wrap_PageSetupDialogData_SetDefaultInfo(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_SetDefaultInfo",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->SetDefaultInfo(arg2); @@ -16758,8 +17030,10 @@ static PyObject *_wrap_PageSetupDialogData_SetDefaultMinMargins(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_SetDefaultMinMargins",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,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)->SetDefaultMinMargins(arg2); @@ -17514,8 +17788,10 @@ static PyObject *_wrap_PrintDialogData_SetAllPages(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetAllPages",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->SetAllPages(arg2); @@ -17542,8 +17818,10 @@ static PyObject *_wrap_PrintDialogData_SetSelection(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->SetSelection(arg2); @@ -17570,8 +17848,10 @@ static PyObject *_wrap_PrintDialogData_SetCollate(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetCollate",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->SetCollate(arg2); @@ -17598,8 +17878,10 @@ static PyObject *_wrap_PrintDialogData_SetPrintToFile(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetPrintToFile",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->SetPrintToFile(arg2); @@ -17626,8 +17908,10 @@ static PyObject *_wrap_PrintDialogData_SetSetupDialog(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetSetupDialog",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->SetSetupDialog(arg2); @@ -17654,8 +17938,10 @@ static PyObject *_wrap_PrintDialogData_EnablePrintToFile(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnablePrintToFile",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->EnablePrintToFile(arg2); @@ -17682,8 +17968,10 @@ static PyObject *_wrap_PrintDialogData_EnableSelection(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnableSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->EnableSelection(arg2); @@ -17710,8 +17998,10 @@ static PyObject *_wrap_PrintDialogData_EnablePageNumbers(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnablePageNumbers",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->EnablePageNumbers(arg2); @@ -17738,8 +18028,10 @@ static PyObject *_wrap_PrintDialogData_EnableHelp(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnableHelp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,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)->EnableHelp(arg2); @@ -18811,8 +19103,10 @@ static PyObject *_wrap_Printout_SetIsPreview(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Printout_SetIsPreview",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPrintout,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)->SetIsPreview(arg2); @@ -20126,8 +20420,10 @@ static PyObject *_wrap_PrintPreview_SetOk(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintPreview_SetOk",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintPreview,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)->SetOk(arg2); @@ -20155,8 +20451,10 @@ static PyObject *_wrap_PrintPreview_Print(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintPreview_Print",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintPreview,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)->Print(arg2); @@ -20423,8 +20721,10 @@ static PyObject *_wrap_PyPrintPreview_base_Print(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyPrintPreview_base_Print",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPrintPreview,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)->base_Print(arg2); diff --git a/wxPython/src/gtk/wizard.py b/wxPython/src/gtk/wizard.py index 04d3225f77..fd98bc0f72 100644 --- a/wxPython/src/gtk/wizard.py +++ b/wxPython/src/gtk/wizard.py @@ -209,7 +209,7 @@ class WizardPageSimple(WizardPage): return _wizard.WizardPageSimple_SetNext(*args, **kwargs) def Chain(*args, **kwargs): - """WizardPageSimple.Chain(WizardPageSimple first, WizardPageSimple second)""" + """Chain(WizardPageSimple first, WizardPageSimple second)""" return _wizard.WizardPageSimple_Chain(*args, **kwargs) Chain = staticmethod(Chain) diff --git a/wxPython/src/gtk/wizard_wrap.cpp b/wxPython/src/gtk/wizard_wrap.cpp index 78588189d1..6c6633cf71 100644 --- a/wxPython/src/gtk/wizard_wrap.cpp +++ b/wxPython/src/gtk/wizard_wrap.cpp @@ -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 +#include + +#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() @@ -384,8 +556,10 @@ static PyObject *_wrap_new_WizardEvent(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iiOO:new_WizardEvent",kwnames,&arg1,&arg2,&obj2,&obj3)) goto fail; 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) { if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_wxWizardPage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -1912,8 +2086,10 @@ static PyObject *_wrap_Wizard_ShowPage(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWizard,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxWizardPage,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(); diff --git a/wxPython/wxPython/gdi.py b/wxPython/wxPython/gdi.py index 89855496ab..ae3551cc25 100644 --- a/wxPython/wxPython/gdi.py +++ b/wxPython/wxPython/gdi.py @@ -144,12 +144,47 @@ wxFONTENCODING_UTF16LE = wx.gdi.FONTENCODING_UTF16LE wxFONTENCODING_UTF32BE = wx.gdi.FONTENCODING_UTF32BE wxFONTENCODING_UTF32LE = wx.gdi.FONTENCODING_UTF32LE wxFONTENCODING_MACROMAN = wx.gdi.FONTENCODING_MACROMAN -wxFONTENCODING_MACCENTRALEUR = wx.gdi.FONTENCODING_MACCENTRALEUR +wxFONTENCODING_MACJAPANESE = wx.gdi.FONTENCODING_MACJAPANESE +wxFONTENCODING_MACCHINESETRAD = wx.gdi.FONTENCODING_MACCHINESETRAD +wxFONTENCODING_MACKOREAN = wx.gdi.FONTENCODING_MACKOREAN +wxFONTENCODING_MACARABIC = wx.gdi.FONTENCODING_MACARABIC wxFONTENCODING_MACHEBREW = wx.gdi.FONTENCODING_MACHEBREW wxFONTENCODING_MACGREEK = wx.gdi.FONTENCODING_MACGREEK -wxFONTENCODING_MACARABIC = wx.gdi.FONTENCODING_MACARABIC -wxFONTENCODING_MACTURKISH = wx.gdi.FONTENCODING_MACTURKISH wxFONTENCODING_MACCYRILLIC = wx.gdi.FONTENCODING_MACCYRILLIC +wxFONTENCODING_MACDEVANAGARI = wx.gdi.FONTENCODING_MACDEVANAGARI +wxFONTENCODING_MACGURMUKHI = wx.gdi.FONTENCODING_MACGURMUKHI +wxFONTENCODING_MACGUJARATI = wx.gdi.FONTENCODING_MACGUJARATI +wxFONTENCODING_MACORIYA = wx.gdi.FONTENCODING_MACORIYA +wxFONTENCODING_MACBENGALI = wx.gdi.FONTENCODING_MACBENGALI +wxFONTENCODING_MACTAMIL = wx.gdi.FONTENCODING_MACTAMIL +wxFONTENCODING_MACTELUGU = wx.gdi.FONTENCODING_MACTELUGU +wxFONTENCODING_MACKANNADA = wx.gdi.FONTENCODING_MACKANNADA +wxFONTENCODING_MACMALAJALAM = wx.gdi.FONTENCODING_MACMALAJALAM +wxFONTENCODING_MACSINHALESE = wx.gdi.FONTENCODING_MACSINHALESE +wxFONTENCODING_MACBURMESE = wx.gdi.FONTENCODING_MACBURMESE +wxFONTENCODING_MACKHMER = wx.gdi.FONTENCODING_MACKHMER +wxFONTENCODING_MACTHAI = wx.gdi.FONTENCODING_MACTHAI +wxFONTENCODING_MACLAOTIAN = wx.gdi.FONTENCODING_MACLAOTIAN +wxFONTENCODING_MACGEORGIAN = wx.gdi.FONTENCODING_MACGEORGIAN +wxFONTENCODING_MACARMENIAN = wx.gdi.FONTENCODING_MACARMENIAN +wxFONTENCODING_MACCHINESESIMP = wx.gdi.FONTENCODING_MACCHINESESIMP +wxFONTENCODING_MACTIBETAN = wx.gdi.FONTENCODING_MACTIBETAN +wxFONTENCODING_MACMONGOLIAN = wx.gdi.FONTENCODING_MACMONGOLIAN +wxFONTENCODING_MACETHIOPIC = wx.gdi.FONTENCODING_MACETHIOPIC +wxFONTENCODING_MACCENTRALEUR = wx.gdi.FONTENCODING_MACCENTRALEUR +wxFONTENCODING_MACVIATNAMESE = wx.gdi.FONTENCODING_MACVIATNAMESE +wxFONTENCODING_MACARABICEXT = wx.gdi.FONTENCODING_MACARABICEXT +wxFONTENCODING_MACSYMBOL = wx.gdi.FONTENCODING_MACSYMBOL +wxFONTENCODING_MACDINGBATS = wx.gdi.FONTENCODING_MACDINGBATS +wxFONTENCODING_MACTURKISH = wx.gdi.FONTENCODING_MACTURKISH +wxFONTENCODING_MACCROATIAN = wx.gdi.FONTENCODING_MACCROATIAN +wxFONTENCODING_MACICELANDIC = wx.gdi.FONTENCODING_MACICELANDIC +wxFONTENCODING_MACROMANIAN = wx.gdi.FONTENCODING_MACROMANIAN +wxFONTENCODING_MACCELTIC = wx.gdi.FONTENCODING_MACCELTIC +wxFONTENCODING_MACGAELIC = wx.gdi.FONTENCODING_MACGAELIC +wxFONTENCODING_MACKEYBOARD = wx.gdi.FONTENCODING_MACKEYBOARD +wxFONTENCODING_MACMIN = wx.gdi.FONTENCODING_MACMIN +wxFONTENCODING_MACMAX = wx.gdi.FONTENCODING_MACMAX wxFONTENCODING_MAX = wx.gdi.FONTENCODING_MAX wxFONTENCODING_UTF16 = wx.gdi.FONTENCODING_UTF16 wxFONTENCODING_UTF32 = wx.gdi.FONTENCODING_UTF32 -- 2.45.2