Skip to content

Commit

Permalink
correct empty return call (closes #588)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Nov 13, 2016
1 parent c47efce commit 3898e26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2016-11-13 Dirk Eddelbuettel <edd@debian.org>

* R/Attributes.R (mergeIntoBuildEnv): Correct 'empty' return

2016-11-10 Dirk Eddelbuettel <edd@debian.org>

* inst/include/Rcpp/date_datetime/newDateVector.h: Added constructor
Expand Down
4 changes: 2 additions & 2 deletions R/Attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,15 @@ sourceCppFunction <- function(func, isVoid, dll, symbol) {

# protect against null or empty string
if (is.null(value) || !nzchar(value))
return;
return(invisible(NULL))

# if it doesn't exist already just set it
if (is.null(buildEnv[[name]])) {
buildEnv[[name]] <<- value
}
# if it's not identical then append
else if (!identical(buildEnv[[name]], value)) {
buildEnv[[name]] <<- paste(buildEnv[[name]], value);
buildEnv[[name]] <<- paste(buildEnv[[name]], value)
}
else {
# it already exists and it's the same value, this
Expand Down

0 comments on commit 3898e26

Please sign in to comment.