Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Expand .udfFindAndLock to ignore object search
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Nov 2, 2023
1 parent 9927786 commit 8668995
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions R/rudf.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,21 @@ rxRmFunParse <- function(name) {
#' @author Matthew L. Fidler
#' @keywords internal
.udfFindAndLock <- function(object, envirList=list()) {
if (is.null(object)) {
if (!rxode2parse::.udfEnvLock(NULL)) {
if (is.environment(envirList)) {
rxode2parse::.udfEnvSet(envirList)
rxode2parse::.udfEnvLock(TRUE)
return(TRUE)
}
if (is.environment(envrList[[1]])) {
rxode2parse::.udfEnvSet(envirList[[1]])
rxode2parse::.udfEnvLock(TRUE)
return(TRUE)
}
}
return(FALSE)
}
if (.udfEnvLockIfExists(object)) {
# If locked unlock when exiting
return(TRUE)
Expand All @@ -415,4 +430,5 @@ rxRmFunParse <- function(name) {
})
return(.env$ret)
}
FALSE
}

0 comments on commit 8668995

Please sign in to comment.