@@ -160,7 +160,7 @@ namespace Rcpp{
160160 Storage::set__ ( target.get__ () ) ;
161161 return begin ()+i ;
162162 } else {
163- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n-1 );
163+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n-1 );
164164 int i= 0 ;
165165 for ( ; it < position; ++it, ++target_it,i++){
166166 *target_it = *it;
@@ -203,7 +203,7 @@ namespace Rcpp{
203203 *target_it = *it ;
204204 }
205205 } else {
206- Scoped <SEXP> newnames = ::Rf_allocVector (STRSXP, target_size);
206+ Shield <SEXP> newnames = ::Rf_allocVector (STRSXP, target_size);
207207 int i= 0 ;
208208 for ( ; it < first; ++it, ++target_it, i++ ){
209209 *target_it = *it ;
@@ -234,7 +234,7 @@ namespace Rcpp{
234234 *target_it = *it ;
235235 }
236236 } else {
237- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 ) ;
237+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 ) ;
238238 int i = 0 ;
239239 for ( ; it < this_end; ++it, ++target_it, i++ ){
240240 *target_it = *it ;
@@ -249,7 +249,7 @@ namespace Rcpp{
249249
250250 template <int RTYPE, template <class > class StoragePolicy >
251251 void Vector_Impl<RTYPE,StoragePolicy>::push_back__impl(const stored_type& object, std::true_type){
252- Scoped <SEXP> object_sexp = object ;
252+ Shield <SEXP> object_sexp = object ;
253253 int n = size () ;
254254 Vector_Impl target ( n + 1 ) ;
255255 SEXP names = RCPP_GET_NAMES ( Storage::get__ () ) ;
@@ -261,7 +261,7 @@ namespace Rcpp{
261261 *target_it = *it ;
262262 }
263263 } else {
264- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 ) ;
264+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 ) ;
265265 int i = 0 ;
266266 for ( ; it < this_end; ++it, ++target_it, i++ ){
267267 *target_it = *it ;
@@ -282,7 +282,7 @@ namespace Rcpp{
282282 iterator it (begin ()) ;
283283 iterator this_end (end ());
284284 SEXP names = RCPP_GET_NAMES ( Storage::get__ () ) ;
285- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
285+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
286286 int i=0 ;
287287 if ( names == R_NilValue ){
288288 SEXP dummy = Rf_mkChar (" " ) ;
@@ -305,14 +305,14 @@ namespace Rcpp{
305305
306306 template <int RTYPE, template <class > class StoragePolicy >
307307 void Vector_Impl<RTYPE,StoragePolicy>::push_back_name__impl(const stored_type& object, const std::string& name, std::true_type ){
308- Scoped <SEXP> object_sexp = object ;
308+ Shield <SEXP> object_sexp = object ;
309309 int n = size () ;
310310 Vector_Impl target ( n + 1 ) ;
311311 iterator target_it ( target.begin () ) ;
312312 iterator it (begin ()) ;
313313 iterator this_end (end ());
314314 SEXP names = RCPP_GET_NAMES ( Storage::get__ () ) ;
315- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
315+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
316316 int i=0 ;
317317 if ( names == R_NilValue ){
318318 SEXP dummy = Rf_mkChar (" " ) ;
@@ -348,7 +348,7 @@ namespace Rcpp{
348348 *target_it = *it ;
349349 }
350350 } else {
351- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 );
351+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 );
352352 int i=1 ;
353353 SET_STRING_ELT ( newnames, 0 , Rf_mkChar (" " ) ) ;
354354 for ( ; it<this_end; ++it, ++target_it, i++){
@@ -362,7 +362,7 @@ namespace Rcpp{
362362
363363 template <int RTYPE, template <class > class StoragePolicy >
364364 void Vector_Impl<RTYPE,StoragePolicy>::push_front__impl(const stored_type& object, std::true_type ){
365- Scoped <SEXP> object_sexp = object ;
365+ Shield <SEXP> object_sexp = object ;
366366 int n = size () ;
367367 Vector_Impl target ( n+1 );
368368 iterator target_it (target.begin ());
@@ -376,7 +376,7 @@ namespace Rcpp{
376376 *target_it = *it ;
377377 }
378378 } else {
379- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 );
379+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 );
380380 int i=1 ;
381381 SET_STRING_ELT ( newnames, 0 , Rf_mkChar (" " ) ) ;
382382 for ( ; it<this_end; ++it, ++target_it, i++){
@@ -396,14 +396,14 @@ namespace Rcpp{
396396 iterator it (begin ()) ;
397397 iterator this_end (end ());
398398 SEXP names = RCPP_GET_NAMES ( Storage::get__ () ) ;
399- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
399+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
400400 int i=1 ;
401401 SET_STRING_ELT ( newnames, 0 , Rf_mkChar ( name.c_str () ) );
402402 *target_it = object;
403403 ++target_it ;
404404
405405 if ( names == R_NilValue ){
406- Scoped <SEXP> dummy = Rf_mkChar (" " );
406+ Shield <SEXP> dummy = Rf_mkChar (" " );
407407 for ( ; it < this_end; ++it, ++target_it,i++ ){
408408 *target_it = *it ;
409409 SET_STRING_ELT ( newnames, i , dummy );
@@ -421,21 +421,21 @@ namespace Rcpp{
421421
422422 template <int RTYPE, template <class > class StoragePolicy >
423423 void Vector_Impl<RTYPE,StoragePolicy>::push_front_name__impl(const stored_type& object, const std::string& name, std::true_type ){
424- Scoped <SEXP> object_sexp = object ;
424+ Shield <SEXP> object_sexp = object ;
425425 int n = size () ;
426426 Vector_Impl target ( n + 1 ) ;
427427 iterator target_it ( target.begin () ) ;
428428 iterator it (begin ()) ;
429429 iterator this_end (end ());
430430 SEXP names = RCPP_GET_NAMES ( Storage::get__ () ) ;
431- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
431+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n+1 ) ;
432432 int i=1 ;
433433 SET_STRING_ELT ( newnames, 0 , Rf_mkChar ( name.c_str () ) );
434434 *target_it = object_sexp;
435435 ++target_it ;
436436
437437 if ( names == R_NilValue ){
438- Scoped <SEXP> dummy = Rf_mkChar (" " );
438+ Shield <SEXP> dummy = Rf_mkChar (" " );
439439 for ( ; it < this_end; ++it, ++target_it,i++ ){
440440 *target_it = *it ;
441441 SET_STRING_ELT ( newnames, i , dummy );
@@ -473,7 +473,7 @@ namespace Rcpp{
473473 *target_it = *it ;
474474 }
475475 } else {
476- Scoped <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 ) ;
476+ Shield <SEXP> newnames = ::Rf_allocVector ( STRSXP, n + 1 ) ;
477477 int i=0 ;
478478 for ( ; it < position; ++it, ++target_it, i++){
479479 *target_it = *it ;
0 commit comments