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:
parent
c563916ddb
commit
b5fa5ee26f
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
// 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) {
|
if ($1 < 0) {
|
||||||
SWIG_exception(SWIG_IndexError, "testing SWIG_exception macro");
|
SWIG_exception(SWIG_IndexError, "testing SWIG_exception macro");
|
||||||
return $null;
|
|
||||||
}
|
}
|
||||||
%}
|
}
|
||||||
%inline %{
|
%inline %{
|
||||||
bool exception_macro_run_flag = false;
|
bool exception_macro_run_flag = false;
|
||||||
void exceptionmacrotest(int macrotest) {
|
void exceptionmacrotest(int macrotest) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue