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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 19 13:08:38 CEST 2010


Author: romain
Date: 2010-04-19 13:08:38 +0200 (Mon, 19 Apr 2010)
New Revision: 1082

Modified:
   pkg/Rcpp/inst/include/Rcpp/preprocessor.h
Log:
embed try/catch/forward in RCPP_WRAPPER_*

Modified: pkg/Rcpp/inst/include/Rcpp/preprocessor.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/preprocessor.h	2010-04-19 10:12:36 UTC (rev 1081)
+++ pkg/Rcpp/inst/include/Rcpp/preprocessor.h	2010-04-19 11:08:38 UTC (rev 1082)
@@ -26,142 +26,681 @@
 
 // res <- sapply( 0:65, function(i){
 // 	txt <- sprintf( '
-// 	#define RCPP_WRAPPER_%d(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(%s){ return  __NAME__(%s) ; }', i, 
+// #define RCPP_WRAPPER_%d(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(%s){     \\
+// SEXP res = R_NilValue ;                                                            \\
+// try{                                                                               \\
+// 	res = __NAME__(%s) ;                                                           \\
+// } catch( std::exception& __ex__ ){                                                 \\
+// 	forward_exception_to_r( __ex__ ) ;                                             \\
+// }                                                                                  \\
+// return res ;                                                                       \\
+// }', i, 
 // 	if( i == 0 ) "" else paste( sprintf( "SEXP x%d", 0:(i-1) ), collapse = ", " ), 
 // 	if( i == 0 ) "" else paste( sprintf( "x%d", 0:(i-1) ), collapse = ", " ) 
 // 	)
 // })
    
 
-#define RCPP_WRAPPER_0(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(){ return  __NAME__() ; }
 
-#define RCPP_WRAPPER_1(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0){ return  __NAME__(x0) ; }
 
-#define RCPP_WRAPPER_2(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1){ return  __NAME__(x0, x1) ; }
+#define RCPP_WRAPPER_0(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__() ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_3(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2){ return  __NAME__(x0, x1, x2) ; }
+#define RCPP_WRAPPER_1(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_4(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3){ return  __NAME__(x0, x1, x2, x3) ; }
+#define RCPP_WRAPPER_2(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_5(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4){ return  __NAME__(x0, x1, x2, x3, x4) ; }
+#define RCPP_WRAPPER_3(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_6(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5){ return  __NAME__(x0, x1, x2, x3, x4, x5) ; }
+#define RCPP_WRAPPER_4(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_7(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6) ; }
+#define RCPP_WRAPPER_5(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_8(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7) ; }
+#define RCPP_WRAPPER_6(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_9(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8) ; }
+#define RCPP_WRAPPER_7(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_10(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) ; }
+#define RCPP_WRAPPER_8(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_11(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) ; }
+#define RCPP_WRAPPER_9(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_12(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) ; }
+#define RCPP_WRAPPER_10(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_13(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) ; }
+#define RCPP_WRAPPER_11(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_14(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) ; }
+#define RCPP_WRAPPER_12(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_15(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) ; }
+#define RCPP_WRAPPER_13(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_16(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) ; }
+#define RCPP_WRAPPER_14(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_17(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) ; }
+#define RCPP_WRAPPER_15(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_18(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) ; }
+#define RCPP_WRAPPER_16(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_19(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) ; }
+#define RCPP_WRAPPER_17(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_20(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) ; }
+#define RCPP_WRAPPER_18(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_21(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) ; }
+#define RCPP_WRAPPER_19(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_22(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) ; }
+#define RCPP_WRAPPER_20(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_23(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) ; }
+#define RCPP_WRAPPER_21(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_24(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23) ; }
+#define RCPP_WRAPPER_22(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_25(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23, SEXP x24){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) ; }
+#define RCPP_WRAPPER_23(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_26(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23, SEXP x24, SEXP x25){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) ; }
+#define RCPP_WRAPPER_24(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_27(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23, SEXP x24, SEXP x25, SEXP x26){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26) ; }
+#define RCPP_WRAPPER_25(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23, SEXP x24){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
-#define RCPP_WRAPPER_28(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23, SEXP x24, SEXP x25, SEXP x26, SEXP x27){ return  __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27) ; }
+#define RCPP_WRAPPER_26(__NAME__) extern "C" SEXP RCPP_DECORATE(__NAME__)(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19, SEXP x20, SEXP x21, SEXP x22, SEXP x23, SEXP x24, SEXP x25){     \
+SEXP res = R_NilValue ;                                                            \
+try{                                                                               \
+res = __NAME__(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) ;                                                           \
+} catch( std::exception& __ex__ ){                                                 \
+forward_exception_to_r( __ex__ ) ;                                             \
+}                                                                                  \
+return res ;                                                                       \
+}
 
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rcpp -r 1082


More information about the Rcpp-commits mailing list