MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / get_last_call

Function get_last_call

inst/include/Rcpp/exceptions.h:278–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276} // namespace Rcpp
277
278inline SEXP get_last_call(){
279 SEXP sys_calls_symbol = Rf_install("sys.calls");
280
281 Rcpp::Shield<SEXP> sys_calls_expr(Rf_lang1(sys_calls_symbol));
282 Rcpp::Shield<SEXP> calls(Rcpp_fast_eval(sys_calls_expr, R_GlobalEnv));
283
284 SEXP cur, prev;
285 prev = cur = calls;
286 while(CDR(cur) != R_NilValue) {
287 SEXP expr = CAR(cur);
288
289 if (Rcpp::internal::is_Rcpp_eval_call(expr)) {
290 break;
291 }
292 prev = cur;
293 cur = CDR(cur);
294 }
295 return CAR(prev);
296}
297
298inline SEXP get_exception_classes( const std::string& ex_class) {
299 Rcpp::Shield<SEXP> res( Rf_allocVector( STRSXP, 4 ) );

Callers 1

Calls 2

Rcpp_fast_evalFunction · 0.85
is_Rcpp_eval_callFunction · 0.85

Tested by

no test coverage detected