Skip to content

Commit

Permalink
pass down call directly
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Sep 19, 2024
1 parent 6c0314b commit 5e98a68
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: nanonext
Type: Package
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
Version: 1.2.1.9019
Version: 1.2.1.9020
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
a socket library implementing 'Scalability Protocols', a reliable,
high-performance standard for common communications patterns including
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nanonext 1.2.1.9019 (development)
# nanonext 1.2.1.9020 (development)

#### New Features

Expand All @@ -7,7 +7,7 @@

#### Updates

* Upgrades `reply()` to always return even when there is an evaluation error, allowing it to be used safely in a loop without exiting early.
* Upgrades `reply()` to always return even when there is an evaluation error. This allows it to be used safely in a loop without exiting early, for example.
* Removes deprecated and defunct `next_config()`.
* Performance enhancements for `promises::as.promise()` methods.

Expand Down
2 changes: 1 addition & 1 deletion R/context.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ reply <- function(context,
block <- if (is.null(timeout)) TRUE else timeout
res <- recv(context, mode = recv_mode, block = block)
is_error_value(res) && return(res)
data <- .Call(rnng_eval_safe, pairlist(execute, res, ...))
data <- .Call(rnng_eval_safe, as.call(list(execute, res, ...)))
send(context, data = data, mode = send_mode, block = block)

}
Expand Down
3 changes: 1 addition & 2 deletions src/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
static SEXP nano_eval_res;

void nano_eval_safe(void *arg) {
SEXP data = (SEXP) arg;
nano_eval_res = Rf_eval(Rf_lcons(CAR(data), CDR(data)), R_GlobalEnv);
nano_eval_res = Rf_eval((SEXP) arg, R_GlobalEnv);
}

// aio completion callbacks ----------------------------------------------------
Expand Down

0 comments on commit 5e98a68

Please sign in to comment.