Skip to content

Commit 47f6e91

Browse files
committed
use nprot and reference stop_sym (closes #951)
1 parent 0837b35 commit 47f6e91

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-03-18 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/include/Rcpp/macros/macros.h (END_RCPP_RETURN_ERROR): Add
4+
UNPROTECT to reference nprot, also check for stop_sym
5+
16
2019-03-17 Dirk Eddelbuettel <[email protected]>
27

38
* DESCRIPTION: Release 1.0.1

inst/include/Rcpp/macros/macros.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@
9898
catch (...) { \
9999
return string_to_try_error("c++ exception (unknown reason)"); \
100100
} \
101-
return R_NilValue;
101+
UNPROTECT(nprot); \
102+
return R_NilValue; \
103+
if (stop_sym == R_NilValue) /* never reached but */ \
104+
return R_NilValue; /* suppresses warning*/
102105
#endif
103106

104107
#define Rcpp_error(MESSAGE) throw Rcpp::exception(MESSAGE, __FILE__, __LINE__)

0 commit comments

Comments
 (0)