Can we use "ImportC" used yet?
data.pulverizer at gmail.com
Sun Oct 24 05:54:43 UTC 2021
On Saturday, 23 October 2021 at 17:42:32 UTC, data pulverizer
> On Saturday, 23 October 2021 at 16:39:08 UTC, data pulverizer
>> this(R_xlen_t n)
>> SEXPTYPE _real_ = SEXPTYPE.REALSXP;
>> _data = protect(allocVector(_real_, n));
> Looking at that code, I realise didn't need the un/protect.
Actually it's more complicated than that. On construction I do
need to call `protect` and call `unprotect` or `unprotect_ptr`
when the function in which the object is created returns. At the
moment, I'm not even sure (or more likely do not think) that it
is suitable to call it as part of the destructor. Anyway, that's
More information about the Digitalmars-d-learn