]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_gdi_wrap.cpp
wxTreeItemId, -1->wxID_ANY, TRUE->true and FALSE->false replacements.
[wxWidgets.git] / wxPython / src / mac / _gdi_wrap.cpp
index 9047f5ead4768d4e8efe750d62c87baf185b35bd..58491b342b775d82db0adab2cfa619e015bdd4c8 100644 (file)
@@ -535,8 +535,11 @@ PyObject *wxPen_GetDashes(wxPen *self){
             int count = self->GetDashes(&dashes);
             bool blocked = wxPyBeginBlockThreads();
             PyObject* retval = PyList_New(0);
-            for (int x=0; x<count; x++)
-                PyList_Append(retval, PyInt_FromLong(dashes[x]));
+            for (int x=0; x<count; x++) {
+                PyObject* pyint = PyInt_FromLong(dashes[x]);
+                PyList_Append(retval, pyint);
+                Py_DECREF(pyint);
+            }
             wxPyEndBlockThreads(blocked);
             return retval;
         }