On Mar 16, 2005, at 1:34 PM, Vadim Ogranovich wrote:

* suppose that inside a C function I have a SEXP vector x of integers
and I want to increment each element by one. I understand that

Please correct me if I'm wrong, but I thought that the write barrier applies to assignments of SEXP values only (from the doc: "... must be used for all assignments of SEXP pointers ..." - note it says "of", not "to"). When dealing with REAL/INTEGER, I believe it's still safe to use INTEGER(x)[0]=... IMHO that's logical, too, because primitive types have no 'age' to be inherited when using ggc.


Cheers,
Simon

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to