Displaying 2 results from an estimated 2 matches for "new_extptr".
2018 Mar 18
3
`@<-` modify its argument when slot is externalptr
Dear all,
I am confused about the inconsistent behaviors of `@<-` operator when
used in different ways. Consider the following example:
library(inline)
# Function to generate an externalptr object with random address
new_extptr <- cfunction(c(), '
SEXP val = PROTECT(ScalarLogical(1));
SEXP out = PROTECT(R_MakeExternalPtr(&val, R_NilValue, val));
UNPROTECT(2);
return(out);
')
setClass("S4ClassHoldingExtptr", contains = "externalptr")
subs_extptr_1 <- function(x)...
2018 Mar 18
0
`@<-` modify its argument when slot is externalptr
...18 Mar 2018, Jialin Ma wrote:
> Dear all,
>
> I am confused about the inconsistent behaviors of `@<-` operator when
> used in different ways. Consider the following example:
>
> library(inline)
>
> # Function to generate an externalptr object with random address
> new_extptr <- cfunction(c(), '
> SEXP val = PROTECT(ScalarLogical(1));
> SEXP out = PROTECT(R_MakeExternalPtr(&val, R_NilValue, val));
> UNPROTECT(2);
> return(out);
> ')
>
> setClass("S4ClassHoldingExtptr", contains = "externalptr")
>
&...