]> git.saurik.com Git - wxWidgets.git/commitdiff
Typecheck each list element in wxArrayInt typemap
authorRobin Dunn <robin@alldunn.com>
Tue, 7 Nov 2006 22:36:55 +0000 (22:36 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 7 Nov 2006 22:36:55 +0000 (22:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 files changed:
wxPython/src/gtk/_controls_wrap.cpp
wxPython/src/gtk/_windows_wrap.cpp
wxPython/src/gtk/html_wrap.cpp
wxPython/src/gtk/richtext_wrap.cpp
wxPython/src/mac/_controls_wrap.cpp
wxPython/src/mac/_windows_wrap.cpp
wxPython/src/mac/html_wrap.cpp
wxPython/src/mac/richtext_wrap.cpp
wxPython/src/msw/_controls_wrap.cpp
wxPython/src/msw/_windows_wrap.cpp
wxPython/src/msw/html_wrap.cpp
wxPython/src/msw/richtext_wrap.cpp
wxPython/src/my_typemaps.i

index 66ecc6fe4c72d8089410a4090bb7a35a47fdae63..1a072149cd3c74c8e1c9b4a300743e4f2548dfcd 100644 (file)
@@ -10834,6 +10834,10 @@ SWIGINTERN PyObject *_wrap_TextAttr_SetTabs(PyObject *SWIGUNUSEDPARM(self), PyOb
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index b8e220d4646424bdc10698fe2b2a8fd7762b7787..2d3b357f70832a3a720d03e5f9d05d23523a7de1 100644 (file)
@@ -17913,6 +17913,10 @@ SWIGINTERN PyObject *_wrap_MultiChoiceDialog_SetSelections(PyObject *SWIGUNUSEDP
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 166534674edf42d71b9b4bfab5cd125b1b7b81b7..b1101c8c0b79422b25932edf5aee3b7dc8563ca3 100644 (file)
@@ -11788,6 +11788,10 @@ SWIGINTERN PyObject *_wrap_HtmlDCRenderer_Render(PyObject *SWIGUNUSEDPARM(self),
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj3, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg4->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 7579741279d75b37709cd298f80c150188f5a00a..69525df3f98841e84379ca815bed948b1b883e5a 100644 (file)
@@ -3787,6 +3787,10 @@ SWIGINTERN PyObject *_wrap_RichTextAttr_SetTabs(PyObject *SWIGUNUSEDPARM(self),
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index d9ee231cfee3a030838b1cf91ae961a181ae1c96..6cc83c65c2c13391c2e7c9b755eaf0a287fffcd0 100644 (file)
@@ -10759,6 +10759,10 @@ SWIGINTERN PyObject *_wrap_TextAttr_SetTabs(PyObject *SWIGUNUSEDPARM(self), PyOb
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 62125330359fba3a997834cbea059bc1eb42c14f..e63e7ae631e20eec930f1e42715b214b699dbd13 100644 (file)
@@ -17777,6 +17777,10 @@ SWIGINTERN PyObject *_wrap_MultiChoiceDialog_SetSelections(PyObject *SWIGUNUSEDP
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 57492c1dc7716de92bf3eb8b29e2144cd06067de..ed3271bc1c9a704bac9e0afd4bfbc62c67f204e1 100644 (file)
@@ -11788,6 +11788,10 @@ SWIGINTERN PyObject *_wrap_HtmlDCRenderer_Render(PyObject *SWIGUNUSEDPARM(self),
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj3, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg4->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 5597a29c6def22ffef2764f85e45cf5eafad5a31..bac0a6421aaa11634f9cfe6f862a85fe15defa3f 100644 (file)
@@ -3787,6 +3787,10 @@ SWIGINTERN PyObject *_wrap_RichTextAttr_SetTabs(PyObject *SWIGUNUSEDPARM(self),
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index e3dc68b6fdcc2c0050b9cc7cf42fb9f2e43c5206..d90f211a77e83f1f092dacadbc7db65b622d5ae3 100644 (file)
@@ -10834,6 +10834,10 @@ SWIGINTERN PyObject *_wrap_TextAttr_SetTabs(PyObject *SWIGUNUSEDPARM(self), PyOb
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 77a01ea77411ebdecf5e8b68497f47aabe8e0ce3..2a5fbbed74702f2d3270421c15d188326f32dbbe 100644 (file)
@@ -17977,6 +17977,10 @@ SWIGINTERN PyObject *_wrap_MultiChoiceDialog_SetSelections(PyObject *SWIGUNUSEDP
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 166534674edf42d71b9b4bfab5cd125b1b7b81b7..b1101c8c0b79422b25932edf5aee3b7dc8563ca3 100644 (file)
@@ -11788,6 +11788,10 @@ SWIGINTERN PyObject *_wrap_HtmlDCRenderer_Render(PyObject *SWIGUNUSEDPARM(self),
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj3, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg4->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 7579741279d75b37709cd298f80c150188f5a00a..69525df3f98841e84379ca815bed948b1b883e5a 100644 (file)
@@ -3787,6 +3787,10 @@ SWIGINTERN PyObject *_wrap_RichTextAttr_SetTabs(PyObject *SWIGUNUSEDPARM(self),
     for (i=0; i<len; i++) {
       PyObject* item = PySequence_GetItem(obj1, i);
       PyObject* number  = PyNumber_Int(item);
+      if (!number) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+        SWIG_fail;
+      }       
       arg2->Add(PyInt_AS_LONG(number));
       Py_DECREF(item);
       Py_DECREF(number);
index 331ccc07eb32305a60faf8bdf883a1bac2e8dbbb..958ac1eac5bd1fb058930185d4f3ad5858e2f5a2 100644 (file)
@@ -242,6 +242,10 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
     for (i=0; i<len; i++) {
         PyObject* item = PySequence_GetItem($input, i);
         PyObject* number  = PyNumber_Int(item);
+        if (!number) {
+            PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
+            SWIG_fail;
+        }       
         $1->Add(PyInt_AS_LONG(number));
         Py_DECREF(item);
         Py_DECREF(number);