Skip to content

Commit e7544f7

Browse files
committed
Tweak request() id argument
1 parent 576e5ed commit e7544f7

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

NEWS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#### Updates
44

5-
* `request()` argument `id` is now a logical rather than integer argument.
65
* The previous `listen()` and `dial()` argument `error`, removed in v1.6.0, is now defunct.
76
* The previous `serial_config()` argument `vec`, unutilised since v1.6.0, is removed.
87

R/context.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ reply <- function(
180180
#' @param cv (optional) a 'conditionVariable' to signal when the async receive
181181
#' is complete, or NULL. If any other value is supplied, this will cause the
182182
#' pipe connection to be dropped when the async receive is complete.
183-
#' @param id (optional) specify as TRUE to send a message via the context upon
184-
#' timeout (asynchronously) consisting of an integer zero, followed by the
185-
#' integer context ID.
183+
#' @param id (optional) specify a non-NULL value to send a message via the
184+
#' context upon timeout (asynchronously) consisting of an integer zero,
185+
#' followed by the integer context ID.
186186
#'
187187
#' @return A 'recvAio' (object of class 'mirai' and 'recvAio') (invisibly).
188188
#'

man/request.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ SEXP rnng_request(SEXP con, SEXP data, SEXP sendmode, SEXP recvmode, SEXP timeou
413413
const nng_duration dur = timeout == R_NilValue ? NNG_DURATION_DEFAULT : (nng_duration) nano_integer(timeout);
414414
const uint8_t mod = (uint8_t) nano_matcharg(recvmode);
415415
const int raw = nano_encode_mode(sendmode);
416-
const int id = msgid == R_NilValue ? 0 : TYPEOF(msgid) == LGLSXP ? nng_ctx_id(*ctx) : NANO_INTEGER(msgid);
416+
const int id = msgid == R_NilValue ? 0 : TYPEOF(msgid) == INTSXP ? NANO_INTEGER(msgid) : nng_ctx_id(*ctx);
417417
const int signal = cvar != R_NilValue && !NANO_PTR_CHECK(cvar, nano_CvSymbol);
418418
const int drop = cvar != R_NilValue && !signal;
419419
int xc;

0 commit comments

Comments
 (0)