]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/modules/ogl/oglhelpers.cpp
Moved wxPy_ConvertList function from oglhelpers to helpers
[wxWidgets.git] / utils / wxPython / modules / ogl / oglhelpers.cpp
index 6b6e7b17b9e1300ded77f5f2f9df8340230ae8be..ab2152276a0729cc152ab8a928f9b1ded81855bd 100644 (file)
@@ -92,42 +92,10 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
 
 
 //---------------------------------------------------------------------------
-// Convert a wxList to a Python List
 
-#include <ogl.h>
 
-PyObject* wxPy_ConvertList(wxList* list, char* className) {
-    PyObject*   pyList;
-    PyObject*   pyObj;
-    wxObject*   wxObj;
-    wxNode*     node = list->First();
 
-    bool doSave = wxPyRestoreThread();
-    pyList = PyList_New(0);
-    while (node) {
-        wxObj = node->Data();
-//        printf("%s class at %x : %x\n", wxObj->GetClassInfo()->GetClassName(), (void*)wxObj, (void*)((wxShape*)wxObj)->GetParent());
-        pyObj = wxPyConstructObject(wxObj, className);
-        PyList_Append(pyList, pyObj);
-        node = node->Next();
-    }
-//      for (int x=0; x<PyList_Size(pyList); x++) {
-//          PyObject* obj = PyList_GetItem(pyList, x);
-//          char* attr = PyString_AsString(PyObject_GetAttrString(obj, "this"));
-//          PyObject* par = PyObject_CallMethod(obj, "GetParent", NULL);
-//          char* parent;
-//          if (par != Py_None)
-//              parent = PyString_AsString(PyObject_GetAttrString(par, "this"));
-//          else
-//              parent = "None";
-//          printf("obj.this = %s  obj.GetParent().this = %s\n", attr, parent);
-//      }
-//    printf("--------\n");
-    wxPySaveThread(doSave);
-    return pyList;
-}
 
-//---------------------------------------------------------------------------