Skip to content
Prev 754 / 10988 Next

[Rcpp-devel] Resolving NativeSymbolInfos from Rcpp

Le 09/06/10 03:04, Davor Cubranic a ?crit :
Hi,

I see

 > getNativeSymbolInfo( "loess_raw" )
$name
[1] "loess_raw"

$address
<pointer: 0x103092820>
attr(,"class")
[1] "NativeSymbol"

$package
DLL name: stats
Filename:
 
/Library/Frameworks/R.framework/Resources/library/stats/libs/x86_64/stats.so
Dynamic lookup: FALSE

$numParameters
[1] 24

attr(,"class")
[1] "CRoutine"         "NativeSymbolInfo"

So I'd probably look into the implementation of getNativeSymbolInfo 
(R_getSymbol in file Rdynload.c) and figure out what sort of pointer is 
the $address here. once you know that I suppose you can use it.

There is a good chance the pointer is a DL_FUNC. You probably want to 
look at the Rdynpriv.h file too.

Maybe this question is more suited to R-devel.

Romain