[Rcpp-devel] Export only C function symbols?

Watal M. Iwasaki heavy.watal at gmail.com
Mon Feb 4 13:44:41 CET 2019


Dear Dirk,

Thank you for the prompt answer.
Currently all the C++ functions with [[Rcpp::export]] tag are exposed to me
by `devtools::load_all()` in the dev process. But some of them are only
useful in other functions and undesired in the interactive environment. So
I wondered if by any chance it is possible to control the level of
exposure. It is not a big problem. Good to know the answer is no.

Best,
Watal


On Mon, Feb 4, 2019 at 8:49 PM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 4 February 2019 at 16:45, Watal M. Iwasaki wrote:
> | Hi all,
> |
> | Adding `[[Rcpp::export]]` tag to a package function leads to the
> following
> | outcomes:
> |
> | 1. Definition of "RcppExport SEXP _mypkg_myfun()" in RcppExports.cpp
> (hence
> | in dll)
> | 2. Definition of "myfun() {.Call(`_mypkg_myfun`)}" in RcppExports.R
> |
> | It is totally fine. Just out of curiosity, is it possible to suppress the
> | latter reaction and get only `_mypkg_myfun` for .Call-ing?
>
> Not currently, and why would you want that?
>
> All those R functions do really is set up .Call() for you -- as well as we
> can with proper registration and no lookup.
>
> You could post-process and remove RcppExports.R, and you could also use
> Rcpp
> and all it does without ever calling compileAttributes().
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>


-- 
Watal M. Iwasaki / 岩嵜 航
SOKENDAI, The Graduate University for Advanced Studies,
Hayama, Kanagawa 240-0193, Japan
+81-46-858-1576
https://heavywatal.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20190204/209c4e10/attachment.html>


More information about the Rcpp-devel mailing list