Re: [Rd] External pointers and changing SEXPTYPE

2013-12-16 Thread Krzysztof Mlynarczyk
: > On 16/12/2013 11:07, Krzysztof Mlynarczyk wrote: >> >> As far as I understood the documentation, external pointer should be >> automatically protected from gc when returned to environment. The > > > Yes, but you didn't give us the complete reproducible e

Re: [Rd] External pointers and changing SEXPTYPE

2013-12-16 Thread Krzysztof Mlynarczyk
->ans, and then UNPROTECT_PTR or so > in the finalizer. > > -pd > > On 16 Dec 2013, at 04:11 , Krzysztof Mlynarczyk wrote: > >> Dear Developers, >> >> >> I've been struggling through writing R extension in C. I've been using >> an external

[Rd] External pointers and changing SEXPTYPE

2013-12-15 Thread Krzysztof Mlynarczyk
Dear Developers, I've been struggling through writing R extension in C. I've been using an external pointer to store my data (please see sample below). I encountered a very weird erroneous behaviour: when I tried to use my external pointer to a structure holding several types of data, including S