From ripley at stats.ox.ac.uk  Wed Nov 21 16:18:31 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 21 Nov 2007 15:18:31 +0000 (GMT)
Subject: [Rd] (PR#10437) segfault on functions with 'source' attribute
In-Reply-To: <20071120103028.2A510283416B@mail.pubhealth.ku.dk>
References: <20071120103028.2A510283416B@mail.pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.64.0711211516100.15091@gannet.stats.ox.ac.uk>

On Tue, 20 Nov 2007, karl at huftis.org wrote:

> For the record: The reason I used attr(myfun, "source") = FALSE, is that I
> misread the example 'Tidying R Code' in 'Writing R Extensions', which calls
> for attr(myfun, "source") = NULL.
>
> Somehow setting 'source' to FALSE seems more natural to me than
> setting it to NULL.

attr(myfun, "source") <- NULL does not 'set it to NULL', it removes the 
attribute.

> ripley at stats.ox.ac.uk:
>
>> I am not sure why you would want to do that, but the C code does assume
>> source attributes were put there by R, and changing tests from !isNull to
>> isString in a few places will fix that.
>
>

-- 
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



[Rd] (PR#10437) segfault on functions with 'source' attribute
Prof Brian Ripley