From simon.urbanek at r-project.org  Wed Mar 16 19:56:37 2005
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed Mar 16 19:56:58 2005
Subject: Write Barrier: was: [Rd] function-like macros undefined
In-Reply-To: <C698D707214E6F4AB39AB7096C3DE5A58FF45A@phost015.EVAFUNDS.intermedia.net>
References: <C698D707214E6F4AB39AB7096C3DE5A58FF45A@phost015.EVAFUNDS.intermedia.net>
Message-ID: <745ED15D-F32A-4216-A268-2BCBFA828858@r-project.org>

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


Write Barrier: was: [Rd] function-like macros undefined
Simon Urbanek