Re: [Rd] [External] Re: changes in R-devel and zero-extent objects in Rcpp

2024-06-09 Thread Hiroaki Yutani
(Mainly reply to self) I found there's a new API VECTOR_PTR_RO. Thanks for adding this! https://github.com/r-devel/r-svn/commit/d499fab95b1ba23ee7842293030d4af1e69ae0fe Best, Yutani 2024年6月9日(日) 14:13 Hiroaki Yutani : > Sorry to ask about a bit drifted topic, but will there be an alternative >

Re: [Rd] [External] Re: changes in R-devel and zero-extent objects in Rcpp

2024-06-08 Thread Hiroaki Yutani
Sorry to ask about a bit drifted topic, but will there be an alternative API to DATAPTR? > DATAPTR is not in the API and can't be at least in this form I believe it's vital for ALTREP to return the pointer to the expanded version of a SEXP just like the implementation in base R does [1]. At least

Re: [Rd] [External] Re: changes in R-devel and zero-extent objects in Rcpp

2024-06-08 Thread luke-tierney--- via R-devel
On Sat, 8 Jun 2024, Ben Bolker wrote: The ASAN errors occur *even if the zero-length object is not actually accessed*/is used in a perfectly correct manner, i.e. it's perfectly legal in base R to define `m <- numeric(0)` or `m <- matrix(nrow = 0, ncol = 0)`, whereas doing the equivalent in Rc