avoid extra block

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7935 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-06 23:11:28 +00:00
commit 0a4c104f50

View file

@ -1543,8 +1543,10 @@ public:
Printf(f->code, "try {\n"); Printf(f->code, "try {\n");
Printf(f->code, " Swig::UnknownExceptionHandler dh;\n"); Printf(f->code, " Swig::UnknownExceptionHandler dh;\n");
} else { } else {
if (allow_thread) {
Printf(f->code, "{\n"); Printf(f->code, "{\n");
if (allow_thread) thread_begin_allow(n, f); thread_begin_allow(n, f);
}
} }
emit_action(n,f); emit_action(n,f);
@ -1554,9 +1556,11 @@ public:
Printf(f->code, " SWIG_fail;\n"); Printf(f->code, " SWIG_fail;\n");
Printf(f->code, "}\n"); Printf(f->code, "}\n");
} else { } else {
if (allow_thread) thread_end_allow(n, f); if (allow_thread) {
thread_end_allow(n, f);
Printf(f->code, "}\n"); Printf(f->code, "}\n");
} }
}