]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/cmndlgs.cpp
fixed the last of the off-by-one errors (some are refixed, again...)
[wxWidgets.git] / wxPython / src / gtk / cmndlgs.cpp
index 1bb34a9cd0b11c5033e97446319791f4bc65b2ef..5aacee406045abded3caf4af949c09d22875aee0 100644 (file)
@@ -207,18 +207,12 @@ static PyObject *_wrap_wxColourData_GetColour(PyObject *self, PyObject *args, Py
     }
 {
     wxPy_BEGIN_ALLOW_THREADS;
-        wxColour & _result_ref = wxColourData_GetColour(_arg0);
-    _result = (wxColour *) &_result_ref;
+        _result = new wxColour (wxColourData_GetColour(_arg0));
 
     wxPy_END_ALLOW_THREADS;
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}    SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
+    _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }
 
@@ -2171,18 +2165,12 @@ static PyObject *_wrap_wxFontData_GetColour(PyObject *self, PyObject *args, PyOb
     }
 {
     wxPy_BEGIN_ALLOW_THREADS;
-        wxColour & _result_ref = wxFontData_GetColour(_arg0);
-    _result = (wxColour *) &_result_ref;
+        _result = new wxColour (wxFontData_GetColour(_arg0));
 
     wxPy_END_ALLOW_THREADS;
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}    SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
+    _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }