[Rd] declarations in non-exported headers and embedding R

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sun Aug 24 19:19:20 MEST 2003


Joe Conway <mail at joeconway.com> writes:

> Hello,
> 
> I've been using R embedded in PL/R (R procedural language handler for
> PostgreSQL, http://www.joeconway.com/plr/) very successfully for
> several months now. A sincere "thank you" goes to the R development
> team for such a great product.
> 
> I have a question I'm hoping someone here can help me with. In order
> to get the required functionality out of PL/R, I've had to resort to
> using some defines and declarations that are only available in
> non-exported headers. There is precedent, of a sort, for most of what
> I've used in the tests/Embedding source. Below I'll present the header
> code I've used, where it comes from, why I've used it, and where I saw
> it used in tests/Embedding.
> 
> My question is whether there is equivalent exported functionality that
> I'm missing? Or if not, would a patch be accepted that moves this
> functionality to an exported header?

Some of it is certainly a well-known shortcoming of the set of
exports. E.g. tcltk.c has had

/* From Parse.h -- must find better solution: */
#define PARSE_NULL              0
#define PARSE_OK                1
#define PARSE_INCOMPLETE        2
#define PARSE_ERROR             3
#define PARSE_EOF               4

SEXP R_ParseVector(SEXP, int, int *);

for a couple of years (not that it gets much use since that interface
is mostly in the opposite direction). Adding an Rembedding.h or so could
be a good idea. However, it's not really my field of expertise and a
couple ofother R core members might have strong opinions on what
should be made available and how...

        -p

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list