Rev 45233 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/base/man/getCallingDLL.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2008 R Core Development Team% Distributed under GPL 2 or later\name{getCallingDLL}\alias{getCallingDLL}\alias{getCallingDLLe}\title{Compute DLL for Native Interface Call}\description{This is an internal function that is called from \R's C code todetermine the enclosing name space of a\code{.C}/\code{.Call}/\code{.Fortran}/\code{.External} call which hasno \code{PACKAGE} argument. If the call has been made from a functionwithin a name space, then we can find the DLL associated with thatname space. The purpose of this is to avoid having to use the\code{PACKAGE} argument in these native calls and so better supportversions of packages.This is an internal function that may be migrated to internal Ccode in the future and so should not be used by \R programmers.}\usage{getCallingDLL(f = sys.function(-1), doStop = FALSE)getCallingDLLe(e)}\arguments{\item{f}{the function whose name space and DLL are to be found.By default, this is the current function being called whichis the one in which the native routine is being invoked.}\item{doStop}{a logical value indicating whether failure to finda name space and/or DLL is an error (\code{TRUE}) or not(\code{FALSE}). The default is \code{FALSE} so that when this iscalled because there is no \code{PACKAGE} argument in a\code{\link{.C}}, \code{\link{.Call}}, \code{\link{.Fortran}},\code{\link{.External}} call, no error occurs and the regular lookupis performed by searching all DLLs in order.}\item{e}{an environment.}}\seealso{\code{\link{.C}},\code{\link{.Call}},\code{\link{.Fortran}},\code{\link{.External}}}\examples{if(exists("ansari.test"))getCallingDLL(ansari.test)}\keyword{internal}