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{
101
101
if ( ::Rf_inherits ( x, " data.frame" )){
102
102
Parent::set__ ( x ) ;
103
103
} else {
104
- SEXP y = internal::convert_using_rfunction ( x, " as.data.frame" ) ;
104
+ Shield< SEXP> y ( internal::convert_using_rfunction ( x, " as.data.frame" ) ) ;
105
105
Parent::set__ ( y ) ;
106
106
}
107
107
}
@@ -130,7 +130,7 @@ namespace Rcpp{
130
130
obj.erase (strings_as_factors_index) ;
131
131
names.erase (strings_as_factors_index) ;
132
132
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) ) ) ;
134
134
SET_TAG ( CDDR (call), strings_as_factors_symb ) ;
135
135
Shield<SEXP> res (Rcpp_fast_eval (call, R_GlobalEnv));
136
136
DataFrame_Impl out ( res ) ;
Original file line number Diff line number Diff line change @@ -374,7 +374,8 @@ namespace Rcpp{
374
374
try {
375
375
SEXP getNamespaceSym = Rf_install (" getNamespace" );
376
376
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);
378
379
} catch ( ... ){
379
380
throw no_such_namespace ( package ) ;
380
381
}
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ namespace Rcpp {
31
31
Armor<SEXP> res;
32
32
try {
33
33
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);
35
36
} catch ( eval_error& e) {
36
37
const char * fmt = " Could not convert using R function: %s." ;
37
38
throw not_compatible (fmt, fun);
You can’t perform that action at this time.
0 commit comments