summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2013-10-17 21:54:58 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2014-02-08 14:52:57 +0000
commit122f61cb0bcedb15db0612f9519de4d396f75efc (patch)
tree140695e18fe903738e4b5ba7abb8ec190529696e
parent5602a61bb6fa2b6de419c251fceb2e5cd499893d (diff)
downloadswig-122f61cb0bcedb15db0612f9519de4d396f75efc.tar.gz
Fix Visual Studio compile error in C++ wrappers due to #include <exception> within extern "C" block.
Fixes SF #1340
-rw-r--r--CHANGES.current4
-rw-r--r--Lib/r/rrun.swg2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES.current b/CHANGES.current
index bde32009e..0507350cd 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -6,6 +6,10 @@ Version 2.0.12 (9 Feb 2014)
===========================
2013-10-17: wsfulton
+ [R] Fix SF #1340 - Visual Studio compile error in C++ wrappers due to #include <exception>
+ within extern "C" block.
+
+2013-10-17: wsfulton
[Python] Fix SF #1345 - Missing #include <stddef.h> for offsetof when using -builtin.
2013-10-12: wsfulton
diff --git a/Lib/r/rrun.swg b/Lib/r/rrun.swg
index f8bc9f497..990443e23 100644
--- a/Lib/r/rrun.swg
+++ b/Lib/r/rrun.swg
@@ -1,5 +1,6 @@
#ifdef __cplusplus
+#include <exception>
extern "C" {
#endif
@@ -369,7 +370,6 @@ SWIG_R_ConvertPacked(SEXP obj, void *ptr, size_t sz, swig_type_info *ty) {
}
#ifdef __cplusplus
-#include <exception>
#define SWIG_exception_noreturn(code, msg) do { throw std::runtime_error(msg); } while(0)
#else
#define SWIG_exception_noreturn(code, msg) do { return result; } while(0)