]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp
Detect Apple bug that prevents the joystick code compiling for OS X 10.1
[wxWidgets.git] / wxPython / contrib / gizmos / gtk / gizmos_wrap.cpp
index 479d99f76438d762114fdb13fd3fcdb84834a7cc..8a54bffbe560b188d222137df3815608ed58172c 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);
         }
     }
     {