Calling function with proto in Rinternals.h
Sat, 9 Nov 2002 15:06:24 +0000 (GMT)

On 9 Nov 2002, Peter Dalgaard BSA wrote:

> "Timothy H. Keitt" <> writes:
> > (Tried this query on r-help with no luck, maybe someone here can help?)
> >
> > I would like to call the 'RFinalizerEx' function that appears in
> > Rinternals.h using ".Call". It worked for me in the past, but now I get
> > an error message something like: 'call function name not in call table'.
> > I'm using the 1.6.1 rpm from CRAN. Anyone know what's going on? Thanks.
> I don't see a function of that name in there?
> $ find BUILD/include -name *.[ch] | xargs grep FinalizerEx
> BUILD/include/Rinternals.h:void R_RegisterFinalizerEx(SEXP s,
>  SEXP fun, Rboolean onexit);
> BUILD/include/Rinternals.h:void R_RegisterCFinalizerEx(SEXP s,
>  R_CFinalizer_t fun, Rboolean onexit);
> However, you can't find those with is.loaded either. I'm getting rusty
> on the linker issues, but I don't think you can expect to call just
> any function in the C level interface using .Call. (Perhaps we need
> another section in "Writing R Extensions"? -- I couldn't find a clear
> indication of what, if any, functions are getting exported to .C and
> friends from the main binary and by which mechanism.)

It's file src/appl/ROUTINES which is used to generate the appropriate
headers: see src/appl/README.  Under Unix this is done in src/unix.

I don't think it should be in R-exts.texi, as only R-core can extend R
this way (and those who do so know how to do so ...).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: