X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/080b9cbc7f4d99ebea373624e7aa3ae7f6a79443..fdcbb1ce012dbad3a1dd4734fd0323efe7f5154a:/wxPython/src/_defs.i diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 1ceba2c622..8828de9826 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -68,8 +68,16 @@ } %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