thrift 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/binary_protocol_accelerated.c +5 -5
- data/ext/compact_protocol.c +9 -9
- data/ext/memory_buffer.c +1 -1
- data/ext/struct.c +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe32174805f7e6b9801ebf00500fad76c1922c3f5e816fba597dfc0aae195c5d
|
4
|
+
data.tar.gz: b908a7a66b4bff7fc95728778240d2583d685f2fdcdf563edb125dc571cb0040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd8377282c40257b9d4bd2e95633584a04f27609118a8694d9a0037cbf9affc4d9f42aa4647c4dcd43ed64668a77f7abb375f77ca6e5bef8aaae03db8702dcd8
|
7
|
+
data.tar.gz: 31637b8001126ee81c9a74803e2cbb942cb57dfbc529a72ceb121a28a2614695689d55bd0204dc12429d82ce38a7c0057c18420a872921f376e20e178b213c5e
|
@@ -82,7 +82,7 @@ static void write_string_direct(VALUE trans, VALUE str) {
|
|
82
82
|
rb_raise(rb_eStandardError, "Value should be a string");
|
83
83
|
}
|
84
84
|
str = convert_to_utf8_byte_buffer(str);
|
85
|
-
write_i32_direct(trans, RSTRING_LEN(str));
|
85
|
+
write_i32_direct(trans, (int32_t)RSTRING_LEN(str));
|
86
86
|
rb_funcall(trans, write_method_id, 1, str);
|
87
87
|
}
|
88
88
|
|
@@ -223,7 +223,7 @@ VALUE rb_thrift_binary_proto_write_binary(VALUE self, VALUE buf) {
|
|
223
223
|
CHECK_NIL(buf);
|
224
224
|
VALUE trans = GET_TRANSPORT(self);
|
225
225
|
buf = force_binary_encoding(buf);
|
226
|
-
write_i32_direct(trans, RSTRING_LEN(buf));
|
226
|
+
write_i32_direct(trans, (int32_t)RSTRING_LEN(buf));
|
227
227
|
rb_funcall(trans, write_method_id, 1, buf);
|
228
228
|
return Qnil;
|
229
229
|
}
|
@@ -403,9 +403,9 @@ VALUE rb_thrift_binary_proto_read_binary(VALUE self) {
|
|
403
403
|
void Init_binary_protocol_accelerated() {
|
404
404
|
VALUE thrift_binary_protocol_class = rb_const_get(thrift_module, rb_intern("BinaryProtocol"));
|
405
405
|
|
406
|
-
VERSION_1 = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_1")));
|
407
|
-
VERSION_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_MASK")));
|
408
|
-
TYPE_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("TYPE_MASK")));
|
406
|
+
VERSION_1 = (int)rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_1")));
|
407
|
+
VERSION_MASK = (int)rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_MASK")));
|
408
|
+
TYPE_MASK = (int)rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("TYPE_MASK")));
|
409
409
|
|
410
410
|
VALUE bpa_class = rb_define_class_under(thrift_module, "BinaryProtocolAccelerated", thrift_binary_protocol_class);
|
411
411
|
|
data/ext/compact_protocol.c
CHANGED
@@ -315,7 +315,7 @@ VALUE rb_thrift_compact_proto_write_string(VALUE self, VALUE str) {
|
|
315
315
|
VALUE rb_thrift_compact_proto_write_binary(VALUE self, VALUE buf) {
|
316
316
|
buf = force_binary_encoding(buf);
|
317
317
|
VALUE transport = GET_TRANSPORT(self);
|
318
|
-
write_varint32(transport, RSTRING_LEN(buf));
|
318
|
+
write_varint32(transport, (uint32_t)RSTRING_LEN(buf));
|
319
319
|
WRITE(transport, StringValuePtr(buf), RSTRING_LEN(buf));
|
320
320
|
return Qnil;
|
321
321
|
}
|
@@ -452,7 +452,7 @@ VALUE rb_thrift_compact_proto_read_message_begin(VALUE self) {
|
|
452
452
|
}
|
453
453
|
|
454
454
|
int8_t type = (version_and_type >> TYPE_SHIFT_AMOUNT) & TYPE_BITS;
|
455
|
-
int32_t seqid = read_varint64(self);
|
455
|
+
int32_t seqid = (int32_t)read_varint64(self);
|
456
456
|
VALUE messageName = rb_thrift_compact_proto_read_string(self);
|
457
457
|
return rb_ary_new3(3, messageName, INT2FIX(type), INT2NUM(seqid));
|
458
458
|
}
|
@@ -490,7 +490,7 @@ VALUE rb_thrift_compact_proto_read_field_begin(VALUE self) {
|
|
490
490
|
}
|
491
491
|
|
492
492
|
VALUE rb_thrift_compact_proto_read_map_begin(VALUE self) {
|
493
|
-
int32_t size = read_varint64(self);
|
493
|
+
int32_t size = (int32_t)read_varint64(self);
|
494
494
|
uint8_t key_and_value_type = size == 0 ? 0 : read_byte_direct(self);
|
495
495
|
return rb_ary_new3(3, INT2FIX(get_ttype(key_and_value_type >> 4)), INT2FIX(get_ttype(key_and_value_type & 0xf)), INT2FIX(size));
|
496
496
|
}
|
@@ -499,7 +499,7 @@ VALUE rb_thrift_compact_proto_read_list_begin(VALUE self) {
|
|
499
499
|
uint8_t size_and_type = read_byte_direct(self);
|
500
500
|
int32_t size = (size_and_type >> 4) & 0x0f;
|
501
501
|
if (size == 15) {
|
502
|
-
size = read_varint64(self);
|
502
|
+
size = (int32_t)read_varint64(self);
|
503
503
|
}
|
504
504
|
uint8_t type = get_ttype(size_and_type & 0x0f);
|
505
505
|
return rb_ary_new3(2, INT2FIX(type), INT2FIX(size));
|
@@ -528,7 +528,7 @@ VALUE rb_thrift_compact_proto_read_i16(VALUE self) {
|
|
528
528
|
}
|
529
529
|
|
530
530
|
VALUE rb_thrift_compact_proto_read_i32(VALUE self) {
|
531
|
-
return INT2NUM(zig_zag_to_int(read_varint64(self)));
|
531
|
+
return INT2NUM(zig_zag_to_int((int32_t)read_varint64(self)));
|
532
532
|
}
|
533
533
|
|
534
534
|
VALUE rb_thrift_compact_proto_read_i64(VALUE self) {
|
@@ -569,10 +569,10 @@ static void Init_constants() {
|
|
569
569
|
thrift_compact_protocol_class = rb_const_get(thrift_module, rb_intern("CompactProtocol"));
|
570
570
|
rb_global_variable(&thrift_compact_protocol_class);
|
571
571
|
|
572
|
-
VERSION = rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("VERSION")));
|
573
|
-
VERSION_MASK = rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("VERSION_MASK")));
|
574
|
-
TYPE_MASK = rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("TYPE_MASK")));
|
575
|
-
TYPE_BITS = rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("TYPE_BITS")));
|
572
|
+
VERSION = (int32_t)rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("VERSION")));
|
573
|
+
VERSION_MASK = (int32_t)rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("VERSION_MASK")));
|
574
|
+
TYPE_MASK = (int32_t)rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("TYPE_MASK")));
|
575
|
+
TYPE_BITS = (int32_t)rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("TYPE_BITS")));
|
576
576
|
TYPE_SHIFT_AMOUNT = FIX2INT(rb_const_get(thrift_compact_protocol_class, rb_intern("TYPE_SHIFT_AMOUNT")));
|
577
577
|
PROTOCOL_ID = FIX2INT(rb_const_get(thrift_compact_protocol_class, rb_intern("PROTOCOL_ID")));
|
578
578
|
|
data/ext/memory_buffer.c
CHANGED
@@ -54,7 +54,7 @@ VALUE rb_thrift_memory_buffer_read(VALUE self, VALUE length_value) {
|
|
54
54
|
|
55
55
|
index += length;
|
56
56
|
if (index > RSTRING_LEN(buf)) {
|
57
|
-
index = RSTRING_LEN(buf);
|
57
|
+
index = (int)RSTRING_LEN(buf);
|
58
58
|
}
|
59
59
|
if (index >= GARBAGE_BUFFER_SIZE) {
|
60
60
|
rb_ivar_set(self, buf_ivar_id, rb_funcall(buf, slice_method_id, 2, INT2FIX(index), INT2FIX(RSTRING_LEN(buf) - 1)));
|
data/ext/struct.c
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thrift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apache Thrift Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|