summaryrefslogtreecommitdiff
path: root/Lib/exception.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2005-07-22 21:27:33 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2005-07-22 21:27:33 +0000
commit1abc5c131b53e010c74af8b7c0487d67fee0b540 (patch)
tree4b5d1a4d3febf3e19efd74e4d1f36b60dc1548ed /Lib/exception.i
parent0ecab92aaf816d4d40b34d0a462ac62575ab97c0 (diff)
downloadswig-1abc5c131b53e010c74af8b7c0487d67fee0b540.tar.gz
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
Diffstat (limited to 'Lib/exception.i')
-rw-r--r--Lib/exception.i16
1 files changed, 14 insertions, 2 deletions
diff --git a/Lib/exception.i b/Lib/exception.i
index c86e1acb6..15c93b599 100644
--- a/Lib/exception.i
+++ b/Lib/exception.i
@@ -188,8 +188,14 @@ SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *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
#ifdef SWIGOCAML
@@ -302,8 +308,14 @@ SWIGINTERN void SWIG_CSharpException(int code, const char *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
#ifdef __cplusplus