diff --git a/nCompiler/R/NC_FullCompiledInterface.R b/nCompiler/R/NC_FullCompiledInterface.R index 7fb4830..7dda331 100644 --- a/nCompiler/R/NC_FullCompiledInterface.R +++ b/nCompiler/R/NC_FullCompiledInterface.R @@ -55,7 +55,7 @@ #' @export build_compiled_nClass <- function(NCgenerator, newCobjFun, - env = parent.frame(), + env = NCgenerator$parent_env, quoted = FALSE) { # One might wonder if we can have an R6 class created here to # interface with a compiled C++ class be established with diff --git a/nCompiler/R/nCompile.R b/nCompiler/R/nCompile.R index 95ec03b..ac85b41 100644 --- a/nCompiler/R/nCompile.R +++ b/nCompiler/R/nCompile.R @@ -670,8 +670,8 @@ nCompile_finish_nonpackage <- function(units, } else { if(expect_createFromR[i]) createFromR_fun <- compiledFuns[[iRes]] R6interfaces[[i]] <- try(build_compiled_nClass(units[[i]], - createFromR_fun, - env = resultEnv)) + createFromR_fun)) + # env = resultEnv)) if(inherits(R6interfaces[[i]], "try-error")) { warning(paste0("There was a problem building a full nClass interface for ", exportNames[i], ".")) R6interfaces[[i]] <- NULL