search for: sexp_address

Displaying 1 result from an estimated 1 matches for "sexp_address".

Did you mean: set_address
2008 Jan 29
2
Problem with new("externalptr")
...consecutive calls to new("environment") create different instances: > new("environment") <environment: 0xc89d10> > new("environment") <environment: 0xc51248> But for new("externalptr"), I had to use the following C routine: SEXP sexp_address(SEXP s) { SEXP ans; char buf[40]; snprintf(buf, sizeof(buf), "%p", s); PROTECT(ans = NEW_CHARACTER(1)); SET_STRING_ELT(ans, 0, mkChar(buf)); UNPROTECT(1); return ans; } Then I get: > .Call("sexp_address", new(&q...