Skip to content

Commit 8aeb038

Browse files
authored
Merge pull request #589 from RcppCore/bugfix/issue588
correct empty return call (closes #588)
2 parents 127f14d + ac03008 commit 8aeb038

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2016-11-13 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/Attributes.R (mergeIntoBuildEnv): Correct 'empty' return
14
2016-11-13 Daniel C. Dillon <[email protected]>
25
* inst/include/Rcpp/RNGScope.h: Moved definition of RNGScope
36
to its own file

R/Attributes.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,15 +618,15 @@ sourceCppFunction <- function(func, isVoid, dll, symbol) {
618618

619619
# protect against null or empty string
620620
if (is.null(value) || !nzchar(value))
621-
return;
621+
return(invisible(NULL))
622622

623623
# if it doesn't exist already just set it
624624
if (is.null(buildEnv[[name]])) {
625625
buildEnv[[name]] <<- value
626626
}
627627
# if it's not identical then append
628628
else if (!identical(buildEnv[[name]], value)) {
629-
buildEnv[[name]] <<- paste(buildEnv[[name]], value);
629+
buildEnv[[name]] <<- paste(buildEnv[[name]], value)
630630
}
631631
else {
632632
# it already exists and it's the same value, this

0 commit comments

Comments
 (0)