File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,9 @@ static VARIABLE_IS_NOT_USED SEXP moduleSym = NULL;
447
447
#define GET_MODULE_SYM ( moduleSym == NULL ? moduleSym = Rf_install(" Module" ) : moduleSym )
448
448
449
449
// this macro is called by code wanting to load a module -- see RInside's rinside_module_sample0.cpp
450
- #define LOAD_RCPP_MODULE (NAME ) Rf_eval( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ), R_GlobalEnv )
450
+ #define LOAD_RCPP_MODULE (NAME ) \
451
+ Shield<SEXP> __load_module_call__ ( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
452
+ Rf_eval (__load_module_call__), R_GlobalEnv );
451
453
452
454
#endif
453
455
Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ SEXP get_rcpp_cache() {
94
94
95
95
SEXP getNamespaceSym = Rf_install (" getNamespace" ); // cannot be gc()'ed once in symbol table
96
96
Rcpp::Shield<SEXP> RcppString ( Rf_mkString (" Rcpp" ) );
97
- Rcpp::Shield<SEXP> RCPP ( Rf_eval (Rf_lang2 ( getNamespaceSym, RcppString ), R_GlobalEnv) ) ;
97
+ Rcpp::Shield<SEXP> call ( Rf_lang2 ( getNamespaceSym, RcppString ) );
98
+ Rcpp::Shield<SEXP> RCPP ( Rf_eval (call, R_GlobalEnv) ) ;
98
99
99
100
Rcpp_cache = Rf_findVarInFrame ( RCPP, Rf_install (" .rcpp_cache" ) ) ;
100
101
Rcpp_cache_know = true ;
You can’t perform that action at this time.
0 commit comments