From d68a6b6dbb22b3fdada89182f4c2ab40962d3490 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 7 May 2004 21:34:14 +0000 Subject: [PATCH] Don't use deprecated list methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/ogl/ogl.i | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index f821f35b9c..8ac8c73b46 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -256,22 +256,23 @@ PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { //--------------------------------------------------------------------------- -PyObject* wxPy_ConvertRealPointList(wxListBase* list) { - PyObject* pyList; - PyObject* pyObj; - wxObject* wxObj; - wxNode* node = list->GetFirst(); - - bool blocked = wxPyBeginBlockThreads(); - pyList = PyList_New(0); - while (node) { - wxObj = node->GetData(); - pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0); - PyList_Append(pyList, pyObj); - node = node->GetNext(); - } - wxPyEndBlockThreads(blocked); - return pyList; +PyObject* wxPy_ConvertRealPointList(wxListBase* listbase) { + wxList* list = (wxList*)listbase; + PyObject* pyList; + PyObject* pyObj; + wxObject* wxObj; + wxNode* node = list->GetFirst(); + + bool blocked = wxPyBeginBlockThreads(); + pyList = PyList_New(0); + while (node) { + wxObj = node->GetData(); + pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0); + PyList_Append(pyList, pyObj); + node = node->GetNext(); + } + wxPyEndBlockThreads(blocked); + return pyList; } //---------------------------------------------------------------------------