summaryrefslogtreecommitdiff
path: root/Examples/test-suite/java_throws.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2018-05-05 11:45:44 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2018-05-06 09:46:37 +0100
commit196a965067ff677ad109ab84320e1a7aa69c77d1 (patch)
tree0acf82bdb24a525c72a5adb58f49e053d3533482 /Examples/test-suite/java_throws.i
parent1c46662c39e5ed7c28473663728cce5264885d34 (diff)
downloadswig-196a965067ff677ad109ab84320e1a7aa69c77d1.tar.gz
test-suite fixes for compilers that don't support vararg macros
Split TESTCASE_THROW into multiple macros taking different number of arguments. Fixes Visual Studio compiler errors.
Diffstat (limited to 'Examples/test-suite/java_throws.i')
-rw-r--r--Examples/test-suite/java_throws.i6
1 files changed, 3 insertions, 3 deletions
diff --git a/Examples/test-suite/java_throws.i b/Examples/test-suite/java_throws.i
index 2e4d5c2ab..5dc353b6d 100644
--- a/Examples/test-suite/java_throws.i
+++ b/Examples/test-suite/java_throws.i
@@ -3,9 +3,9 @@
%module java_throws
// throw is invalid in C++17 and later, only SWIG to use it
-#define TESTCASE_THROW(TYPES...) throw(TYPES)
+#define TESTCASE_THROW1(T1) throw(T1)
%{
-#define TESTCASE_THROW(TYPES...)
+#define TESTCASE_THROW1(T1)
%}
// Exceptions are chosen at random but are ones which have to have a try catch block to compile
@@ -45,7 +45,7 @@ short full_of_exceptions(int num) {
return $null;
}
%inline %{
-bool throw_spec_function(int value) TESTCASE_THROW(int) { throw (int)0; }
+bool throw_spec_function(int value) TESTCASE_THROW1(int) { throw (int)0; }
%}
%catches(int) catches_function(int value);