/* ----------------------------------------------------------------------------
* 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
#include "Python.h"
+#include <limits.h>
+#include <float.h>
+
+#ifdef __cplusplus
+#define SWIG_STATIC_INLINE static inline
+#else
+#define SWIG_STATIC_INLINE static
+#endif
+
+SWIG_STATIC_INLINE long
+SPyObj_AsLong(PyObject * obj)
+{
+ return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
+}
+
+SWIG_STATIC_INLINE unsigned long
+SPyObj_AsUnsignedLong(PyObject * obj)
+{
+ if (PyLong_Check(obj)) {
+ return PyLong_AsUnsignedLong(obj);
+ } else {
+ long i = PyInt_AsLong(obj);
+ if ( !PyErr_Occurred() && (i < 0)) {
+ PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
+ }
+ return i;
+ }
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE PyObject*
+SPyObj_FromLongLong(long long value)
+{
+ return (value > (long)(LONG_MAX)) ?
+ PyLong_FromLongLong(value) : PyInt_FromLong((long)value);
+}
+#endif
+
+SWIG_STATIC_INLINE PyObject*
+SPyObj_FromUnsignedLong(unsigned long value)
+{
+ return (value > (unsigned long)(LONG_MAX)) ?
+ PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value);
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE PyObject*
+SPyObj_FromUnsignedLongLong(unsigned long long value)
+{
+ return (value > (unsigned long long)(LONG_MAX)) ?
+ PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value);
+}
+#endif
+
+SWIG_STATIC_INLINE long
+SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value)
+{
+ long value = SPyObj_AsLong(obj);
+ if (!PyErr_Occurred()) {
+ if (value < min_value) {
+ PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum");
+ } else if (value > max_value) {
+ PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum");
+ }
+ }
+ return value;
+}
+
+SWIG_STATIC_INLINE unsigned long
+SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value)
+{
+ unsigned long value = SPyObj_AsUnsignedLong(obj);
+ if (!PyErr_Occurred()) {
+ if (value > max_value) {
+ PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum");
+ }
+ }
+ return value;
+}
+
+SWIG_STATIC_INLINE signed char
+SPyObj_AsSignedChar(PyObject *obj) {
+ return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX);
+}
+
+SWIG_STATIC_INLINE short
+SPyObj_AsShort(PyObject *obj) {
+ return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX);
+}
+
+SWIG_STATIC_INLINE int
+SPyObj_AsInt(PyObject *obj) {
+ return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned char
+SPyObj_AsUnsignedChar(PyObject *obj) {
+ return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned short
+SPyObj_AsUnsignedShort(PyObject *obj) {
+ return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned int
+SPyObj_AsUnsignedInt(PyObject *obj) {
+ return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX);
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE long long
+SPyObj_AsLongLong(PyObject *obj) {
+ return PyInt_Check(obj) ?
+ PyInt_AsLong(obj) : PyLong_AsLongLong(obj);
+}
+
+SWIG_STATIC_INLINE unsigned long long
+SPyObj_AsUnsignedLongLong(PyObject *obj) {
+ return PyLong_Check(obj) ?
+ PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj);
+}
+#endif
+
+SWIG_STATIC_INLINE double
+SPyObj_AsDouble(PyObject *obj) {
+ return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
+ (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
+}
+
+SWIG_STATIC_INLINE float
+SPyObj_AsFloat(PyObject *obj) {
+ double value = SPyObj_AsDouble(obj);
+ if (!PyErr_Occurred()) {
+ if (value < FLT_MIN) {
+ PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min");
+ } else if (value > FLT_MAX) {
+ PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max");
+ }
+ }
+ return (float) value;
+}
+
+SWIG_STATIC_INLINE char
+SPyObj_AsChar(PyObject *obj) {
+ char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ?
+ PyString_AsString(obj)[0]
+ : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX);
+ if (PyErr_Occurred()) {
+ PyErr_Clear();
+ PyErr_SetString(PyExc_TypeError, "a char is required");
+ }
+ return c;
+}
+
+SWIG_STATIC_INLINE PyObject *
+SPyObj_FromChar(char c) {
+ return PyString_FromStringAndSize(&c,1);
+}
+
+SWIG_STATIC_INLINE PyObject *
+SPyObj_FromCharPtr(const char* cptr) {
+ return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)"");
+}
+
+SWIG_STATIC_INLINE int
+SPyObj_AsBool(PyObject *obj) {
+ return SPyObj_AsLong/*Long*/(obj) ? 1 : 0;
+}
+
+
+
#ifdef __cplusplus
extern "C" {
#endif
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()
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();
};
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);
};
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);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();
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();
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();
};
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);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
};
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);
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();
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);
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();
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();
}
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);
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();
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();
};
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);
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();
};
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);
};
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);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();
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();
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);
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);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();
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;
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) {
{
};
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;
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();
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();
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();
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();
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();
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();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();
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);
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();
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();
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();
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();
};
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);
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();
{
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();
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();
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();
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();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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;
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;
}
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);
}
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);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ resultobj = SPyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
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();