Allow the OOR reference to be saved without doing an INCREF. This

solves the circular reference problem with wx.Timer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-12-20 22:50:29 +00:00
parent 56a52e9094
commit 94fd5e4dc1
6 changed files with 65 additions and 28 deletions

View File

@@ -73,9 +73,9 @@ public:
}
%extend {
void _setOORInfo(PyObject* _self) {
void _setOORInfo(PyObject* _self, bool incref=true) {
if (_self && _self != Py_None) {
self->SetClientObject(new wxPyOORClientData(_self));
self->SetClientObject(new wxPyOORClientData(_self, incref));
}
else {
wxPyOORClientData* data = (wxPyOORClientData*)self->GetClientObject();