]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/grid_wrap.cpp
'[1219035] cleanup: miscellaneous' and minor source cleaning.
[wxWidgets.git] / wxPython / src / msw / grid_wrap.cpp
index 8e03991bad88a9780686780dbad38b697d83b8a1..6b421421037ecbdc316803b288c1e71be9d2e582 100644 (file)
@@ -10494,15 +10494,11 @@ static PyObject *_wrap_Grid_GetTextBoxSize(PyObject *, PyObject *args, PyObject
         int i, len=PySequence_Length(obj2);
         for (i=0; i<len; i++) {
             PyObject* item = PySequence_GetItem(obj2, 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;
-            arg3->Add(Py2wxString(str));
+            arg3->Add(*s);
+            delete s;
             Py_DECREF(item);
-            Py_DECREF(str);
         }
     }
     {