R CMD check now produceS a WARNING if a package uses DATAPTR. If your
use of the pointer is read-only then you can call DATAPTR_RO instead.
If your code is writing to the data then you will need to change your
code. The only supported way to modify string or vector data is to use
SET_STRING_ELT or SET_VECTOR_ELT. This restriction is necessary to
preserve the integrity of the memory management system.

One exception is that implementations of ALTREP Dataptr methods may
need to return a writable pointer to an internal object. Use
DATAPTR_RW for this purpose. DATAPTR_RW should only be used in this
context.

Best,

luke


--
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
   Actuarial Science
241 Schaeffer Hall                  email:   [email protected]
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to