%newgroup
+MustHaveApp(wxPen);
+
class wxPen : public wxGDIObject {
public:
wxPen(wxColour& colour, int width=1, int style=wxSOLID);
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;
}
%extend {
- bool __eq__(const wxPen* other) { return other ? (*self == *other) : False; }
- bool __ne__(const wxPen* other) { return other ? (*self != *other) : True; }
+ bool __eq__(const wxPen* other) { return other ? (*self == *other) : false; }
+ bool __ne__(const wxPen* other) { return other ? (*self != *other) : true; }
}
%pythoncode { def __nonzero__(self): return self.Ok() }
};