[ wxwindows-Bugs-1591819 ] Python sequence-to-wxArrayInt typemap
doesn't check type
SourceForge.net
noreply at sourceforge.net
Mon Nov 6 22:31:05 PST 2006
Bugs item #1591819, was opened at 2006-11-07 08:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1591819&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxPython specific
Group: Trivial
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jaakko Salli (jmsalli)
Assigned to: Robin Dunn (robind)
Summary: Python sequence-to-wxArrayInt typemap doesn't check type
Initial Comment:
It appears that the Python sequence-to-wxArrayInt
typemap doesn't do sufficient type checking for the
actual items of the sequence.
Adding code like this at line 245 in my_typemaps.i,
right after "PyObject* number = PyNumber_Int(item);",
should fix it:
if (!number) {
PyErr_SetString(PyExc_TypeError, "Sequence
of integers expected.");
SWIG_fail;
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1591819&group_id=9863
More information about the wx-dev
mailing list