From d32f6d80a28a9e7e899f9384e514667b5dd36986 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Tue, 3 Dec 2024 14:37:00 -0500 Subject: [PATCH 1/3] Conditionally define `R_NO_REMAP` and `STRICT_R_HEADERS` --- inst/include/cpp11/R.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inst/include/cpp11/R.hpp b/inst/include/cpp11/R.hpp index e461298f..01dbad0b 100644 --- a/inst/include/cpp11/R.hpp +++ b/inst/include/cpp11/R.hpp @@ -8,8 +8,14 @@ #endif #endif +#ifndef R_NO_REMAP #define R_NO_REMAP +#endif + +#ifndef STRICT_R_HEADERS #define STRICT_R_HEADERS +#endif + #include "R_ext/Boolean.h" #include "Rinternals.h" #include "Rversion.h" From fc80872a6342829b77f7f9c92927d9f53e1796c6 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Tue, 3 Dec 2024 14:45:01 -0500 Subject: [PATCH 2/3] NEWS bullet --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index ae52d697..16f64573 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # cpp11 (development version) +* `R_NO_REMAP` and `STRICT_R_HEADERS` are now conditionally defined only if they + have not already been defined elsewhere. This is motivated by the fact that + `R_NO_REMAP` is becoming the default for C++ code in R 4.5.0 (#TODO). + * Because cpp11 now requires R >=4.0.0 and `R_UnwindProtect()` is always available, `HAS_UNWIND_PROTECT` is no longer useful. Please avoid using it, as we'd like to remove it in the future (#411). From aafeac5f7d8facb6b620b0b1a3a16ec7e09aa5d8 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Tue, 3 Dec 2024 15:03:46 -0500 Subject: [PATCH 3/3] Fill in number --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 16f64573..39f3d4c1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ * `R_NO_REMAP` and `STRICT_R_HEADERS` are now conditionally defined only if they have not already been defined elsewhere. This is motivated by the fact that - `R_NO_REMAP` is becoming the default for C++ code in R 4.5.0 (#TODO). + `R_NO_REMAP` is becoming the default for C++ code in R 4.5.0 (#410). * Because cpp11 now requires R >=4.0.0 and `R_UnwindProtect()` is always available, `HAS_UNWIND_PROTECT` is no longer useful. Please avoid using it,