Re: [Rd] Feature request: put NewEnvironment and R_NewhashedEnv into API

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 15 Nov 2006 - 06:20:06 GMT

On Tue, 14 Nov 2006, Seth Falcon wrote:

> Hi,
>
> I would like to be able to create new environments from package C
> code. AFAICT, this isn't allowed since both NewEnvironment and
> R_NewHashedEnv are declared in Defn.R.

NewEnvironment is currently exposed as Rf_NewEnvironment. R_NewHashedEnv is currrently hidden, but I'll unhide it. It does not need a further prefix.

> If exposing this isn't controvertial, I would submit a patch.
> However, I'm not sure where the declarations should go (Rdefines.h?)
> and whether they need to change to Rf_*.

Rdefnes.h is a compatibility header, only used by those who want S4-compatible macros covering some of the definitions in Rinternals.h. Definitions can be moved from Defn.h to Rinternals.h with little trouble as the former includes the latter (you have to be careful about R_NO_REMAP, so declare them with Rf_).

If this is not controversial (I don't know if it is) and you want to submit a patch there should be a description in R-exts, I think somewhere in section 5.7 ('Handling R Objects in C').

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu Nov 16 02:34:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 16 Nov 2006 - 04:30:45 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.