Re: [Rd] bug in partial matching of attribute names

2007-02-14 Thread Tony Plate
Prof Brian Ripley wrote: On Tue, 13 Feb 2007, Tony Plate wrote: Ok, thanks for the news of a fix in progress. BTW, your suggested fix is incorrect. Consider having an exact match after two partial matches in the list of attributes. oops. yes. On the topic of the names attribute

Re: [Rd] bug in partial matching of attribute names

2007-02-13 Thread Prof Brian Ripley
It happens that I was looking at this yesterday (in connection with encodings on CHARSXPs) and have a fix in testing across CRAN right now. As for names, as you will know from reading 'R Internals' the names can be stored in more than one place, which is why it has to be treated specially. On

Re: [Rd] bug in partial matching of attribute names

2007-02-13 Thread Tony Plate
Ok, thanks for the news of a fix in progress. On the topic of the names attribute being treated specially, I wonder if the do_attr() function might treat it a little too specially. As far as I can tell, the loop in the first large block code in do_attr() (attrib.c), which begins /* try

Re: [Rd] bug in partial matching of attribute names

2007-02-13 Thread Prof Brian Ripley
On Tue, 13 Feb 2007, Tony Plate wrote: Ok, thanks for the news of a fix in progress. BTW, your suggested fix is incorrect. Consider having an exact match after two partial matches in the list of attributes. On the topic of the names attribute being treated specially, I wonder if the

[Rd] bug in partial matching of attribute names

2007-02-12 Thread Tony Plate
There looks to be a bug in do_attr() (src/main/attrib.c): incorrect partial matches of attribute names can be returned when there are an odd number of partial matches. E.g.: x - c(a=1,b=2) attr(x, abcdef) - 99 attr(x, ab) [1] 99 attr(x, abc) - 100 attr(x, ab) # correctly returns NULL