]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/libpy.c
Implemented wxGetClientDisplayRect which returns the dimensions of the
[wxWidgets.git] / wxPython / src / libpy.c
index 7f05d84e59c56ff00f2a0b343e9b20e8a4736d26..d8d22da4f4e365939bac9385bba91c0b279167fe 100644 (file)
@@ -405,13 +405,32 @@ SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type) {
   if (!PyString_Check(obj)) {
       if (!PyInstance_Check(obj) || !(sobj = PyObject_GetAttrString(obj,"this")))
           return "";
+      // PyObject_GetAttrString increases sobj refcout !
+      Py_DECREF(sobj);
   }
   str = PyString_AsString(sobj);
   return SWIG_GetPtr(str,ptr,type);
 }
 
+
 #ifdef __cplusplus
 }
 #endif
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+