From: Robin Dunn Date: Tue, 16 Apr 2002 21:31:57 +0000 (+0000) Subject: Use the OOR typemap for wxTreeCtrls too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9398120d298d745763f253d87d774be3b134b43f?hp=50b30d837b469539fb6fb93d076d6ee42dd338e6 Use the OOR typemap for wxTreeCtrls too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 1a3105755e..c93d7be842 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -10508,7 +10508,6 @@ static PyObject *_wrap_wxGenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *ar wxGenericDirCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetTreeCtrl",_kwnames,&_argo0)) @@ -10526,13 +10525,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *ar wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index 7f39893d1b..a972112caa 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -1232,7 +1232,6 @@ class wxGenericDirCtrlPtr(wxControlPtr): return val def GetTreeCtrl(self, *_args, **_kwargs): val = apply(controls2c.wxGenericDirCtrl_GetTreeCtrl,(self,) + _args, _kwargs) - if val: val = wxTreeCtrlPtr(val) return val def GetFilterListCtrl(self, *_args, **_kwargs): val = apply(controls2c.wxGenericDirCtrl_GetFilterListCtrl,(self,) + _args, _kwargs) diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index cd202b68fd..d32602247b 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -396,6 +396,7 @@ $function %typemap(python, out) wxTextCtrl* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxToolBar* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxToolBarBase* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxTreeCtrl* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxWindow* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxHtmlWindow* { $target = wxPyMake_wxObject($source); }