Re: [Rd] ALTREP: Bug reports

2019-05-17 Thread 介非王
Thank you very much for your answer. If I understand it correctly, for an ALTREP class, a non-deep copy only creates a new ALTREP object but refers to the same underlying SEXP as the old ALTREP object has, is it correct? But since they all share the same underlying SEXP, will change of the value in

Re: [Rd] ALTREP: Bug reports

2019-05-16 Thread Gabriel Becker
Jiefei, Inline. On Thu, May 16, 2019 at 2:30 PM 介非王 wrote: > Hello Luke and Gabriel, > > Thank you very much for your quick responses. The explanation of STDVEC is > very helpful and I appreciate it! For the wrapper, I have a few new > questions. > > > 1. Like Luke said a mutable object is not

Re: [Rd] ALTREP: Bug reports

2019-05-16 Thread 介非王
Hi, Sorry for overflow the mailbox. Please ignore the second question, I misunderstand Gabriel answer. Best, Jiefei On Thu, May 16, 2019 at 5:29 PM 介非王 wrote: > Hello Luke and Gabriel, > > Thank you very much for your quick responses. The explanation of STDVEC is > very helpful and I appreciat

Re: [Rd] ALTREP: Bug reports

2019-05-16 Thread 介非王
Hello Luke and Gabriel, Thank you very much for your quick responses. The explanation of STDVEC is very helpful and I appreciate it! For the wrapper, I have a few new questions. 1. Like Luke said a mutable object is not possible. However, I noticed that there is one extra argument *deep* in the

Re: [Rd] ALTREP: Bug reports

2019-05-16 Thread Gabriel Becker
Hi Jiefei, Thanks for tryingout the ALTREP stuff and letting us know how it is going. That said I don't think either of these are bugs, per se, but rather a misunderstanding of the API. Details inline. On Thu, May 16, 2019 at 11:57 AM 介非王 wrote: > Hello, > > I have encountered two bugs when u

[Rd] ALTREP: Bug reports

2019-05-16 Thread 介非王
Hello, I have encountered two bugs when using ALTREP APIs. 1. STDVEC_DATAPTR >From RInternal.h file it has a comment: /* ALTREP support */ > void *(STDVEC_DATAPTR)(SEXP x); However, this comment might not be true, the easiest way to verify it is to define a C++ function: void C_testFunc(SEX