]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed OOR related problem in OGL
authorRobin Dunn <robin@alldunn.com>
Fri, 18 May 2001 06:53:25 +0000 (06:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 18 May 2001 06:53:25 +0000 (06:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/ogl/ogl.cpp
wxPython/contrib/ogl/ogl.i
wxPython/demo/wxOGL.py
wxPython/src/libpy.c
wxPython/src/wxp.ico

index b6b50f6325fd436922ebe734dc4426cfd72f86c5..3b12bbd6f43ff3b25a8721562d816f032c601b41 100644 (file)
@@ -915,6 +915,21 @@ SWIGEXPORT(void) initoglc() {
     wxClassInfo::CleanUpClasses();
     wxClassInfo::InitializeClasses();
 
+    wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint");
+    wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas");
+    wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler");
+    wxPyPtrTypeMap_Add("wxShape", "wxPyShape");
+    wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape");
+    wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape");
+    wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape");
+    wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape");
+    wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape");
+    wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape");
+    wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape");
+    wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape");
+    wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape");
+    wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape");
+
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)
index 8af76dd0edb9054dc0444983649cf000054f7816..cf221345be965d2500dbfcd4fda718e3d7c89c94 100644 (file)
@@ -250,6 +250,21 @@ extern "C" SWIGEXPORT(void) initoglcanvasc();
     wxClassInfo::CleanUpClasses();
     wxClassInfo::InitializeClasses();
 
+    wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint");
+    wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas");
+    wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler");
+    wxPyPtrTypeMap_Add("wxShape", "wxPyShape");
+    wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape");
+    wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape");
+    wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape");
+    wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape");
+    wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape");
+    wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape");
+    wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape");
+    wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape");
+    wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape");
+    wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape");
+
 %}
 
 //----------------------------------------------------------------------
index 63501224ae3e821926fa7ec5a5d8cb4c22d5dc3a..a13bee893a23472682d7dbcd7aedbe77094d1461 100644 (file)
@@ -193,6 +193,7 @@ class TestWindow(wxShapeCanvas):
             if shape.GetParent() == None:
                 shape.SetCanvas(None)
                 shape.Destroy()
+        self.diagram.Destroy()
 
 
 #----------------------------------------------------------------------
index 450467bd13c2bca64a8092bc7a8e16b21e64f487..7e400062a839584cd8fca2ec59e730fa6af70cde 100644 (file)
@@ -317,11 +317,11 @@ SWIG_GetPtr(char *c, void **ptr, char *t)
   if (*c != '_') {
     *ptr = (void *) 0;
     if (strcmp(c,"NULL") == 0) return (char *) 0;
-    else c;
+    else return c;
   }
   c++;
   /* Extract hex value from pointer */
-  while (d = *c) {
+  while ((d = *c) != 0) {
     if ((d >= '0') && (d <= '9'))
       p = (p << 4) + (d - '0');
     else if ((d >= 'a') && (d <= 'f'))
index 60fc2b318bf259e2a6528f9e498683807ba7e941..7c8a4a5d030e2cb343de365183c46ec682064cfb 100644 (file)
Binary files a/wxPython/src/wxp.ico and b/wxPython/src/wxp.ico differ