[Rcpp-commits] r656 - in pkg: inst src/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 10 11:42:56 CET 2010
Author: romain
Date: 2010-02-10 11:42:55 +0100 (Wed, 10 Feb 2010)
New Revision: 656
Modified:
pkg/inst/ChangeLog
pkg/src/Rcpp/SEXP_Vector.h
Log:
added comment about push_back and push_front losing the attributes
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2010-02-10 10:36:52 UTC (rev 655)
+++ pkg/inst/ChangeLog 2010-02-10 10:42:55 UTC (rev 656)
@@ -5,7 +5,7 @@
methods push_front and push_back that are templated and
use the implicit wrap idiom to add an element to the front
or to the back of the list, pushing other elements. Internally
- the SEXP is actually copied.
+ the SEXP is actually copied.
* src/Rcpp/VectorBase.h: VectorBase gains a version of
offset to support retrieving the offset of a given name of a
Modified: pkg/src/Rcpp/SEXP_Vector.h
===================================================================
--- pkg/src/Rcpp/SEXP_Vector.h 2010-02-10 10:36:52 UTC (rev 655)
+++ pkg/src/Rcpp/SEXP_Vector.h 2010-02-10 10:42:55 UTC (rev 656)
@@ -187,6 +187,15 @@
private:
+ /*
+ FIXME: this currently loses the attributes of the
+ current object, but then append in R also does.
+
+ It is probably not safe to just copy the attributes as is,
+ as they could for example relate to dimensions or dimnames, etc ...
+
+ not sure what to do
+ */
void push_back_sexp( SEXP t, bool named, const std::string& name ){
if( isNULL() ){
set_single( t, named, name );
More information about the Rcpp-commits
mailing list