Skip to content

Commit

Permalink
Merge develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbadr committed Oct 6, 2023
2 parents cba4e2b + cc2598a commit 796f868
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rstan/rstan/R/expose_stan_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ expose_stan_functions_hacks <- function(code, includes = NULL) {
code, sep = "\n")
code <- gsub("// [[stan::function]]",
"// [[Rcpp::export]]", code, fixed = TRUE)
code <- gsub("stan::math::accumulator<double>& lp_accum__,(\\n)?(\\s*)?std::ostream\\* pstream__ = (nullptr|0))(\\s*)?\\{",
code <- gsub("stan::math::accumulator<double>& lp_accum__,(\\n)?(\\s*)?std::ostream\\*(\\n)?(\\s*)?pstream__(\\n)?(\\s*)?=(\\n)?\\s*)?(nullptr|0))(\\s*)?\\{",
"std::ostream* pstream__ = nullptr){\nstan::math::accumulator<double> lp_accum__;",
code)
code <- gsub("pstream__(\\s*|)=(\\s*|)nullptr", "pstream__ = 0", code)
Expand Down
2 changes: 1 addition & 1 deletion rstan/rstan/R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ OUT <- 0
assign("stanc_ctx", V8::v8(), envir = topenv())
} else assign("stanc_ctx", QuickJSR::JSContext$new(stack_size = 4 * 1024 * 1024), envir = topenv())
stanc_js <- system.file("stanc.js", package = "StanHeaders", mustWork = TRUE)
if (!stanc_ctx$validate(stanc_js)) {
if (!file.exists(stanc_js)) {
stanc_js <- system.file("exec", "stanc.js", package = "rstan", mustWork = TRUE)
}
stanc_ctx$source(stanc_js)
Expand Down

0 comments on commit 796f868

Please sign in to comment.