]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/ogl.i
Fix unintialized pointer in wxCommandProcessor when
[wxWidgets.git] / wxPython / contrib / ogl / ogl.i
index dfa1a664a29c7dadd325b65250a2816cce63d936..3a226865f21a4ab98fb3d19538987eb1bde1c68b 100644 (file)
@@ -14,7 +14,7 @@
 %module ogl
 
 %{
-#include "export.h"
+#include "wxPython.h"
 #include "oglhelpers.h"
 %}
 
@@ -235,6 +235,26 @@ PyObject*  wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
     return target;
 }
 
+//---------------------------------------------------------------------------
+
+PyObject* wxPy_ConvertShapeList(wxListBase* listbase, const char* className) {
+    wxList*     list = (wxList*)listbase;
+    PyObject*   pyList;
+    PyObject*   pyObj;
+    wxObject*   wxObj;
+    wxNode*     node = list->GetFirst();
+
+    wxPyBeginBlockThreads();
+    pyList = PyList_New(0);
+    while (node) {
+        wxObj = node->GetData();
+        pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
+        PyList_Append(pyList, pyObj);
+        node = node->GetNext();
+    }
+    wxPyEndBlockThreads();
+    return pyList;
+}
 
 
 //---------------------------------------------------------------------------