[R-pkg-devel] User defined RNG and code registration.

Ralf Stubner r@||@@tubner @end|ng |rom gm@||@com
Sat Sep 23 23:37:33 CEST 2023


On Sat, Sep 23, 2023 at 7:30 PM Ivan Krylov <krylov.r00t using gmail.com> wrote:
> You're right! Looking at the code, if R_useDynamicSymbols(dll, FALSE)
> has been called for a DLL, the branch that calls dlsym() or
> GetProcAddress() to find symbols from that library by their shared
> object symbol names gets completely disabled; only the registered
> function names known to R matter at this point.

Thanks Ivan for the investigations! That explains my experiences.

> It sounds unsatisfying, but if you register your user_unif_rand
> function with the right name and any of the ABIs supported by R, it
> sounds like it should work as long as you never call it using the
> .Call/.C/.Fortran ABI it's registered for.

That is indeed unsatisfying, but looks like the best workaround for now.

Ralf



More information about the R-package-devel mailing list