only used for debugging
| 138 | |
| 139 | // only used for debugging |
| 140 | SEXP get_rcpp_cache() { |
| 141 | if (! Rcpp_cache_know) { |
| 142 | |
| 143 | SEXP getNamespaceSym = Rf_install("getNamespace"); // cannot be gc()'ed once in symbol table |
| 144 | Rcpp::Shield<SEXP> RcppString(Rf_mkString("Rcpp")); |
| 145 | Rcpp::Shield<SEXP> call(Rf_lang2(getNamespaceSym, RcppString)); |
| 146 | Rcpp::Shield<SEXP> RCPP(Rf_eval(call, R_GlobalEnv)); |
| 147 | |
| 148 | #if R_VERSION < R_Version(4,5,0) |
| 149 | Rcpp_cache = Rf_findVarInFrame(RCPP, Rf_install(".rcpp_cache")); |
| 150 | #else |
| 151 | Rcpp_cache = R_getVar(Rf_install(".rcpp_cache"), RCPP, TRUE); |
| 152 | #endif |
| 153 | Rcpp_cache_know = true; |
| 154 | } |
| 155 | return Rcpp_cache; |
| 156 | } |
| 157 | |
| 158 | namespace Rcpp { |
| 159 | namespace internal { |
no outgoing calls
no test coverage detected