[Rcpp-commits] r1845 - in pkg/Rcpp: . inst/include/Rcpp inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 9 11:15:46 CEST 2010
Author: romain
Date: 2010-07-09 11:15:45 +0200 (Fri, 09 Jul 2010)
New Revision: 1845
Modified:
pkg/Rcpp/DESCRIPTION
pkg/Rcpp/inst/include/Rcpp/Named.h
pkg/Rcpp/inst/unitTests/runit.Function.R
Log:
apparently inlining seems to do the trick, not sure this is the end of that problem
Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION 2010-07-09 02:41:12 UTC (rev 1844)
+++ pkg/Rcpp/DESCRIPTION 2010-07-09 09:15:45 UTC (rev 1845)
@@ -1,6 +1,6 @@
Package: Rcpp
Title: Seamless R and C++ Integration
-Version: 0.8.3.4
+Version: 0.8.3.5
Date: $Date$
Author: Dirk Eddelbuettel and Romain Francois, with contributions
by Simon Urbanek, David Reiss and Douglas Bates; based on code written during
Modified: pkg/Rcpp/inst/include/Rcpp/Named.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Named.h 2010-07-09 02:41:12 UTC (rev 1844)
+++ pkg/Rcpp/inst/include/Rcpp/Named.h 2010-07-09 09:15:45 UTC (rev 1845)
@@ -35,7 +35,7 @@
Argument( const std::string& name_) : name(name_){}
template<typename T>
- traits::named_object<T> operator=( const T& t){
+ inline traits::named_object<T> operator=( const T& t){
return traits::named_object<T>( name, t ) ;
}
@@ -47,7 +47,7 @@
return Argument( name );
}
template <typename T>
-traits::named_object<T> Named( const std::string& name, const T& o){
+inline traits::named_object<T> Named( const std::string& name, const T& o){
return traits::named_object<T>( name, o );
}
Modified: pkg/Rcpp/inst/unitTests/runit.Function.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.Function.R 2010-07-09 02:41:12 UTC (rev 1844)
+++ pkg/Rcpp/inst/unitTests/runit.Function.R 2010-07-09 09:15:45 UTC (rev 1845)
@@ -31,8 +31,8 @@
signature(x="function", y = "ANY"),
'
Function sort(x) ;
- //return sort( y, Named("decreasing", true) ) ;
- return sort( y ) ;
+ return sort( y, Named("decreasing", true) ) ;
+ // return sort( y ) ;
'
),
"function_env" = list(
@@ -99,7 +99,7 @@
test.Function.variadic <- function(){
funx <- .rcpp.Function$function_variadic
- checkEquals( funx( sort, sample(1:20) ), 1:20, msg = "calling function" )
+ checkEquals( funx( sort, sample(1:20) ), 20:1, msg = "calling function" )
checkException( funx(sort, sort), msg = "Function, R error -> exception" )
}
More information about the Rcpp-commits
mailing list