[Rd] level of mutability for the type of a SEXP
Laurent Gautier
lgautier at gmail.com
Tue Feb 19 13:40:14 CET 2008
Dear list,
I am writing C code to interface with R, and I would like to know the
level of mutability for the type of a SEXP.
I see that there is a macro/function TYPEOF(), and that it can be used
as an l-value, as well as a macro/function SET_TYPEOF().
My question is "should the type be considered immutable, or it can it
change after the SEXP has been created and used for a while ?".
I understand that a call to TYPEOF will not perform any conversion,
and my question is only about being sure that once the type of a given
SEXP is set it cannot change.
Laurent
More information about the R-devel
mailing list