Skip to content

Commit

Permalink
revert un-needed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Jul 5, 2024
1 parent ca1330b commit 890b804
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions inst/include/Rcpp/r_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ namespace Rcpp {

inline SEXP convert_using_rfunction(SEXP x, const char* const fun) { // #nocov start
Armor<SEXP> res;
try {
try{
SEXP funSym = Rf_install(fun);
Shield<SEXP> call(Rf_lang2(funSym, x));
Shield<SEXP> envir(R_FindNamespace(Rf_mkString("Rcpp")));
res = Rcpp_fast_eval(call, envir);
} catch (eval_error& e) {
res = Rcpp_fast_eval(call, R_GlobalEnv);
} catch( eval_error& e) {
const char* fmt = "Could not convert using R function: %s.";
throw not_compatible(fmt, fun);
}
Expand Down

0 comments on commit 890b804

Please sign in to comment.