]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_defs.i
Minor tweaks to bring up to date with CVS changes
[wxWidgets.git] / wxPython / src / _defs.i
index 1ceba2c622e99cf617026f990f35a10738bacf51..8828de982687adfbe95e4804d5d38ed2e9378294 100644 (file)
 }
 %enddef
 
-    
 
+// This macro can be used to disable the releasing of the GIL when calling the
+// C++ function.
+%define KeepGIL(name)
+%exception name {
+    $action
+    if (PyErr_Occurred()) SWIG_fail;
+}
+%enddef
+        
 //---------------------------------------------------------------------------
 // some type definitions to simplify things for SWIG
 
@@ -104,6 +112,8 @@ typedef unsigned long   wxUIntPtr;
 #define %disownarg(typespec)   %typemap(in) typespec = SWIGTYPE* DISOWN
 #define %cleardisown(typespec) %typemap(in) typespec
     
+#define %ref   %feature("ref")
+#define %unref %feature("unref")
 
 
 #ifndef %pythoncode