[Rcpp-commits] r1076 - pkg/Rcpp/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 18 23:36:45 CEST 2010


Author: romain
Date: 2010-04-18 23:36:45 +0200 (Sun, 18 Apr 2010)
New Revision: 1076

Modified:
   pkg/Rcpp/inst/include/RcppCommon.h
Log:
added the RCPP_CLIENT_INIT macro

Modified: pkg/Rcpp/inst/include/RcppCommon.h
===================================================================
--- pkg/Rcpp/inst/include/RcppCommon.h	2010-04-18 21:32:02 UTC (rev 1075)
+++ pkg/Rcpp/inst/include/RcppCommon.h	2010-04-18 21:36:45 UTC (rev 1076)
@@ -24,6 +24,14 @@
 #ifndef RcppCommon_h
 #define RcppCommon_h
 
+#define RCPP_CLIENT_INIT(DLLNAME)                               \
+#include <RcppCommon.h>                                         \
+#if defined(WIN32)                                              \
+extern "C" void R_init_##DLLNAME( DllInfo* info){               \
+	std::set_terminate( forward_uncaught_exceptions_to_r ) ;    \
+}                                                               \
+#endif                                                          \
+
 void logTxtFunction(const char* file, const int line, const char* expression ) ;
 
 #define ___RCPP_HANDLE_CASE___( ___RTYPE___ , ___FUN___ , ___OBJECT___ , ___RCPPTYPE___ )	\



More information about the Rcpp-commits mailing list