Calling function with proto in Rinternals.h
ripley@stats.ox.ac.uk
ripley@stats.ox.ac.uk
Sat, 9 Nov 2002 15:06:24 +0000 (GMT)
On 9 Nov 2002, Peter Dalgaard BSA wrote:
> "Timothy H. Keitt" <tkeitt@mail.utexas.edu> 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, 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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._