Skip to content

Commit 5e57be0

Browse files
committed
optimizses serialization format
1 parent 85e1ebc commit 5e57be0

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
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: 0.13.2.9006
4+
Version: 0.13.2.9007
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# nanonext 0.13.2.9006 (development)
1+
# nanonext 0.13.2.9007 (development)
22

33
#### New Features
44

5-
* `next_config()` gains argument 'class' and 'vec', enabling custom serialization to all reference objects supported by R serialization.
5+
* `next_config()` gains argument 'class' and 'vec', enabling custom serialization for all reference object types supported by R serialization.
66
* Upgrades bundled 'libnng' to v1.7.3.
77

88
# nanonext 0.13.2

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ As system libraries, 'libnng' is available as libnng-dev (deb) or nng-devel (rpm
159159

160160
For R >= 4.2 using the 'Rtools42' or 'Rtools43' toolchains, 'libnng' v1.7.3 and 'libmbedtls' v3.5.2 will be automatically compiled from the package sources during installation.
161161

162-
For previous R versions, pre-compiled 'libnng' v1.7.2 and 'libmbedtls' v3.5.2 libraries are downloaded and used for installation instead.
162+
For previous R versions, pre-compiled 'libnng' v1.7.3 and 'libmbedtls' v3.5.2 libraries are downloaded and used for installation instead.
163163

164164
### Acknowledgements and Links
165165

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ For R \>= 4.2 using the ‘Rtools42’ or ‘Rtools43’ toolchains, ‘libnng
207207
v1.7.3 and ‘libmbedtls’ v3.5.2 will be automatically compiled from the
208208
package sources during installation.
209209

210-
For previous R versions, pre-compiled ‘libnng’ v1.7.2 and ‘libmbedtls’
210+
For previous R versions, pre-compiled ‘libnng’ v1.7.3 and ‘libmbedtls’
211211
v3.5.2 libraries are downloaded and used for installation instead.
212212

213213
### Acknowledgements and Links

src/Makevars.win

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ else
44
ARC="i386"
55
endif
66

7-
PKG_CFLAGS=-I../src-${ARC}/rwinlib-1.7.2_3.5.2/include -DNNG_STATIC_LIB $(C_VISIBILITY)
8-
PKG_LIBS=-L../src-${ARC}/rwinlib-1.7.2_3.5.2/lib${R_ARCH} -lnng -lmbedtls -lmbedx509 -lmbedcrypto -lbcrypt -lws2_32
7+
PKG_CFLAGS=-I../src-${ARC}/rwinlib-1.7.3_3.5.2/include -DNNG_STATIC_LIB $(C_VISIBILITY)
8+
PKG_LIBS=-L../src-${ARC}/rwinlib-1.7.3_3.5.2/lib${R_ARCH} -lnng -lmbedtls -lmbedx509 -lmbedcrypto -lbcrypt -lws2_32
99

1010
all: winlibs
1111

1212
winlibs:
13-
curl -sL https://github.com/shikokuchuo/rwinlib/archive/refs/tags/v1.7.2_3.5.2.zip -o nng.zip
13+
curl -sL https://github.com/shikokuchuo/rwinlib/archive/refs/tags/v1.7.3_3.5.2.zip -o nng.zip
1414
unzip -q nng.zip
1515
rm -f nng.zip

src/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void nano_serialize_next(nano_buf *buf, const SEXP object) {
212212
buf->buf[0] = 0x7;
213213
buf->buf[1] = registered;
214214
buf->buf[2] = special_bit;
215-
buf->cur += registered ? 16 : 8;
215+
buf->cur += registered ? 16 : 4;
216216

217217
struct R_outpstream_st output_stream;
218218

@@ -366,7 +366,7 @@ SEXP nano_unserialize(unsigned char *buf, const size_t sz) {
366366
goto resume;
367367
}
368368
offset = 0;
369-
cur = 8;
369+
cur = 4;
370370
goto resume;
371371
}
372372
}

0 commit comments

Comments
 (0)