From lgautier at gmail.com  Tue Feb 19 13:40:14 2008
From: lgautier at gmail.com (Laurent Gautier)
Date: Tue, 19 Feb 2008 13:40:14 +0100
Subject: [Rd] level of mutability for the type of a SEXP
Message-ID: <27d1e6020802190440p4f51b6bai53010d1dec33c3a@mail.gmail.com>

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



[Rd] level of mutability for the type of a SEXP
Laurent Gautier