From duncan@research.bell-labs.com  Sat Nov  9 15:45:35 2002
From: duncan@research.bell-labs.com (Duncan Temple Lang)
Date: Sat, 9 Nov 2002 10:45:35 -0500
Subject: Calling function with proto in Rinternals.h
In-Reply-To: <x2wunmlpyv.fsf@biostat.ku.dk>; from p.dalgaard@biostat.ku.dk on Sat, Nov 09, 2002 at 04:31:20PM +0100
References: <Pine.LNX.4.31.0211091501580.13633-100000@gannet.stats> <x2wunmlpyv.fsf@biostat.ku.dk>
Message-ID: <20021109104535.B3699@jessie.research.bell-labs.com>

Peter Dalgaard BSA wrote:
> ripley@stats.ox.ac.uk writes:
> 
> > > 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 ...).
> 
> (...but tend to forget over time.)
> 
> Not as an extension mechanism, agreed, but it could be there in the
> form of a reference for the entry points that are available to R code.

I mentioned in Boston that we will probably move these to the explicit
registration mechanism for C/Fortran routines so that there is a
single mechanism for both core and package code.  One of the
side-effects of this is that we will get run-time reflectance; so from
within R one will be able to ask for the available exported routines
and any information supplied for them such as the number of arguments,
etc.

I'll hopefully get to this sometime soon and when I can determine that
it doesn't break anything on the different platforms.

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

-- 
_______________________________________________________________

Duncan Temple Lang                duncan@research.bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-3217
700 Mountain Avenue, Room 2C-259  fax:    (908)582-3340
Murray Hill, NJ  07974-2070       
         http://cm.bell-labs.com/stat/duncan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Calling function with proto in Rinternals.h
Duncan Temple Lang