]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/grid_wrap.cpp
Get/SetTitle only for wxTopLevelWindow (wxMGL part).
[wxWidgets.git] / wxPython / src / mac / grid_wrap.cpp
index e38ab821c29e5490ab4a0f13d0652a460fad0355..166d5bd5aa3d7cc1c532c42230f8559099ef50bb 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;
       }
     }   
@@ -10493,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);
         }
     }
     {