thrift 0.14.2 → 0.15.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/compact_protocol.c +1 -0
- data/ext/struct.c +9 -0
- data/ext/thrift_native.c +17 -0
- data/spec/spec_helper.rb +5 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f990b7528ad0c61eee1ef6fb2ff0cfc85c7f4912ec34eb6919e998f5dbbf016
|
4
|
+
data.tar.gz: d6958229cbc05dbe919746ec9019823635a29018e8f6c6542c5698bc61d5444a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 649454979aca2efed3f750e6d81a5b4763e46d16ea2d7ae795401bca2ec94f4b4a93a8264bf010d3ff54674cb6f206d52a65a886b197dd9ae677a53ff835d79b
|
7
|
+
data.tar.gz: 3b257ad43df2146a8ee1bc96d06142476004de18af38080799fe197864cda0858479e18955d20f9dc271f9c40ec106783e87ece7bbc0c3ccba6c32dafda34707
|
data/ext/compact_protocol.c
CHANGED
@@ -567,6 +567,7 @@ VALUE rb_thrift_compact_proto_read_binary(VALUE self) {
|
|
567
567
|
|
568
568
|
static void Init_constants() {
|
569
569
|
thrift_compact_protocol_class = rb_const_get(thrift_module, rb_intern("CompactProtocol"));
|
570
|
+
rb_global_variable(&thrift_compact_protocol_class);
|
570
571
|
|
571
572
|
VERSION = rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("VERSION")));
|
572
573
|
VERSION_MASK = rb_num2ll(rb_const_get(thrift_compact_protocol_class, rb_intern("VERSION_MASK")));
|
data/ext/struct.c
CHANGED
@@ -698,14 +698,23 @@ void Init_struct() {
|
|
698
698
|
rb_define_method(struct_module, "read", rb_thrift_struct_read, 1);
|
699
699
|
|
700
700
|
thrift_union_class = rb_const_get(thrift_module, rb_intern("Union"));
|
701
|
+
rb_global_variable(&thrift_union_class);
|
701
702
|
|
702
703
|
rb_define_method(thrift_union_class, "write", rb_thrift_union_write, 1);
|
703
704
|
rb_define_method(thrift_union_class, "read", rb_thrift_union_read, 1);
|
704
705
|
|
705
706
|
setfield_id = rb_intern("@setfield");
|
707
|
+
rb_global_variable(&setfield_id);
|
708
|
+
|
706
709
|
setvalue_id = rb_intern("@value");
|
710
|
+
rb_global_variable(&setvalue_id);
|
707
711
|
|
708
712
|
to_s_method_id = rb_intern("to_s");
|
713
|
+
rb_global_variable(&to_s_method_id);
|
714
|
+
|
709
715
|
name_to_id_method_id = rb_intern("name_to_id");
|
716
|
+
rb_global_variable(&name_to_id_method_id);
|
717
|
+
|
710
718
|
sorted_field_ids_method_id = rb_intern("sorted_field_ids");
|
719
|
+
rb_global_variable(&sorted_field_ids_method_id);
|
711
720
|
}
|
data/ext/thrift_native.c
CHANGED
@@ -112,10 +112,19 @@ VALUE protocol_exception_class;
|
|
112
112
|
void Init_thrift_native() {
|
113
113
|
// cached classes
|
114
114
|
thrift_module = rb_const_get(rb_cObject, rb_intern("Thrift"));
|
115
|
+
rb_global_variable(&thrift_module);
|
116
|
+
|
115
117
|
thrift_bytes_module = rb_const_get(thrift_module, rb_intern("Bytes"));
|
118
|
+
rb_global_variable(&thrift_bytes_module);
|
119
|
+
|
116
120
|
thrift_types_module = rb_const_get(thrift_module, rb_intern("Types"));
|
121
|
+
rb_global_variable(&thrift_types_module);
|
122
|
+
|
117
123
|
rb_cSet = rb_const_get(rb_cObject, rb_intern("Set"));
|
124
|
+
rb_global_variable(&rb_cSet);
|
125
|
+
|
118
126
|
protocol_exception_class = rb_const_get(thrift_module, rb_intern("ProtocolException"));
|
127
|
+
rb_global_variable(&protocol_exception_class);
|
119
128
|
|
120
129
|
// Init ttype constants
|
121
130
|
TTYPE_BOOL = FIX2INT(rb_const_get(thrift_types_module, rb_intern("BOOL")));
|
@@ -194,6 +203,14 @@ void Init_thrift_native() {
|
|
194
203
|
class_sym = ID2SYM(rb_intern("class"));
|
195
204
|
binary_sym = ID2SYM(rb_intern("binary"));
|
196
205
|
|
206
|
+
rb_global_variable(&type_sym);
|
207
|
+
rb_global_variable(&name_sym);
|
208
|
+
rb_global_variable(&key_sym);
|
209
|
+
rb_global_variable(&value_sym);
|
210
|
+
rb_global_variable(&element_sym);
|
211
|
+
rb_global_variable(&class_sym);
|
212
|
+
rb_global_variable(&binary_sym);
|
213
|
+
|
197
214
|
Init_struct();
|
198
215
|
Init_binary_protocol_accelerated();
|
199
216
|
Init_compact_protocol();
|
data/spec/spec_helper.rb
CHANGED
@@ -62,3 +62,8 @@ end
|
|
62
62
|
|
63
63
|
$:.unshift File.join(File.dirname(__FILE__), *%w[gen-rb/flat])
|
64
64
|
|
65
|
+
if defined?(GC.verify_compaction_references) == 'method'
|
66
|
+
# This method was added in Ruby 3.0.0. Calling it this way asks the GC to
|
67
|
+
# move objects around, helping to find object movement bugs.
|
68
|
+
GC.verify_compaction_references(double_heap: true, toward: :empty)
|
69
|
+
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thrift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.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: 2021-
|
11
|
+
date: 2021-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.11'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.7'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: srv
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: thin
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|