From 0a4c104f50a4fc5d9b8f5130fc84adceee7f8fa8 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 6 Dec 2005 23:11:28 +0000 Subject: [PATCH] avoid extra block git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7935 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/python.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index cc0cb5971..1e8615a36 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -1543,8 +1543,10 @@ public: Printf(f->code, "try {\n"); Printf(f->code, " Swig::UnknownExceptionHandler dh;\n"); } else { - Printf(f->code, "{\n"); - if (allow_thread) thread_begin_allow(n, f); + if (allow_thread) { + Printf(f->code, "{\n"); + thread_begin_allow(n, f); + } } emit_action(n,f); @@ -1554,8 +1556,10 @@ public: Printf(f->code, " SWIG_fail;\n"); Printf(f->code, "}\n"); } else { - if (allow_thread) thread_end_allow(n, f); - Printf(f->code, "}\n"); + if (allow_thread) { + thread_end_allow(n, f); + Printf(f->code, "}\n"); + } }