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

2023-09-23 Thread Ralf Stubner
On Sat, Sep 23, 2023 at 7:30 PM Ivan Krylov 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 disabl

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

2023-09-23 Thread Ralf Stubner
On Sat, Sep 23, 2023 at 10:00 AM Duncan Murdoch wrote: > I don't know the answer here, but section 6.16 of WRE suggests that you > could explicitly make your functions visible even if they default to > invisible. Thanks Duncan. Unfortunately at least in my tests the visibility settings did not a

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

2023-09-23 Thread Ivan Krylov
В Sat, 23 Sep 2023 08:42:25 + Ralf Stubner пишет: > ?Random.user describes a way to hook a user- defined > RNG into R. However, it looks like these two things are not > compatible, i.e. `user_unif_rand` et al. are not found, if dynamic > symbols are not allowed. You're right! Looking at the

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

2023-09-23 Thread Duncan Murdoch
On 23/09/2023 4:42 a.m., Ralf Stubner wrote: Hi everybody, Section 5.4 of WRE suggests to use `R_useDynamicSymbols(dll, FALSE);` when registering C/C++ routines in R packages, and Rcpp does so automatically. ?Random.user describes a way to hook a user- defined RNG into R. However, it looks like