File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ namespace Rcpp{
101101 if ( ::Rf_inherits ( x, " data.frame" )){
102102 Parent::set__ ( x ) ;
103103 } else {
104- SEXP y = internal::convert_using_rfunction ( x, " as.data.frame" ) ;
104+ Shield< SEXP> y ( internal::convert_using_rfunction ( x, " as.data.frame" ) ) ;
105105 Parent::set__ ( y ) ;
106106 }
107107 }
@@ -130,7 +130,7 @@ namespace Rcpp{
130130 obj.erase (strings_as_factors_index) ;
131131 names.erase (strings_as_factors_index) ;
132132 obj.attr ( " names" ) = names ;
133- Shield<SEXP> call ( Rf_lang3 (as_df_symb, obj, wrap ( strings_as_factors ) ) ) ;
133+ Shield<SEXP> call ( Rf_lang3 (as_df_symb, obj, Rf_ScalarLogical ( strings_as_factors) ) ) ;
134134 SET_TAG ( CDDR (call), strings_as_factors_symb ) ;
135135 Shield<SEXP> res (Rcpp_fast_eval (call, R_GlobalEnv));
136136 DataFrame_Impl out ( res ) ;
Original file line number Diff line number Diff line change @@ -374,7 +374,8 @@ namespace Rcpp{
374374 try {
375375 SEXP getNamespaceSym = Rf_install (" getNamespace" );
376376 Shield<SEXP> package_str ( Rf_mkString (package.c_str ()) );
377- env = Rcpp_fast_eval (Rf_lang2 (getNamespaceSym, package_str), R_GlobalEnv);
377+ Shield<SEXP> call ( Rf_lang2 (getNamespaceSym, package_str) );
378+ env = Rcpp_fast_eval (call, R_GlobalEnv);
378379 } catch ( ... ){
379380 throw no_such_namespace ( package ) ;
380381 }
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ namespace Rcpp {
3131 Armor<SEXP> res;
3232 try {
3333 SEXP funSym = Rf_install (fun);
34- res = Rcpp_fast_eval (Rf_lang2 (funSym, x), R_GlobalEnv);
34+ Shield<SEXP> call (Rf_lang2 (funSym, x));
35+ res = Rcpp_fast_eval (call, R_GlobalEnv);
3536 } catch ( eval_error& e) {
3637 const char * fmt = " Could not convert using R function: %s." ;
3738 throw not_compatible (fmt, fun);
You can’t perform that action at this time.
0 commit comments