msgpack 1.2.9-x64-mingw32 → 1.2.10-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/ChangeLog +4 -0
- data/ext/java/org/msgpack/jruby/Unpacker.java +1 -1
- data/ext/msgpack/buffer.h +14 -0
- data/ext/msgpack/unpacker_class.c +13 -5
- data/lib/msgpack.rb +1 -1
- data/lib/msgpack/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5107d8022db683529f7f100f64ac9a1c304bceb1dd27a55b50f3be308be414b2
|
4
|
+
data.tar.gz: 4b0f7711236e78692e32de145ad97fc27f60e9bdc359e47637245ed89c6a0ab1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8c13c8e4be6d454f0c26ff20279e52eff834fd8abc2c1235cf51746bcc383802165889650ef2a19303b3f0e7b9d2952d6ee7367cd6767b2c2057f3cd858d505
|
7
|
+
data.tar.gz: e4b77730c1d3eb2bbf6bd64803282cc21c33fe7e0500b359099c2cd07ea964f05d9123b0b8d3e30a9804c63bec4462b958b0525181ff4ad8df23e1a7e9393849
|
data/.travis.yml
CHANGED
@@ -23,9 +23,9 @@ matrix:
|
|
23
23
|
os: linux
|
24
24
|
- rvm: 2.5.3
|
25
25
|
os: linux
|
26
|
-
- rvm: 2.6.
|
26
|
+
- rvm: 2.6.1
|
27
27
|
os: linux
|
28
|
-
- rvm: 2.6.
|
28
|
+
- rvm: 2.6.1
|
29
29
|
os: osx
|
30
30
|
- rvm: ruby-head
|
31
31
|
os: linux
|
@@ -36,6 +36,8 @@ matrix:
|
|
36
36
|
- rvm: jruby-19mode
|
37
37
|
os: linux
|
38
38
|
allow_failures:
|
39
|
+
- rvm: 2.6.1
|
40
|
+
os: osx
|
39
41
|
- rvm: ruby-head
|
40
42
|
- rvm: jruby-head
|
41
43
|
- rvm: jruby-19mode
|
data/ChangeLog
CHANGED
@@ -170,7 +170,7 @@ public class Unpacker extends RubyObject {
|
|
170
170
|
return data == null ? ctx.getRuntime().getFalse() : ctx.getRuntime().getTrue();
|
171
171
|
}
|
172
172
|
|
173
|
-
@JRubyMethod(required = 1)
|
173
|
+
@JRubyMethod(required = 1, name = "feed", alias = { "feed_reference" })
|
174
174
|
public IRubyObject feed(ThreadContext ctx, IRubyObject data) {
|
175
175
|
ByteList byteList = data.asString().getByteList();
|
176
176
|
if (decoder == null) {
|
data/ext/msgpack/buffer.h
CHANGED
@@ -262,6 +262,20 @@ static inline size_t msgpack_buffer_append_string(msgpack_buffer_t* b, VALUE str
|
|
262
262
|
return length;
|
263
263
|
}
|
264
264
|
|
265
|
+
static inline size_t msgpack_buffer_append_string_reference(msgpack_buffer_t* b, VALUE string)
|
266
|
+
{
|
267
|
+
size_t length = RSTRING_LEN(string);
|
268
|
+
|
269
|
+
if(length > MSGPACK_BUFFER_STRING_WRITE_REFERENCE_MINIMUM) {
|
270
|
+
_msgpack_buffer_append_long_string(b, string);
|
271
|
+
|
272
|
+
} else {
|
273
|
+
msgpack_buffer_append(b, RSTRING_PTR(string), length);
|
274
|
+
}
|
275
|
+
|
276
|
+
return length;
|
277
|
+
}
|
278
|
+
|
265
279
|
|
266
280
|
/*
|
267
281
|
* IO functions
|
@@ -256,6 +256,17 @@ static VALUE Unpacker_feed(VALUE self, VALUE data)
|
|
256
256
|
return self;
|
257
257
|
}
|
258
258
|
|
259
|
+
static VALUE Unpacker_feed_reference(VALUE self, VALUE data)
|
260
|
+
{
|
261
|
+
UNPACKER(self, uk);
|
262
|
+
|
263
|
+
StringValue(data);
|
264
|
+
|
265
|
+
msgpack_buffer_append_string_reference(UNPACKER_BUFFER_(uk), data);
|
266
|
+
|
267
|
+
return self;
|
268
|
+
}
|
269
|
+
|
259
270
|
static VALUE Unpacker_each_impl(VALUE self)
|
260
271
|
{
|
261
272
|
UNPACKER(self, uk);
|
@@ -312,8 +323,7 @@ static VALUE Unpacker_feed_each(VALUE self, VALUE data)
|
|
312
323
|
}
|
313
324
|
#endif
|
314
325
|
|
315
|
-
|
316
|
-
Unpacker_feed(self, data);
|
326
|
+
Unpacker_feed_reference(self, data);
|
317
327
|
return Unpacker_each(self);
|
318
328
|
}
|
319
329
|
|
@@ -386,9 +396,6 @@ static VALUE Unpacker_full_unpack(VALUE self)
|
|
386
396
|
{
|
387
397
|
UNPACKER(self, uk);
|
388
398
|
|
389
|
-
/* prefer reference than copying; see MessagePack_Unpacker_module_init */
|
390
|
-
msgpack_buffer_set_write_reference_threshold(UNPACKER_BUFFER_(uk), 0);
|
391
|
-
|
392
399
|
int r = msgpack_unpacker_read(uk, 0);
|
393
400
|
if(r < 0) {
|
394
401
|
raise_unpacker_error(r);
|
@@ -444,6 +451,7 @@ void MessagePack_Unpacker_module_init(VALUE mMessagePack)
|
|
444
451
|
rb_define_method(cMessagePack_Unpacker, "read_map_header", Unpacker_read_map_header, 0);
|
445
452
|
//rb_define_method(cMessagePack_Unpacker, "peek_next_type", Unpacker_peek_next_type, 0); // TODO
|
446
453
|
rb_define_method(cMessagePack_Unpacker, "feed", Unpacker_feed, 1);
|
454
|
+
rb_define_method(cMessagePack_Unpacker, "feed_reference", Unpacker_feed_reference, 1);
|
447
455
|
rb_define_method(cMessagePack_Unpacker, "each", Unpacker_each, 0);
|
448
456
|
rb_define_method(cMessagePack_Unpacker, "feed_each", Unpacker_feed_each, 1);
|
449
457
|
rb_define_method(cMessagePack_Unpacker, "reset", Unpacker_reset, 0);
|
data/lib/msgpack.rb
CHANGED
data/lib/msgpack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.10
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-04-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
248
|
rubyforge_project: msgpack
|
249
|
-
rubygems_version: 2.7.
|
249
|
+
rubygems_version: 2.7.9
|
250
250
|
signing_key:
|
251
251
|
specification_version: 4
|
252
252
|
summary: MessagePack, a binary-based efficient data interchange format.
|