File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,8 @@ namespace Rcpp{
321321 Armor<SEXP> env ;
322322 try {
323323 SEXP getNamespaceSym = Rf_install (" getNamespace" );
324- env = Rcpp_eval ( Rf_lang2 (getNamespaceSym, Rf_mkString (package.c_str ()) ) ) ;
324+ Shield<SEXP> package_str ( Rf_mkString (package.c_str ()) );
325+ env = Rcpp_eval ( Rf_lang2 (getNamespaceSym, package_str) ) ;
325326 } catch ( ... ){
326327 throw no_such_namespace ( package ) ;
327328 }
Original file line number Diff line number Diff line change @@ -93,7 +93,8 @@ SEXP get_rcpp_cache() {
9393 if ( ! Rcpp_cache_know ){
9494
9595 SEXP getNamespaceSym = Rf_install (" getNamespace" ); // cannot be gc()'ed once in symbol table
96- Rcpp::Shield<SEXP> RCPP ( Rf_eval (Rf_lang2 ( getNamespaceSym, Rf_mkString (" Rcpp" ) ), R_GlobalEnv) ) ;
96+ Rcpp::Shield<SEXP> RcppString ( Rf_mkString (" Rcpp" ) );
97+ Rcpp::Shield<SEXP> RCPP ( Rf_eval (Rf_lang2 ( getNamespaceSym, RcppString ), R_GlobalEnv) ) ;
9798
9899 Rcpp_cache = Rf_findVarInFrame ( RCPP, Rf_install (" .rcpp_cache" ) ) ;
99100 Rcpp_cache_know = true ;
You can’t perform that action at this time.
0 commit comments