Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 01265c4

Browse files
committedApr 27, 2015
Merge pull request #293 from RcppCore/bugfix/revert-modules-begin-end-changes
Revert changes to modules related to BEGIN/END macros
2 parents ff3b8ef + ae5fe8f commit 01265c4

File tree

5 files changed

+566
-159
lines changed

5 files changed

+566
-159
lines changed
 

‎inst/include/Rcpp/InternalFunctionWithStdFunction.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ namespace Rcpp {
3838
virtual ~CppFunctionBaseFromStdFunction() {}
3939

4040
SEXP operator()(SEXP* args) {
41+
BEGIN_RCPP
4142
auto result = call<RESULT_TYPE, Args...>(fun, args);
4243
return Rcpp::module_wrap<RESULT_TYPE>(result);
44+
END_RCPP
4345
}
4446

4547
private:
@@ -53,8 +55,9 @@ namespace Rcpp {
5355
virtual ~CppFunctionBaseFromStdFunction() {}
5456

5557
SEXP operator()(SEXP* args) {
58+
BEGIN_RCPP
5659
call<void, Args...>(fun, args);
57-
return R_NilValue;
60+
END_RCPP
5861
}
5962

6063
private:

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

Lines changed: 3 additions & 1 deletion
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 - 2015 Romain Francois
3+
// Copyright (C) 2013 Romain Francois
44
//
55
// This file is part of Rcpp.
66
//
@@ -37,10 +37,12 @@ namespace Rcpp {
3737
}
3838

3939
inline CppClass Module::get_class( const std::string& cl ){
40+
BEGIN_RCPP
4041
CLASS_MAP::iterator it = classes.find(cl) ;
4142
if( it == classes.end() ) throw std::range_error( "no such class" ) ;
4243
std::string buffer ;
4344
return CppClass( this, it->second, buffer ) ;
45+
END_RCPP
4446
}
4547

4648
}

0 commit comments

Comments
 (0)