Skip to content

Commit

Permalink
remove some compat features
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 4, 2023
1 parent dd2655e commit 924a78f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ SEXP rnng_unresolved(SEXP x) {
SEXP value = Rf_findVarInFrame(x, nano_DataSymbol);
if (value == R_UnboundValue)
value = Rf_findVarInFrame(x, nano_ResultSymbol);
xc = TYPEOF(value) == ENVSXP ? Rf_inherits(value, "unresolvedValue") : value == nano_unresolved;
xc = value == nano_unresolved;
break;
case LGLSXP:
xc = x == nano_unresolved;
Expand Down
6 changes: 0 additions & 6 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,6 @@ void nano_encode(nano_buf *enc, SEXP object) {
case NILSXP:
NANO_INIT(enc, NULL, 0);
break;
case ENVSXP:
object = Rf_findVarInFrame(object, nano_ValueSymbol);
if (object != R_UnboundValue) {
NANO_INIT(enc, (unsigned char *) STDVEC_DATAPTR(object), XLENGTH(object));
break;
}
default:
Rf_error("'data' must be an atomic vector type or NULL to send in mode 'raw'");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ nanotestaio(err <- send_aio(ctx, "test"))
nanotest(is_error_value(call_aio(err)$result))
nanotest(is.integer(req$send(as.raw(1L), mode = 2L, block = 500)))
nanotestaio(msg <- call_aio(recv_aio(ctx, mode = 8L, timeout = 500)))
nanotestaio(saio <- send_aio(ctx, msg, mode = 2L, timeout = 500))
nanotestaio(saio <- send_aio(ctx, msg[["value"]], mode = 2L, timeout = 500))
nanotest(identical(req$recv(mode = 8L, block = 500), as.raw(1L)))
nanotestaio(rek <- request(req$context, c(1+3i, 4+2i), send_mode = 2L, recv_mode = "complex", timeout = 500))
nanotest(is.integer(reply(ctx, execute = identity, recv_mode = 3L, send_mode = "ra", timeout = 500)))
Expand Down

0 comments on commit 924a78f

Please sign in to comment.