Skip to content

Commit 7445a22

Browse files
committed
minor cleanup
1 parent 7d894fd commit 7445a22

File tree

3 files changed

+11
-25
lines changed

3 files changed

+11
-25
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2017-05-19 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/NEWS.Rd: Removed one duplicate entry
4+
* inst/include/Rcpp/api/meat/Rcpp_eval.h (Rcpp): Minor whitespace changes
5+
16
2017-05-18 Dirk Eddelbuettel <[email protected]>
27

38
* DESCRIPTION (Version, Date): Roll Date and Version once more

inst/NEWS.Rd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
\ghit{184}).
2323
\item One more instance of \code{Rf_mkString} is protected from garbage
2424
collection (Dirk in \ghpr{686} addressing \ghit{685}).
25-
\item Several compiler warnings for \code{-Wconversions} are no longer
26-
generated (Kirill Mueller in \ghpr{687} and \ghpr{688})
2725
\item Two exception specification that are no longer tolerated by
2826
\code{g++-7.1} or later were removed (Dirk in \ghpr{690} addressing
2927
\ghit{689})

inst/include/Rcpp/api/meat/Rcpp_eval.h

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,17 @@ namespace Rcpp {
2525
inline SEXP Rcpp_eval(SEXP expr, SEXP env) {
2626

2727
// 'identity' function used to capture errors, interrupts
28-
SEXP identity = Rf_findFun(
29-
::Rf_install("identity"),
30-
R_BaseNamespace
31-
);
28+
SEXP identity = Rf_findFun(::Rf_install("identity"), R_BaseNamespace);
3229

3330
if (identity == R_UnboundValue) {
3431
stop("Failed to find 'base::identity()'");
3532
}
3633

37-
// define the evalq call -- the actual R evaluation we
38-
// want to execute
39-
Shield<SEXP> evalqCall(Rf_lang3(
40-
::Rf_install("evalq"),
41-
expr,
42-
env
43-
));
34+
// define the evalq call -- the actual R evaluation we want to execute
35+
Shield<SEXP> evalqCall(Rf_lang3(::Rf_install("evalq"), expr, env));
4436

45-
// define the call -- enclose with `tryCatch` so we can record
46-
// and later forward error messages
47-
Shield<SEXP> call(Rf_lang4(
48-
::Rf_install("tryCatch"),
49-
evalqCall,
50-
identity,
51-
identity
52-
));
37+
// define the call -- enclose with `tryCatch` so we can record and forward error messages
38+
Shield<SEXP> call(Rf_lang4(::Rf_install("tryCatch"), evalqCall, identity, identity));
5339
SET_TAG(CDDR(call), ::Rf_install("error"));
5440
SET_TAG(CDDR(CDR(call)), ::Rf_install("interrupt"));
5541

@@ -61,10 +47,7 @@ inline SEXP Rcpp_eval(SEXP expr, SEXP env) {
6147

6248
if (Rf_inherits(res, "error")) {
6349

64-
Shield<SEXP> conditionMessageCall(::Rf_lang2(
65-
::Rf_install("conditionMessage"),
66-
res
67-
));
50+
Shield<SEXP> conditionMessageCall(::Rf_lang2(::Rf_install("conditionMessage"), res));
6851

6952
Shield<SEXP> conditionMessage(::Rf_eval(conditionMessageCall, R_GlobalEnv));
7053
throw eval_error(CHAR(STRING_ELT(conditionMessage, 0)));

0 commit comments

Comments
 (0)