X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bad23bc76a20a53c3abb0932aa783eebbd22da6..3a9becbd5439254a77e7dbc0278d80117a397264:/wxPython/src/my_typemaps.i diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index 19d2fe76f0..c22b3ae7ef 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -124,6 +124,11 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field) +%typemap(out) wxCharBuffer { + $result = PyString_FromString((char*)$1.data()); +} + + //--------------------------------------------------------------------------- // Typemaps to convert Python sequence objects (tuples, etc.) to // wxSize, wxPoint, wxRealPoint, and wxRect. @@ -201,15 +206,11 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field) int i, len=PySequence_Length($input); for (i=0; iAdd(Py2wxString(str)); + $1->Add(*s); + delete s; Py_DECREF(item); - Py_DECREF(str); } } @@ -369,7 +370,7 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field) %typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); } %typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); } -%typemap(out) wxSizer* { $result = wxPyMake_wxSizer($1, $owner); } +%typemap(out) wxSizer* { $result = wxPyMake_wxObject($1, $owner); } //---------------------------------------------------------------------------