Typecheck each list element in wxArrayInt typemap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user