]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_gdi_wrap.cpp
trying to make GetData() return data format more clear
[wxWidgets.git] / wxPython / src / msw / _gdi_wrap.cpp
index e3c13b0177b57cdc9a12890c0f6dc78c7725faf5..5c92db055ab6e28aa11f27fe558fe220010aa710 100644 (file)
@@ -621,11 +621,12 @@ SWIG_Check_int(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -635,7 +636,7 @@ SWIG_Check_int(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 PyObject *wxPen_GetDashes(wxPen *self){