Skip to content

Commit

Permalink
END_CPP11_EX()
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 7, 2024
1 parent d045ccf commit aa3225d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inst/include/cpp11/declarations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ T& unmove(T&& t) {
SEXP err = R_NilValue; \
char buf[CPP11_ERROR_BUFSIZE] = ""; \
try {
#define END_CPP11 \
#define END_CPP11_EX(RET) \
} \
catch (cpp11::unwind_exception & e) { \
err = e.token; \
Expand All @@ -59,4 +59,5 @@ T& unmove(T&& t) {
} else if (err != R_NilValue) { \
R_ContinueUnwind(err); \
} \
return R_NilValue;
return RET;
#define END_CPP11 END_CPP11_EX(R_NilValue)

0 comments on commit aa3225d

Please sign in to comment.