Skip to content

Commit

Permalink
Merge pull request #2 from patRyserWelch8/1.0.1---with-different-crea…
Browse files Browse the repository at this point in the history
…tion-of-env

with unbind and unsafe op to cope with Opal server ...
  • Loading branch information
patRyserWelch8 committed Jan 29, 2021
2 parents b4c390b + b7aa3ca commit e698a41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/decDS.R
Expand Up @@ -12,8 +12,15 @@ decDS <- function()
if(is.env.correct())
{
env <- get.env()



if(exists("value", where = env))
{
if(!bindingIsActive("value",env = env))
{
unlockBinding(sym = "value", env = env)
}
value <- get("value", envir = env)
assign("value", value - 1, envir = env)
}
Expand Down
7 changes: 7 additions & 0 deletions R/incDS.R
Expand Up @@ -13,8 +13,15 @@ incDS <- function()
if(is.env.correct())
{
env <- get.env()


if(exists("value", where = env))
{
if(!bindingIsActive("value",env = env))
{
unlockBinding(sym = "value", env = env)
}

value <- get("value", envir = env)
assign("value", value + 1, envir = env)
}
Expand Down

0 comments on commit e698a41

Please sign in to comment.