]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/xrc_wrap.cpp
'[1219035] cleanup: miscellaneous' and minor source cleaning.
[wxWidgets.git] / wxPython / src / mac / xrc_wrap.cpp
index 7cc5dc93659dd3fab3162dbf37d0de76d606644b..c5e5990b95c57cb04e8c76414b1415a4e1ef91ce 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);
        }
          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
                       type, otype);
        }
-       Py_DECREF(str);
+       if (str)
+          Py_DECREF(str);
        return;
       }
     }   
        return;
       }
     }   
@@ -4527,7 +4528,7 @@ static PyObject *_wrap_new_XmlDocumentFromStream(PyObject *, PyObject *args, PyO
             PyErr_Clear();  // clear the failure of the wxPyConvert above
             arg1 = wxPyCBInputStream_create(obj0, false);
             if (arg1 == NULL) {
             PyErr_Clear();  // clear the failure of the wxPyConvert above
             arg1 = wxPyCBInputStream_create(obj0, false);
             if (arg1 == NULL) {
-                PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
+                PyErr_SetString(PyExc_TypeError, "Expected wx.InputStream or Python file-like object.");
                 SWIG_fail;
             }
             created1 = true;
                 SWIG_fail;
             }
             created1 = true;
@@ -4549,8 +4550,7 @@ static PyObject *_wrap_new_XmlDocumentFromStream(PyObject *, PyObject *args, PyO
     }
     resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxXmlDocument, 1);
     {
     }
     resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxXmlDocument, 1);
     {
-        if (created1)
-        delete arg1;
+        if (created1) delete arg1; 
     }
     {
         if (temp2)
     }
     {
         if (temp2)
@@ -4559,8 +4559,7 @@ static PyObject *_wrap_new_XmlDocumentFromStream(PyObject *, PyObject *args, PyO
     return resultobj;
     fail:
     {
     return resultobj;
     fail:
     {
-        if (created1)
-        delete arg1;
+        if (created1) delete arg1; 
     }
     {
         if (temp2)
     }
     {
         if (temp2)
@@ -4708,7 +4707,7 @@ static PyObject *_wrap_XmlDocument_LoadFromStream(PyObject *, PyObject *args, Py
             PyErr_Clear();  // clear the failure of the wxPyConvert above
             arg2 = wxPyCBInputStream_create(obj1, false);
             if (arg2 == NULL) {
             PyErr_Clear();  // clear the failure of the wxPyConvert above
             arg2 = wxPyCBInputStream_create(obj1, false);
             if (arg2 == NULL) {
-                PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
+                PyErr_SetString(PyExc_TypeError, "Expected wx.InputStream or Python file-like object.");
                 SWIG_fail;
             }
             created2 = true;
                 SWIG_fail;
             }
             created2 = true;
@@ -4732,8 +4731,7 @@ static PyObject *_wrap_XmlDocument_LoadFromStream(PyObject *, PyObject *args, Py
         resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
     }
     {
         resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
     }
     {
-        if (created2)
-        delete arg2;
+        if (created2) delete arg2; 
     }
     {
         if (temp3)
     }
     {
         if (temp3)
@@ -4742,8 +4740,7 @@ static PyObject *_wrap_XmlDocument_LoadFromStream(PyObject *, PyObject *args, Py
     return resultobj;
     fail:
     {
     return resultobj;
     fail:
     {
-        if (created2)
-        delete arg2;
+        if (created2) delete arg2; 
     }
     {
         if (temp3)
     }
     {
         if (temp3)