File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,9 @@ 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+ SEXP y = PROTECT ( internal::convert_using_rfunction ( x, " as.data.frame" ) ) ;
105105 Parent::set__ ( y ) ;
106+ UNPROTECT (1 );
106107 }
107108 }
108109
@@ -130,7 +131,7 @@ namespace Rcpp{
130131 obj.erase (strings_as_factors_index) ;
131132 names.erase (strings_as_factors_index) ;
132133 obj.attr ( " names" ) = names ;
133- Shield<SEXP> call ( Rf_lang3 (as_df_symb, obj, wrap ( strings_as_factors ) ) ) ;
134+ Shield<SEXP> call ( Rf_lang3 (as_df_symb, obj, Rf_ScalarLogical ( strings_as_factors) ) ) ;
134135 SET_TAG ( CDDR (call), strings_as_factors_symb ) ;
135136 Shield<SEXP> res (Rcpp_fast_eval (call, R_GlobalEnv));
136137 DataFrame_Impl out ( res ) ;
You can’t perform that action at this time.
0 commit comments