Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Shield around parameters in Rcpp::interfaces (fixes #712) #713

Merged
merged 1 commit into from Jun 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2017-06-14 JJ Allaire <jj@rstudio.com>

* src/attributes.cpp: Add Shield around parameters in Rcpp::interfaces

2017-06-07 Dirk Eddelbuettel <edd@debian.org>

* README.md: Use alternates for img.shields.io GPL-2+ badges
Expand Down
1 change: 1 addition & 0 deletions inst/NEWS.Rd
Expand Up @@ -24,6 +24,7 @@
addressing \ghit{702}).
\item Automatically register init functions for Rcpp Modules (\ghpr{705}
addressing \ghit{704}).
\item Add Shield around parameters in Rcpp::interfaces (\ghit{712}).
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/attributes.cpp
Expand Up @@ -2172,7 +2172,7 @@ namespace attributes {

const std::vector<Argument>& args = function.arguments();
for (std::size_t i = 0; i<args.size(); i++) {
ostr() << "Rcpp::wrap(" << args[i].name() << ")";
ostr() << "Shield<SEXP>(Rcpp::wrap(" << args[i].name() << "))";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make this Rcpp::Shield for consistency with Rcpp::wrap but I see other identifiers without the namespace qualifier.

if (i != (args.size()-1))
ostr() << ", ";
}
Expand Down