Contract assert macro added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5337 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ccb09ea355
commit
329bd4f1c4
1 changed files with 4 additions and 0 deletions
|
|
@ -88,4 +88,8 @@ void SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const c
|
|||
}
|
||||
%insert(runtime) %{
|
||||
#endif
|
||||
|
||||
/* Contract support */
|
||||
|
||||
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue