reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-03-30 20:09:28 +00:00
parent 73adcb0150
commit 69223c7017
46 changed files with 630 additions and 352 deletions

View File

@ -398,7 +398,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -343,7 +343,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -451,9 +459,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -343,7 +343,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -451,9 +459,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -343,7 +343,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -451,9 +459,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -328,7 +328,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -332,7 +332,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -328,7 +328,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -310,7 +310,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -312,17 +312,15 @@ static swig_type_info *swig_types[42];
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -369,7 +367,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -312,17 +312,15 @@ static swig_type_info *swig_types[42];
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -369,7 +367,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -312,17 +312,15 @@ static swig_type_info *swig_types[42];
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -369,7 +367,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -317,7 +317,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -330,7 +330,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -310,7 +310,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -380,9 +388,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -1775,7 +1775,7 @@ class RadioBox(core.Control):
long style=RA_HORIZONTAL, Validator validator=DefaultValidator,
String name=RadioBoxNameStr) -> RadioBox
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _controls.new_RadioBox(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
@ -1921,7 +1921,7 @@ class Slider(core.Control):
long style=SL_HORIZONTAL, Validator validator=DefaultValidator,
String name=SliderNameStr) -> Slider
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _controls.new_Slider(*args, **kwargs)
self.this = newobj.this
self.thisown = 1

View File

