[Rd] (PR#11054) "Writing R Extensions": bad example with CAR /

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Mar 31 20:40:18 CEST 2008


On Mon, 31 Mar 2008, Simon Anders wrote:

> Dear Prof Ripley,
>
> Prof Brian Ripley wrote:

>> But it is not taken 'verbatim from src/main/print.c' (at least not in that 
>> version of R), and the code is not run with USE_RINTERNALS defined when 
>> write-barrier checking is enabled.
>> 
>> The example has been updated to match the current code in 2.7.0 alpha.
>
> I just assumed that it is copied verbatim without checking because it says so 
> in the sentence above the code ("As a more comprehensive example of 
> constructing an R call in C code and evaluating, consider the following 
> fragment of printAttributes in src/main/print.c.")

That was true once, long ago.

> I don't understand, however, what you mean by stating that USE_RINTERNALS is 
> not needed (and I have to admit that I have no knowledge of this 
> 'write-barrier checking' mechanism.)

I didn't say 'USE_RINTERNALS is not needed' for your code: I said it was 
not used for the code that was run.

...

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list