.External). Additionally, it returns the address of the symbol and this can be passed to other C routines. Specifically, this provides a way to explicitly share symbols between different dynamically loaded package libraries. Also, it provides a way to query where symbols were resolved, and aids diagnosing strange behavior associated with dynamic resolution.
getNativeSymbolInfo(name, PACKAGE, unlist = TRUE, withRegistrationInfo = FALSE)
"base", we search in the R executable itself.
TRUEand the number of symbol names in
nameis one, then the
NativeSymbolInfoobject is returned. If it is
FALSE, then a list of
NativeSymbolInfoobjects is returned. This is ignored if the number of symbols passed in
nameis more than one. To be compatible with earlier versions of this function, this defaults to
TRUE, to return information that was registered with R about the symbol and its parameter types if such information is available, or if
FALSEto return just the address of the symbol.
NativeSymbolInfoelements whose elements can be indexed by the elements of
namein the call. Each
NativeSymbolInfoobject is a list containing the following elements:
FALSE, this is the native memory address of the symbol which can be used to invoke the routine, and also to compare with other symbol addresses. This is an external pointer object and of class
TRUEand registration information is available for the symbol, then this is an object of class
RegisteredNativeSymboland is a reference to an internal data type that has access to the routine pointer and registration information. This too can be used in calls to
PACKAGEargument in the different native interface functions.
ExternalRoutinecorresponding to the R interface by which it should be invoked. If any of the symbols is not found, an error is raised. If
namecontains only one symbol name and
TRUE, then the single
NativeSymbolInfois returned rather than the list containing that one element.
.Call, etc.). If the symbol has been explicitly registered by the DLL in which it is contained, information about the number of arguments and the interface by which it should be called will be returned. Otherwise, a generic native symbol object is returned.