]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/msw/gizmos_wrap.cpp
'[1219035] cleanup: miscellaneous' and minor source cleaning.
[wxWidgets.git] / wxPython / contrib / gizmos / msw / gizmos_wrap.cpp
index c2af961191bd1c456de518ac4eecb3d282f18fcf..6295dc59aa58fd2bde3ec5e7b87a3354a67aa683 100644 (file)
@@ -2522,15 +2522,11 @@ static PyObject *_wrap_EditableListBox_SetStrings(PyObject *, PyObject *args, Py
         int i, len=PySequence_Length(obj1);
         for (i=0; i<len; i++) {
             PyObject* item = PySequence_GetItem(obj1, i);
-#if wxUSE_UNICODE
-            PyObject* str  = PyObject_Unicode(item);
-#else
-            PyObject* str  = PyObject_Str(item);
-#endif
+            wxString* s = wxString_in_helper(item);
             if (PyErr_Occurred())  SWIG_fail;
-            arg2->Add(Py2wxString(str));
+            arg2->Add(*s);
+            delete s;
             Py_DECREF(item);
-            Py_DECREF(str);
         }
     }
     {