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{
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
+ SEXP y = PROTECT ( internal::convert_using_rfunction ( x, " as.data.frame" ) ) ;
105
105
Parent::set__ ( y ) ;
106
+ UNPROTECT (1 );
106
107
}
107
108
}
108
109
@@ -130,7 +131,7 @@ namespace Rcpp{
130
131
obj.erase (strings_as_factors_index) ;
131
132
names.erase (strings_as_factors_index) ;
132
133
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) ) ) ;
134
135
SET_TAG ( CDDR (call), strings_as_factors_symb ) ;
135
136
Shield<SEXP> res (Rcpp_fast_eval (call, R_GlobalEnv));
136
137
DataFrame_Impl out ( res ) ;
You can’t perform that action at this time.
0 commit comments