Skip to content

R_MakeExternalPtr 'tag' argument

2 messages · William Dunlap, Simon Urbanek

#
Most packages that use the R_MakeExternalPtr function use
Rf_install("pkgSpecificString") for its 'tag' argument (if they don't use
R_NilValue).  A few use Rf_mkChar("pkgSpecificString").

Is there any reason to prefer one over the other?

Bill Dunlap
TIBCO Software
wdunlap tibco.com
#
On Nov 13, 2015, at 3:58 PM, William Dunlap <wdunlap at tibco.com> wrote:

            
I think Luke is the definite authority, but IMHO using CHARSXP is illegal since you can only store CHARSXP in STRSXP. R-exts allows "ordinary R objects" so presumably mkString() would be legal.

Cheers,
Simon