From simon.urbanek at r-project.org  Sat Nov 14 14:43:04 2015
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Sat, 14 Nov 2015 08:43:04 -0500
Subject: [Rd] R_MakeExternalPtr 'tag' argument
In-Reply-To: <CAF8bMca-F4pHPdmRMCZ2Wu+_8UbHzq_BV+8+8fvFknS5XghhuA@mail.gmail.com>
References: <CAF8bMca-F4pHPdmRMCZ2Wu+_8UbHzq_BV+8+8fvFknS5XghhuA@mail.gmail.com>
Message-ID: <2D5AFF6B-D196-4583-A355-DAC03DBCF7D0@r-project.org>


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

> 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?
> 

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



[Rd] R_MakeExternalPtr 'tag' argument
Simon Urbanek