From: Robin Dunn Date: Fri, 6 Feb 2004 22:15:00 +0000 (+0000) Subject: Fix wxArrayString and wxArrayInt typemaps so they can be used with X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c2e6d97098e4483b63d0bb3f986dd38311cc9588 Fix wxArrayString and wxArrayInt typemaps so they can be used with default args. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index cb5ae174e5..1a7634c1f3 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -159,12 +159,13 @@ //--------------------------------------------------------------------------- // Typemap for wxArrayString from Python sequence objects -%typemap(in) wxArrayString& { +%typemap(in) wxArrayString& (bool temp=False) { if (! PySequence_Check($input)) { PyErr_SetString(PyExc_TypeError, "Sequence of strings expected."); SWIG_fail; } $1 = new wxArrayString; + temp = True; int i, len=PySequence_Length($input); for (i=0; i