From 1abc5c131b53e010c74af8b7c0487d67fee0b540 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 22 Jul 2005 21:27:33 +0000 Subject: [PATCH] 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 --- Lib/exception.i | 16 ++++++++++++++-- 1 file 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