]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed GetFirstChild/GetNextChild to make a copy of the wxTreeItemId
authorRobin Dunn <robin@alldunn.com>
Tue, 30 Mar 2004 01:51:36 +0000 (01:51 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 30 Mar 2004 01:51:36 +0000 (01:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/gizmos/gizmos.i

index 34bcf29c82e3e0b74b2817a6b7801bdf3aeddb28..89463e7978a4e2fa93cd7c6562a5cc0ee239d090 100644 (file)
@@ -748,10 +748,10 @@ public:
         // order to continue the search.
         PyObject* GetFirstChild(const wxTreeItemId& item) {
             long cookie = 0;
-            wxTreeItemId ritem = self->GetFirstChild(item, cookie);
+            wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
             bool blocked = wxPyBeginBlockThreads();
             PyObject* tup = PyTuple_New(2);
-            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), true));
+            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
             PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
             wxPyEndBlockThreads(blocked);
             return tup;
@@ -763,10 +763,10 @@ public:
         // Returns a wxTreeItemId and an opaque "cookie" value that should be
         // passed to GetNextChild in order to continue the search.
         PyObject* GetNextChild(const wxTreeItemId& item, long cookie) {
-            wxTreeItemId ritem = self->GetNextChild(item, cookie);
+            wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
             bool blocked = wxPyBeginBlockThreads();
             PyObject* tup = PyTuple_New(2);
-            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), true));
+            PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
             PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
             wxPyEndBlockThreads(blocked);
             return tup;