Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert remaining DATAPTR to DATAPTR_RO #1359

Merged
merged 2 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2025-03-07 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version and date

* inst/include/Rcpp/config.h: Idem

* src/barrier.cpp (dataptr): Replace remaining DATAPTR with
DATAPTR_RO for suitable R greater than 3.5.0

2025-02-11 Dirk Eddelbuettel <edd@debian.org>

* R/Rcpp.package.skeleton.R (Rcpp.package.skeleton): Support optional
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rcpp
Title: Seamless R and C++ Integration
Version: 1.0.14.3
Date: 2025-02-11
Version: 1.0.14.4
Date: 2025-03-07
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org",
comment = c(ORCID = "0000-0001-6419-907X")),
person("Romain", "Francois", role = "aut",
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define RCPP_VERSION_STRING "1.0.14"

// the current source snapshot (using four components, if a fifth is used in DESCRIPTION we ignore it)
#define RCPP_DEV_VERSION RcppDevVersion(1,0,14,3)
#define RCPP_DEV_VERSION_STRING "1.0.14.3"
#define RCPP_DEV_VERSION RcppDevVersion(1,0,14,4)
#define RCPP_DEV_VERSION_STRING "1.0.14.4"

#endif
6 changes: 6 additions & 0 deletions src/barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ SEXP* get_vector_ptr(SEXP x) {

// [[Rcpp::register]]
void* dataptr(SEXP x) {
#if R_VERSION >= R_Version(3,5,0)
// DATAPTR_RO was introduced with R 3.5.0
return const_cast<void*>(DATAPTR_RO(x));
#else
// this will get your wrists slapped under recent R CMD check ...
return DATAPTR(x);
#endif
}

// [[Rcpp::register]]
Expand Down