Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGenerate C++ native routines with underscore prefix #725
Conversation
Avoid export from package when standard [[ alpha ]] exportPattern is used in NAMESPACE
|
Note that if R core decides to stop auto-exporting the registered native symbols then we could revert the use of the underscore prefix. That's something that couldn't happen until the release of R 3.5 though. |
Avoid export from package when standard [[ alpha ]] exportPattern is used in NAMESPACE
This addresses #723.
Note that this change does introduce the use of reserved (but not invalid) C/C++ symbols (the underscore prefix). We made some effort last year I recall to remove such symbols from generated attributes code, presumably to get a clean bill of health from linting tools?
I've tried this with Rcpp::interfaces(r, cpp) as well as with the tic.drat package (package with dot in the name). I've also tried it with packages that include their own non-generated native functions. Also of course have run the Rcpp tests. Even still, this will change the code in every existing RcppExports.* file so is worthy of some extra review/caution/testing.