Message-ID: <2D5AFF6B-D196-4583-A355-DAC03DBCF7D0@r-project.org>
Date: 2015-11-14T13:43:04Z
From: Simon Urbanek
Subject: R_MakeExternalPtr 'tag' argument
In-Reply-To: <CAF8bMca-F4pHPdmRMCZ2Wu+_8UbHzq_BV+8+8fvFknS5XghhuA@mail.gmail.com>
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