Skip to content

Commit 8e3b5cd

Browse files
committed
add compat for existing and future versions
1 parent a9b6a8b commit 8e3b5cd

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 1.1.1.9016
4+
Version: 1.1.1.9017
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library implementing 'Scalability Protocols', a reliable,
77
high-performance standard for common communications patterns including

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 1.1.1.9016 (development)
1+
# nanonext 1.1.1.9017 (development)
22

33
#### New Features
44

src/core.c

+5-9
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,11 @@ void nano_serialize(nano_buf *buf, const SEXP object, SEXP hook) {
239239

240240
NANO_ALLOC(buf, NANONEXT_INIT_BUFSIZE);
241241
const int reg = hook != R_NilValue;
242-
int vec;
243-
244-
if (reg || special_bit) {
245-
vec = reg ? NANO_INTEGER(CADDDR(hook)) : 0;
246-
buf->buf[0] = 0x7;
247-
buf->buf[1] = (uint8_t) vec;
248-
buf->buf[3] = special_bit;
249-
buf->cur += 16;
250-
}
242+
const int vec = reg ? NANO_INTEGER(CADDDR(hook)) : 0;
243+
buf->buf[0] = 0x7;
244+
buf->buf[1] = (uint8_t) vec;
245+
buf->buf[2] = special_bit;
246+
buf->cur += 16;
251247

252248
struct R_outpstream_st output_stream;
253249

tests/tests.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ nanotest(if (is.null(p)) TRUE else is_nano(p))
205205
nanotest(.mark())
206206
nanotestaio(r <- send_aio(if (is.null(p)) rep else p, "", timeout = 500))
207207
nanotesterr(collect_pipe(r), "valid")
208-
nanotest(req$recv(mode = 8L, block = 500)[4L] == 1L)
208+
nanotest(req$recv(mode = 8L, block = 500)[3L] == 1L)
209209
nanotest(!.mark(FALSE))
210210

211211
nanotestnano(ctx <- context(rep))

0 commit comments

Comments
 (0)