22#
33# Generator for inst/include/Rcpp/module/Module_generated_CppFunction.h
44#
5- # Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois
5+ # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois
66
77fun <- function (i ) {
88
@@ -16,10 +16,8 @@ template <typename RESULT_TYPE, %s> class CppFunction%d : public CppFunction {
1616 CppFunction%d(RESULT_TYPE (*fun)(%s) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
1717
1818 SEXP operator()(SEXP* args) {
19- BEGIN_RCPP
2019 %s
2120 return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun(%s));
22- END_RCPP
2321 }
2422
2523 inline int nargs() { return %d; }
@@ -36,10 +34,9 @@ class CppFunction%d<void,%s> : public CppFunction {
3634 CppFunction%d(void (*fun)(%s) , const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
3735
3836 SEXP operator()(SEXP* args) {
39- BEGIN_RCPP
4037 %s
4138 ptr_fun(%s);
42- END_RCPP
39+ return R_NilValue;
4340 }
4441
4542 inline int nargs() { return %d; }
@@ -61,10 +58,8 @@ class CppFunction_WithFormals%d : public CppFunction {
6158 CppFunction(docstring), formals(formals_), ptr_fun(fun) {}
6259
6360 SEXP operator()(SEXP* args) {
64- BEGIN_RCPP
6561 %s
6662 return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun(%s));
67- END_RCPP
6863 }
6964
7065 inline int nargs() { return %d; }
@@ -84,10 +79,9 @@ class CppFunction_WithFormals%d<void,%s> : public CppFunction {
8479 CppFunction(docstring), formals(formals_), ptr_fun(fun) {}
8580
8681 SEXP operator()(SEXP* args) {
87- BEGIN_RCPP
8882 %s
8983 ptr_fun(%s);
90- END_RCPP
84+ return R_NilValue;
9185 }
9286
9387 inline int nargs() { return %d; }
@@ -157,7 +151,7 @@ file <- sprintf(
157151// Module_generated_CppFunction.h: -- generated helper code for Modules
158152// see rcpp-scripts repo for generator script
159153//
160- // Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois
154+ // Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois
161155//
162156// This file is part of Rcpp.
163157//
@@ -184,9 +178,7 @@ class CppFunction0 : public CppFunction {
184178 public:
185179 CppFunction0(RESULT_TYPE (*fun)(void), const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
186180 SEXP operator()(SEXP*) {
187- BEGIN_RCPP
188181 return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun());
189- END_RCPP
190182 }
191183
192184 inline int nargs() { return 0; }
@@ -204,9 +196,8 @@ class CppFunction0<void> : public CppFunction {
204196 CppFunction0(void (*fun)(void), const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {};
205197
206198 SEXP operator()(SEXP*) {
207- BEGIN_RCPP
208199 ptr_fun();
209- END_RCPP
200+ return R_NilValue;
210201 }
211202
212203 inline int nargs() { return 0; }
@@ -224,9 +215,7 @@ class CppFunction_WithFormals0 : public CppFunction {
224215 public:
225216 CppFunction_WithFormals0(RESULT_TYPE (*fun)(void), Rcpp::List, const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {}
226217 SEXP operator()(SEXP*) {
227- BEGIN_RCPP
228218 return Rcpp::module_wrap<RESULT_TYPE>(ptr_fun());
229- END_RCPP
230219 }
231220
232221 inline int nargs() { return 0; }
@@ -244,9 +233,8 @@ class CppFunction_WithFormals0<void> : public CppFunction {
244233 CppFunction_WithFormals0(void (*fun)(void), Rcpp::List, const char* docstring = 0) : CppFunction(docstring), ptr_fun(fun) {} ;
245234
246235 SEXP operator()(SEXP*) {
247- BEGIN_RCPP
248236 ptr_fun() ;
249- END_RCPP
237+ return R_NilValue;
250238 }
251239
252240 inline int nargs() { return 0; }
0 commit comments