Skip to content

Commit b9ce780

Browse files
committed
merge from master
Merge remote-tracking branch 'origin/master' into feature/xptr-improvements Conflicts: ChangeLog inst/NEWS.Rd
2 parents bbba4a8 + 7ed45ef commit b9ce780

File tree

7 files changed

+356
-239
lines changed

7 files changed

+356
-239
lines changed

ChangeLog

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
2014-02-02 JJ Allaire <jj@rstudio.org>
1+
2014-02-03 JJ Allaire <jj@rstudio.org>
22

33
* inst/include/Rcpp/XPtr.h: Improvements to XPtr including new
44
checked_get and release functions and improved behavior (throw
@@ -7,6 +7,19 @@
77
* inst/unitTests/runit.XPTr.R: tests for XPtr improvements.
88
* inst/unitTests/cpp/XPtr.cpp: tests for XPtr improvements.
99

10+
2014-02-03 JJ Allaire <jj@rstudio.org>
11+
12+
* R/Attributes.R: Include pkg_types.h file in RcppExports.cpp
13+
if it's present in inst/include or src
14+
* src/attributes.cpp: Include pkg_types.h file in generated
15+
C++ interface file if it's present in inst/include or src
16+
17+
2015-02-02 JJ Allaire <jj@rstudio.org>
18+
19+
* R/exceptions.R: Evaluate R code within an R_toplevelExec block
20+
* include/Rcpp/api/meat/Rcpp_eval.h: Evaluate R code within an
21+
R_toplevelExec block
22+
1023
2015-01-25 Kevin Ushey <kevinushey@gmail.com>
1124

1225
* inst/include/Rcpp/utils/tinyformat.h: define an error handler for

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 0.11.4
4-
Date: 2015-01-20
3+
Version: 0.11.4.2
4+
Date: 2015-02-03
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey,
66
Douglas Bates, and John Chambers
77
Maintainer: Dirk Eddelbuettel <edd@debian.org>

R/Attributes.R

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,24 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
380380
linkingTo <- .readPkgDescField(pkgDesc, "LinkingTo")
381381
includes <- .linkingToIncludes(linkingTo, TRUE)
382382

383-
# if a master include file is defined for the package then include it
384-
pkgHeader <- paste(pkgname, ".h", sep="")
383+
# if a master include file or types file is in inst/include then use it
384+
typesHeader <- c(paste0(pkgname, "_types.h"), paste0(pkgname, "_types.hpp"))
385+
pkgHeader <- c(paste0(pkgname, ".h"), typesHeader)
385386
pkgHeaderPath <- file.path(pkgdir, "inst", "include", pkgHeader)
386-
if (file.exists(pkgHeaderPath)) {
387+
pkgHeader <- pkgHeader[file.exists(pkgHeaderPath)]
388+
if (length(pkgHeader) > 0) {
387389
pkgInclude <- paste("#include \"../inst/include/",
388390
pkgHeader, "\"", sep="")
389391
includes <- c(pkgInclude, includes)
390392
}
391393

394+
# if a _types file is in src then include it
395+
pkgHeader <- typesHeader
396+
pkgHeaderPath <- file.path(pkgdir, "src", pkgHeader)
397+
pkgHeader <- pkgHeader[file.exists(pkgHeaderPath)]
398+
if (length(pkgHeader) > 0)
399+
includes <- c(paste0("#include \"", pkgHeader ,"\""), includes)
400+
392401
# generate exports
393402
invisible(.Call("compileAttributes", PACKAGE="Rcpp",
394403
pkgdir, pkgname, depends, cppFiles, cppFileBasenames,

R/exceptions.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,18 @@
1919
invisible( .Call( rcpp_error_recorder, e ) )
2020
}
2121

22+
.warningsEnv <- new.env()
23+
.warningsEnv$warnings <- character()
24+
25+
.rcpp_warning_recorder <- function(w){
26+
.warningsEnv$warnings <- append(.warningsEnv$warnings, w$message)
27+
invokeRestart("muffleWarning")
28+
}
29+
30+
.rcpp_collect_warnings <- function() {
31+
warnings <- .warningsEnv$warnings
32+
.warningsEnv$warnings <- character()
33+
warnings
34+
}
35+
36+

0 commit comments

Comments
 (0)