Re: [Rd] R_MakeExternalPtr 'tag' argument

2015-11-14 Thread Simon Urbanek
On Nov 13, 2015, at 3:58 PM, William Dunlap 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 oth

Re: [Rd] R_MakeExternalPtr

2005-10-24 Thread Prof Brian Ripley
On Mon, 24 Oct 2005, TB wrote: > Brian, > > Prof Brian Ripley wrote: >> This is one of those undocumented things (AFAIK): LENGTH applies only >> to 'vectors'. So don't use t and definitely don't set it for others. >> The macro expands to >> >> #define LENGTH(x) ((

Re: [Rd] R_MakeExternalPtr

2005-10-24 Thread TB
Brian, Prof Brian Ripley wrote: > This is one of those undocumented things (AFAIK): LENGTH applies only > to 'vectors'. So don't use t and definitely don't set it for others. > The macro expands to > > #define LENGTH(x) (((VECSEXP) (x))->vecsxp.length) > > What

Re: [Rd] R_MakeExternalPtr

2005-10-24 Thread Prof Brian Ripley
This is one of those undocumented things (AFAIK): LENGTH applies only to 'vectors'. So don't use t and definitely don't set it for others. The macro expands to #define LENGTH(x) (((VECSEXP) (x))->vecsxp.length) What is a vector here? Something which gets actually allocated by allocVect