C# and Java SWIG_exception changes. Previous mods didn't work with compilers that can't handle empty macro parameters. Now SWIG_exception will only work in typemaps using {} delimeters.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7342 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0ecab92aaf
commit
1abc5c131b
1 changed files with 14 additions and 2 deletions
|
|
@ -188,8 +188,14 @@ SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
|
||||||
}
|
}
|
||||||
SWIG_JavaThrowException(jenv, exception_code, msg);
|
SWIG_JavaThrowException(jenv, exception_code, msg);
|
||||||
}
|
}
|
||||||
#define SWIG_exception(nullreturn, code, msg) { SWIG_JavaException(jenv, code, msg); return nullreturn; }
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%define SWIG_exception(code, msg)
|
||||||
|
{
|
||||||
|
SWIG_JavaException(jenv, code, msg);
|
||||||
|
return $null;
|
||||||
|
}
|
||||||
|
%enddef
|
||||||
#endif // SWIGJAVA
|
#endif // SWIGJAVA
|
||||||
|
|
||||||
#ifdef SWIGOCAML
|
#ifdef SWIGOCAML
|
||||||
|
|
@ -302,8 +308,14 @@ SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
|
||||||
SWIG_CSharpSetPendingException(exception_code, msg);
|
SWIG_CSharpSetPendingException(exception_code, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define SWIG_exception(nullreturn, code, msg) { SWIG_CSharpException(code, msg); return nullreturn; }
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%define SWIG_exception(code, msg)
|
||||||
|
{
|
||||||
|
SWIG_CSharpException(code, msg);
|
||||||
|
return $null;
|
||||||
|
}
|
||||||
|
%enddef
|
||||||
#endif // SWIGCSHARP
|
#endif // SWIGCSHARP
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue