Skip to content

Commit 2776121

Browse files
author
luke
committed
Skip headers that don't exist in getHdrAPI, from Ivan Krylov.
git-svn-id: https://svn.r-project.org/R/trunk@89127 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 5971051 commit 2776121

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/library/tools/R/apitools.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ getOneFunAPI <- function(apitype) {
6262
hdrs <- sub(hpat, "", grep(hpat, wrelines, value = TRUE))
6363
wAPI <- data.frame(name = funs, loc = rep("WRE", length(names)))
6464
getHdrAPI <- function(hdr) {
65-
hfuns <- getFunsHdr(file.path(R.home("include"), hdr))
65+
fpath <- file.path(R.home("include"), hdr)
66+
if (! file.exists(fpath))
67+
return(NULL) ## some headers may not exist on all platforms
68+
hfuns <- getFunsHdr(fpath)
6669
data.frame(name = hfuns, loc = rep(hdr, length(hfuns)))
6770
}
6871
hAPI <- lapply(hdrs, getHdrAPI)

0 commit comments

Comments
 (0)