File tree Expand file tree Collapse file tree 4 files changed +19
-10
lines changed
Expand file tree Collapse file tree 4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 66 have not already been defined elsewhere. This is motivated by the fact that
77 ` R_NO_REMAP ` is becoming the default for C++ code in R 4.5.0 (#410 ).
88
9- * Because cpp11 now requires R >=4.0.0 and ` R_UnwindProtect() ` is always
10- available, ` HAS_UNWIND_PROTECT ` is no longer useful. Please avoid using it,
11- as we'd like to remove it in the future (#411 ).
12-
13- * Because cpp11 now requires R >=4.0.0 and ALTREP is always available, the
14- ` cpp11/altrep.hpp ` file is no longer useful. Please avoid using ` #include "cpp11/altrep.hpp" ` and ` HAS_ALTREP ` as we'd like to remove them in the
15- future (#411 ).
9+ * Because cpp11 now requires R >=4.0.0, a number of previously optional tools
10+ are now always available, allowing us to remove some dead code. In
11+ particular:
12+
13+ * ` R_UnwindProtect() ` is always available, so the defines ` HAS_UNWIND_PROTECT `
14+ and ` CPP11_UNWIND ` are no longer useful.
15+
16+ * ALTREP is always available, so the file ` cpp11/altrep.hpp ` and the define
17+ ` HAS_ALTREP ` are no longer useful.
18+
19+ We would like to remove the dead code regarding these tools in the future, so
20+ we ask that you please remove usage of them from your own packages (#411 ).
1621
1722* cpp11 now requires R >=4.0.0, in line with the
1823 [ tidyverse version policy] ( https://www.tidyverse.org/blog/2019/04/r-version-support/ ) (#411 ).
Original file line number Diff line number Diff line change 22
33// It would be nice to remove this since all supported versions of R have ALTREP, but
44// some groups rely on both this `#define` and `altrep.hpp` itself existing, like arrow:
5- // https://github.com/apache/arrow/blob/50f2d6e04e8323119d4dd31506827ee398d6b8e4/r/src/altrep.cpp#L27-L29
5+ // https://github.com/r-lib/cpp11/issues/413
66#define HAS_ALTREP
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ T& unmove(T&& t) {
3030}
3131} // namespace cpp11
3232
33+ // We would like to remove this, since all supported versions of R now support proper
34+ // unwind protect, but some groups rely on it existing, like textshaping:
35+ // https://github.com/r-lib/cpp11/issues/414
36+ #define CPP11_UNWIND R_ContinueUnwind (err);
37+
3338#define CPP11_ERROR_BUFSIZE 8192
3439
3540#define BEGIN_CPP11 \
Original file line number Diff line number Diff line change 1616
1717// We would like to remove this, since all supported versions of R now support proper
1818// unwind protect, but some groups rely on it existing, like arrow and systemfonts
19- // https://github.com/r-lib/systemfonts/blob/02b567086379edaca1a9b3620ad6776e6bb876a7/src/utils.h#L11
20- // https://github.com/apache/arrow/blob/50f2d6e04e8323119d4dd31506827ee398d6b8e4/r/src/safe-call-into-r-impl.cpp#L49
19+ // https://github.com/r-lib/cpp11/issues/412
2120#define HAS_UNWIND_PROTECT
2221
2322#ifdef CPP11_USE_FMT
You can’t perform that action at this time.
0 commit comments