[Rcpp-devel] major changes commited yesterday

Romain Francois francoisromain at free.fr
Sat Jan 30 09:22:25 CET 2010


Hi,

Those of you who follow the commits mailing list might have seen the 
enormous commit of yesterday.

There is not much to worry, as this was mostly making sense of headers 
dependencies (I miss java where you don't have to worry about it).

There was one major change though that is worth mentioning. I've changed 
wrap so that it returns SEXP rather than some object that derives from 
RObject. So the template now looks like this :

template <typename T> SEXP wrap( const T& object){
	SEXP x = object ; /* let implicit conversion work */
	return x ;
}

and the other wrap are actual specializations of the template. e.g :

template<> SEXP wrap(const std::vector<Rbyte> & v);



Before, because each was returning its preferred RObject class, they 
could not be considered a specialization of the template and this did 
lead to trouble, specially as I started to approach RInside.

Not that you can still do things like :

NumericVector v = wrap( 2 ) ;


There are some minor things I need to take care of, and then we can 
release again.

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/KfKn : Rcpp 0.7.2
|- http://tr.im/JOlc : External pointers with Rcpp
`- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009




More information about the Rcpp-devel mailing list