]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/mac/gizmos_wrap.cpp
Typo correction patch [ 1208110 ] Lots of typo corrections
[wxWidgets.git] / wxPython / contrib / gizmos / mac / gizmos_wrap.cpp
index 53fb2803fa31b22620d3760e5555c969a984b1f7..6dee7f65c6217bc0135a38f114892c84d1e48ced 100644 (file)
@@ -1037,7 +1037,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
                       type, otype);
        }
-       Py_DECREF(str);
+       if (str)
+          Py_DECREF(str);
        return;
       }
     }   
@@ -2521,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);
         }
     }
     {