]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_defs.i
Since the wxPyMake_wxObject typemap is also used for constructors we
[wxWidgets.git] / wxPython / src / _defs.i
index 77d040b614ee8e717d4f4acb88d8a1740dddd7f2..83d95ba39f2e0041dba02ea057a8c6a8b33ae406 100644 (file)
 // This one can be used to add a check for an existing wxApp before the real
 // work is done.  An exception is raised if there isn't one.
 %define MustHaveApp(name)
-    %exception name {
-        if (!wxPyCheckForApp()) SWIG_fail;
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        $action
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
-    }
+%exception name {
+    if (!wxPyCheckForApp()) SWIG_fail;
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    $action
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) SWIG_fail;
+}
 %enddef