[Rcpp-commits] r4342 - scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 18 19:08:36 CEST 2013


Author: romain
Date: 2013-06-18 19:08:35 +0200 (Tue, 18 Jun 2013)
New Revision: 4342

Modified:
   scripts/generator_Module_CppFunction.R
Log:
updated generator

Modified: scripts/generator_Module_CppFunction.R
===================================================================
--- scripts/generator_Module_CppFunction.R	2013-06-18 17:07:54 UTC (rev 4341)
+++ scripts/generator_Module_CppFunction.R	2013-06-18 17:08:35 UTC (rev 4342)
@@ -11,7 +11,9 @@
         CppFunction%d(OUT (*fun)(%s) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 
         SEXP operator()(SEXP* args) {
+            BEGIN_RCPP
             return Rcpp::module_wrap<OUT>( ptr_fun( %s ) ) ;
+            END_RCPP
         }
 
         inline int nargs(){ return %d; }
@@ -28,8 +30,9 @@
         CppFunction%d(void (*fun)(%s) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun){}
 
         SEXP operator()(SEXP* args) {
+            BEGIN_RCPP
             ptr_fun( %s ) ;
-            return R_NilValue ;
+            END_RCPP
         }
 
         inline int nargs(){ return %d; }
@@ -51,7 +54,9 @@
             CppFunction(docstring), formals(formals_), ptr_fun(fun){}
 
         SEXP operator()(SEXP* args) {
+            BEGIN_RCPP
             return Rcpp::module_wrap<OUT>( ptr_fun( %s ) ) ;
+            END_RCPP
         }
 
         inline int nargs(){ return %d; }
@@ -71,8 +76,9 @@
             CppFunction(docstring), formals(formals_), ptr_fun(fun){}
 
         SEXP operator()(SEXP* args) {
+            BEGIN_RCPP
             ptr_fun( %s ) ;
-            return R_NilValue ;
+            END_RCPP
         }
 
         inline int nargs(){ return %d; }
@@ -161,7 +167,9 @@
     public:
         CppFunction0(OUT (*fun)(void), const char* docstring = 0 ) : CppFunction(docstring), ptr_fun(fun){}
         SEXP operator()(SEXP*) {
+            BEGIN_RCPP
             return Rcpp::module_wrap<OUT>( ptr_fun() ) ;
+            END_RCPP
         }
 
         inline int nargs(){ return 0; }
@@ -179,8 +187,9 @@
         CppFunction0(void (*fun)(void), const char* docstring = 0 ) : CppFunction(docstring), ptr_fun(fun){} ;
 
         SEXP operator()(SEXP*) {
+            BEGIN_RCPP
             ptr_fun() ;
-            return R_NilValue ;
+            END_RCPP
         }
 
         inline int nargs(){ return 0; }
@@ -198,7 +207,9 @@
     public:
         CppFunction_WithFormals0(OUT (*fun)(void), Rcpp::List,  const char* docstring = 0 ) : CppFunction(docstring), ptr_fun(fun){}
         SEXP operator()(SEXP*) {
+            BEGIN_RCPP
             return Rcpp::module_wrap<OUT>( ptr_fun() ) ;
+            END_RCPP
         }
 
         inline int nargs(){ return 0; }
@@ -216,8 +227,9 @@
         CppFunction_WithFormals0(void (*fun)(void), Rcpp::List, const char* docstring = 0 ) : CppFunction(docstring), ptr_fun(fun){} ;
 
         SEXP operator()(SEXP*) {
+            BEGIN_RCPP
             ptr_fun() ;
-            return R_NilValue ;
+            END_RCPP
         }
 
         inline int nargs(){ return 0; }



More information about the Rcpp-commits mailing list