]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglbasic.i
removed som obsolete TODO comments
[wxWidgets.git] / wxPython / contrib / ogl / oglbasic.i
index 7e982eeb31f768da0b22557bc411c04897dd1d95..c1f6c8301468344739409936a7f06c4a121e4f2a 100644 (file)
@@ -240,25 +240,17 @@ public:
 
     // void SetClientData(wxObject *client_data);
     // wxObject *GetClientData();
-    %addmethods {
-        void SetClientData(PyObject* userData) {
-            wxPyUserData* data = NULL;
-            if (userData)
-                data = new wxPyUserData(userData);
-            self->SetClientData(data);
-        }
 
-        PyObject* GetClientData() {
-            wxPyUserData* data = (wxPyUserData*)self->GetClientData();
-            if (data) {
-                Py_INCREF(data->m_obj);
-                return data->m_obj;
-            } else {
-                Py_INCREF(Py_None);
-                return Py_None;
-            }
-        }
-    }
+    // The real client data methods are being used for OOR, so just fake it.
+    %pragma(python) addtoclass = "
+    def SetClientData(self, data):
+        self.clientData = data
+    def GetClientData(self):
+        if hasattr(self, 'clientData'):
+            return self.clientData
+        else:
+            return None
+"
 
     void Show(bool show);
     bool IsShown();