Skip to content

Commit aa3225d

Browse files
committed
END_CPP11_EX()
r-lib/cpp11#421
1 parent d045ccf commit aa3225d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

inst/include/cpp11/declarations.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ T& unmove(T&& t) {
4343
SEXP err = R_NilValue; \
4444
char buf[CPP11_ERROR_BUFSIZE] = ""; \
4545
try {
46-
#define END_CPP11 \
46+
#define END_CPP11_EX(RET) \
4747
} \
4848
catch (cpp11::unwind_exception & e) { \
4949
err = e.token; \
@@ -59,4 +59,5 @@ T& unmove(T&& t) {
5959
} else if (err != R_NilValue) { \
6060
R_ContinueUnwind(err); \
6161
} \
62-
return R_NilValue;
62+
return RET;
63+
#define END_CPP11 END_CPP11_EX(R_NilValue)

0 commit comments

Comments
 (0)