SWIG_exception mods

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7344 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-07-22 21:42:00 +00:00
commit b5fa5ee26f

View file

@ -143,12 +143,11 @@ unsigned short ushorttest() { return 100; }
%}
// test SWIG_exception macro - it must return from unmanaged code without executing any further unmanaged code
%typemap(check, canthrow=1) int macrotest %{
%typemap(check, canthrow=1) int macrotest {
if ($1 < 0) {
SWIG_exception(SWIG_IndexError, "testing SWIG_exception macro");
return $null;
}
%}
}
%inline %{
bool exception_macro_run_flag = false;
void exceptionmacrotest(int macrotest) {