Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Automatically register init functions for RcppModules (closes #704)#705

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eddelbuettel merged 2 commits intomasterfromfeature/module-routine-registraiton
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
compileAttributes only after all code is generated
  • Loading branch information
@jjallaire
jjallaire committedJun 2, 2017
commit7f872ca3c2b273857aeabfc466d872251433f646
1 change: 1 addition & 0 deletionsChangeLog
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
2017-06-02 JJ Allaire <jj@rstudio.com>

* src/attributes.cpp: Automatically register init functions for RcppModules
* R/Rcpp.package.skeleton.R: compileAttributes only after all code is generated

2017-06-01 JJ Allaire <jj@rstudio.com>

Expand Down
10 changes: 5 additions & 5 deletionsR/Rcpp.package.skeleton.R
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -138,18 +138,13 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(),
file.copy(file, src)
message(" >> copied ", file, " to src directory" )
}
compileAttributes(root)
}

if (example_code) {
if (isTRUE(attributes)) {
file.copy(file.path( skeleton, "rcpp_hello_world_attributes.cpp"),
file.path( src, "rcpp_hello_world.cpp"))
message(" >> added example src file using Rcpp attributes")
compileAttributes(root)
message(" >> compiled Rcpp attributes")
message(" >> do NOT modify by hand either RcppExports.cpp or ",
"RcppExports.R")
} else {
header <- readLines(file.path(skeleton, "rcpp_hello_world.h"))
header <- gsub("@PKG@", name, header, fixed = TRUE)
Expand DownExpand Up@@ -218,6 +213,11 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(),
rm("rcpp_hello_world", envir = env)
}

if (attributes) {
compileAttributes(root)
message(" >> compiled Rcpp attributes ")
}

Copy link
Member

@eddelbuetteleddelbuettelJun 2, 2017
edited
Loading

Choose a reason for hiding this comment

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

Maybe I am short of coffee butif (attributes) { relies onattributes==TRUE. We could have a case ofmodules=TRUE (as in#704)and alsoattributes=FALSE, no? Needless complication?

invisible(NULL)
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp