Don't use catch...throw in C mode.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8427 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fdd0088a30
commit
117037584f
1 changed files with 8 additions and 5 deletions
|
|
@ -2479,7 +2479,8 @@ int ALLEGROCL :: functionWrapper(Node *n) {
|
||||||
// Emit the function definition
|
// Emit the function definition
|
||||||
String *signature = SwigType_str(return_type, name_and_parms);
|
String *signature = SwigType_str(return_type, name_and_parms);
|
||||||
Printf(wrap->def, "EXPORT %s {", signature);
|
Printf(wrap->def, "EXPORT %s {", signature);
|
||||||
Printf(wrap->code," try {\n");
|
if (CPlusPlus)
|
||||||
|
Printf(wrap->code," try {\n");
|
||||||
emit_action(n, wrap);
|
emit_action(n, wrap);
|
||||||
if (!is_void_return)
|
if (!is_void_return)
|
||||||
{
|
{
|
||||||
|
|
@ -2489,10 +2490,12 @@ int ALLEGROCL :: functionWrapper(Node *n) {
|
||||||
Printf(wrap->code, " return lresult;\n");
|
Printf(wrap->code, " return lresult;\n");
|
||||||
Delete(result_convert);
|
Delete(result_convert);
|
||||||
}
|
}
|
||||||
Printf(wrap->code," } catch (...) {\n");
|
if (CPlusPlus) {
|
||||||
if (!is_void_return)
|
Printf(wrap->code," } catch (...) {\n");
|
||||||
Printf(wrap->code," return (%s)0;\n", raw_return_type);
|
if (!is_void_return)
|
||||||
Printf(wrap->code," }\n");
|
Printf(wrap->code," return (%s)0;\n", raw_return_type);
|
||||||
|
Printf(wrap->code," }\n");
|
||||||
|
}
|
||||||
Printf(wrap->code,"}\n");
|
Printf(wrap->code,"}\n");
|
||||||
|
|
||||||
/* print this when in C mode? make this a command-line arg? */
|
/* print this when in C mode? make this a command-line arg? */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue