File tree Expand file tree Collapse file tree 6 files changed +10
-9
lines changed
Expand file tree Collapse file tree 6 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 112017-12-04 Kevin Ushey <
[email protected] >
22
3- * inst/include/Rcpp/api/meat/proxy.h: Protect temporary SEXP
3+ * inst/include/Rcpp/RObject.h: Protect temporary wrapped SEXPs
4+ * inst/include/Rcpp/api/meat/DataFrame.h: Idem
5+ * inst/include/Rcpp/api/meat/Environment.h: Idem
6+ * inst/include/Rcpp/api/meat/proxy.h: Idem
47 * inst/include/Rcpp/proxy/ProtectedProxy.h: Idem
58 * inst/include/Rcpp/vector/generic_proxy.h: Idem
69
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ namespace Rcpp{
4848 */
4949 template <typename T>
5050 RObject_Impl& operator =(const T& other) {
51- Storage::set__ ( wrap (other) ) ;
51+ Storage::set__ (Shield<SEXP>( wrap (other))) ;
5252 return *this ;
5353 }
5454
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace Rcpp{
2323 template <template <class > class StoragePolicy >
2424 template <class T >
2525 DataFrame_Impl<StoragePolicy>::DataFrame_Impl( const T& obj){
26- set__ ( wrap (obj) ) ;
26+ set__ (Shield<SEXP>( wrap (obj))) ;
2727 }
2828
2929}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ namespace Rcpp{
2727template <template <class > class StoragePolicy >
2828template <typename WRAPPABLE>
2929bool Environment_Impl<StoragePolicy>::assign( const std::string& name, const WRAPPABLE& x) const {
30- return assign ( name, wrap ( x ) ) ;
30+ return assign (name, Shield<SEXP>( wrap (x))) ;
3131}
3232
3333template <template <class > class StoragePolicy >
Original file line number Diff line number Diff line change @@ -184,9 +184,7 @@ template <typename CLASS>
184184template <typename T>
185185typename FieldProxyPolicy<CLASS>::FieldProxy&
186186FieldProxyPolicy<CLASS>::FieldProxy::operator =(const T& rhs) {
187- SEXP tmp = PROTECT (wrap (rhs));
188- set (tmp);
189- UNPROTECT (1 );
187+ set (Shield<SEXP>(wrap (rhs)));
190188 return *this ;
191189}
192190
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ namespace internal{
151151
152152 template <typename T>
153153 generic_name_proxy& operator =( const T& rhs ){
154- set ( :: Rcpp:: wrap (rhs) ) ;
154+ set (Shield<SEXP>( wrap (rhs))) ;
155155 return *this ;
156156 }
157157
@@ -249,7 +249,7 @@ namespace traits {
249249 template <> struct r_vector_iterator <VECSXP> : proxy_based_iterator<VECSXP>{} ;
250250 template <> struct r_vector_iterator <EXPRSXP> : proxy_based_iterator<EXPRSXP>{} ;
251251 template <> struct r_vector_iterator <STRSXP> : proxy_based_iterator<STRSXP>{} ;
252-
252+
253253 template <int RTYPE> struct proxy_based_const_iterator {
254254 typedef ::Rcpp::internal::Proxy_Iterator< typename r_vector_const_proxy<RTYPE>::type > type ;
255255 } ;
You can’t perform that action at this time.
0 commit comments