@ -386,7 +386,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -529,9 +537,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -632,7 +632,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -673,17 +681,15 @@ PyObject *wxSize_Get(wxSize *self){
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -1057,9 +1063,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -363,15 +363,30 @@ SWIG_CheckUnsignedLongInRange(unsigned long value, const char* type,
}
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
SWIGSTATICINLINE(unsigned long)
SWIG_AsUnsignedLong(PyObject * obj)
{
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -464,13 +479,6 @@ SWIG_CheckLongInRange(long value, const char* type,
}
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
}
#if INT_MAX != LONG_MAX
SWIGSTATICINLINE(int)
SWIG_AsInt(PyObject *obj)
@ -752,17 +760,15 @@ wxColour wxDC_GetPixel(wxDC *self,wxPoint const &pt){
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -814,7 +814,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -1127,9 +1135,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -1182,17 +1190,15 @@ SWIG_CheckLong(PyObject* obj)
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -358,7 +358,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -565,9 +573,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -804,17 +812,15 @@ SWIG_FloatCast(double value)
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -386,7 +386,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -489,9 +497,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -1096,17 +1104,15 @@ long wxConfigBase_ReadInt(wxConfigBase *self,wxString const &key,long defaultVal
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -683,7 +683,7 @@ class SplitterWindow(core.Window):
Constructor. Creates and shows a SplitterWindow.
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _windows.new_SplitterWindow(*args, **kwargs)
self.this = newobj.this
self.thisown = 1

View File

@ -385,7 +385,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -478,17 +486,15 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -639,9 +645,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -320,7 +320,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -310,7 +310,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -380,9 +388,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -1771,7 +1771,7 @@ class RadioBox(core.Control):
long style=RA_HORIZONTAL, Validator validator=DefaultValidator,
String name=RadioBoxNameStr) -> RadioBox
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _controls.new_RadioBox(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
@ -1917,7 +1917,7 @@ class Slider(core.Control):
long style=SL_HORIZONTAL, Validator validator=DefaultValidator,
String name=SliderNameStr) -> Slider
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _controls.new_Slider(*args, **kwargs)
self.this = newobj.this
self.thisown = 1

View File

@ -386,7 +386,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -529,9 +537,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -632,7 +632,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -673,17 +681,15 @@ PyObject *wxSize_Get(wxSize *self){
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -1057,9 +1063,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -363,15 +363,30 @@ SWIG_CheckUnsignedLongInRange(unsigned long value, const char* type,
}
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
SWIGSTATICINLINE(unsigned long)
SWIG_AsUnsignedLong(PyObject * obj)
{
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -464,13 +479,6 @@ SWIG_CheckLongInRange(long value, const char* type,
}
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
}
#if INT_MAX != LONG_MAX
SWIGSTATICINLINE(int)
SWIG_AsInt(PyObject *obj)
@ -778,17 +786,15 @@ wxColour wxDC_GetPixel(wxDC *self,wxPoint const &pt){
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -814,7 +814,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -1127,9 +1135,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -1182,17 +1190,15 @@ SWIG_CheckLong(PyObject* obj)
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -358,7 +358,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -565,9 +573,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -804,17 +812,15 @@ SWIG_FloatCast(double value)
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -387,7 +387,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -486,9 +494,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -1094,17 +1102,15 @@ long wxConfigBase_ReadInt(wxConfigBase *self,wxString const &key,long defaultVal
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -688,7 +688,7 @@ class SplitterWindow(core.Window):
Constructor. Creates and shows a SplitterWindow.
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _windows.new_SplitterWindow(*args, **kwargs)
self.this = newobj.this
self.thisown = 1

View File

@ -385,7 +385,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -478,17 +486,15 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -634,9 +640,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -320,7 +320,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -310,7 +310,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -380,9 +388,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -1783,7 +1783,7 @@ class RadioBox(core.Control):
long style=RA_HORIZONTAL, Validator validator=DefaultValidator,
String name=RadioBoxNameStr) -> RadioBox
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _controls.new_RadioBox(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
@ -1929,7 +1929,7 @@ class Slider(core.Control):
long style=SL_HORIZONTAL, Validator validator=DefaultValidator,
String name=SliderNameStr) -> Slider
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _controls.new_Slider(*args, **kwargs)
self.this = newobj.this
self.thisown = 1

View File

@ -386,7 +386,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -529,9 +537,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -632,7 +632,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -673,17 +681,15 @@ PyObject *wxSize_Get(wxSize *self){
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -1057,9 +1063,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -363,15 +363,30 @@ SWIG_CheckUnsignedLongInRange(unsigned long value, const char* type,
}
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
SWIGSTATICINLINE(unsigned long)
SWIG_AsUnsignedLong(PyObject * obj)
{
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -464,13 +479,6 @@ SWIG_CheckLongInRange(long value, const char* type,
}
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
}
#if INT_MAX != LONG_MAX
SWIGSTATICINLINE(int)
SWIG_AsInt(PyObject *obj)
@ -753,17 +761,15 @@ wxColour wxDC_GetPixel(wxDC *self,wxPoint const &pt){
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -814,7 +814,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -1127,9 +1135,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -1182,17 +1190,15 @@ SWIG_CheckLong(PyObject* obj)
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -358,7 +358,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -565,9 +573,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -804,17 +812,15 @@ SWIG_FloatCast(double value)
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -387,7 +387,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -486,9 +494,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}
@ -1086,17 +1094,15 @@ long wxConfigBase_ReadInt(wxConfigBase *self,wxString const &key,long defaultVal
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}

View File

@ -688,7 +688,7 @@ class SplitterWindow(core.Window):
Constructor. Creates and shows a SplitterWindow.
"""
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']
if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
newobj = _windows.new_SplitterWindow(*args, **kwargs)
self.this = newobj.this
self.thisown = 1

View File

@ -385,7 +385,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -478,17 +486,15 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
SWIGSTATICINLINE(double)
SWIG_AsDouble(PyObject *obj)
{
double val = (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
#if HAVE_LONG_LONG
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
#else
((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLong(obj));
#endif
if (PyErr_Occurred()) {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "a double is expected");
}
return val;
if (PyNumber_Check(obj))
return PyFloat_AsDouble(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}
@ -639,9 +645,9 @@ SWIG_AsUnsignedLong(PyObject * obj)
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = PyInt_AsLong(obj);
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
}
return i;
}

View File

@ -320,7 +320,15 @@ SWIG_CheckLongInRange(long value, const char* type,
SWIGSTATICINLINE(long)
SWIG_AsLong(PyObject * obj)
{
return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj);
if (PyNumber_Check(obj))
return PyInt_AsLong(obj);
else {
PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
obj->ob_type->tp_name);
PyErr_SetObject(PyExc_TypeError, errmsg);
Py_DECREF(errmsg);
return 0;
}
}