Skip to content

Commit 44bae9c

Browse files
only use BEGIN_RCPP where it belongs
1 parent 01bd959 commit 44bae9c

File tree

6 files changed

+30
-570
lines changed

6 files changed

+30
-570
lines changed

inst/include/Rcpp/InternalFunctionWithStdFunction.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// InternalFunction_with_std_function.h: Rcpp R/C++ interface class library -- exposing C++ std::function's
44
//
55
// Copyright (C) 2014 Christian Authmann
6+
// Copyright (C) 2015 Romain Francois
67
//
78
// This file is part of Rcpp.
89
//
@@ -37,10 +38,8 @@ namespace Rcpp{
3738
virtual ~CppFunctionBaseFromStdFunction() {}
3839

3940
SEXP operator()(SEXP* args) {
40-
BEGIN_RCPP
4141
auto result = call<RESULT_TYPE, Args...>(fun, args);
4242
return Rcpp::module_wrap<RESULT_TYPE>(result);
43-
END_RCPP
4443
}
4544

4645
private:
@@ -54,9 +53,7 @@ namespace Rcpp{
5453
virtual ~CppFunctionBaseFromStdFunction() {}
5554

5655
SEXP operator()(SEXP* args) {
57-
BEGIN_RCPP
5856
call<void, Args...>(fun, args);
59-
END_RCPP
6057
}
6158

6259
private:

inst/include/Rcpp/api/meat/module/Module.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module.h: Rcpp R/C++ interface class library -- Rcpp modules
22
//
3-
// Copyright (C) 2013 Romain Francois
3+
// Copyright (C) 2013 - 2015 Romain Francois
44
//
55
// This file is part of Rcpp.
66
//
@@ -37,12 +37,10 @@ namespace Rcpp {
3737
}
3838

3939
inline CppClass Module::get_class( const std::string& cl ){
40-
BEGIN_RCPP
4140
CLASS_MAP::iterator it = classes.find(cl) ;
4241
if( it == classes.end() ) throw std::range_error( "no such class" ) ;
4342
std::string buffer ;
4443
return CppClass( this, it->second, buffer ) ;
45-
END_RCPP
4644
}
4745

4846
}

inst/include/Rcpp/macros/xp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// xp.h: Rcpp R/C++ interface class library -- pre processor help
44
//
5-
// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2012 - 2015 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -33,11 +33,11 @@ extern "C" SEXP RCPP_PP_CAT(__NAME__,__rcpp_info__)(){ \
3333
return info ; \
3434
} \
3535
extern "C" SEXP __NAME__( SEXP xp ){ \
36-
SEXP res = R_NilValue ; \
3736
BEGIN_RCPP \
37+
SEXP res = R_NilValue ; \
3838
::Rcpp::XPtr< __CLASS__ > ptr(xp) ; \
3939
res = ::Rcpp::wrap( ptr->__FIELD__ ) ; \
40-
return res ; \
40+
return res ; \
4141
END_RCPP \
4242
}
4343

0 commit comments

Comments
 (0)