google-protobuf 3.18.0.rc.2-x86-linux → 3.19.0.rc.2-x86-linux
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.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/map.c +3 -0
- data/ext/google/protobuf_c/repeated_field.c +1 -0
- data/lib/google/2.3/protobuf_c.so +0 -0
- data/lib/google/2.4/protobuf_c.so +0 -0
- data/lib/google/2.5/protobuf_c.so +0 -0
- data/lib/google/2.6/protobuf_c.so +0 -0
- data/lib/google/2.7/protobuf_c.so +0 -0
- data/lib/google/3.0/protobuf_c.so +0 -0
- data/lib/google/protobuf/descriptor_dsl.rb +2 -2
- data/lib/google/protobuf/well_known_types.rb +5 -0
- data/lib/google/protobuf.rb +1 -1
- data/tests/basic.rb +30 -1
- data/tests/stress.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5745a227025e8d9d52b01522cb849a0ad66e9f6aabbb5d923c2956d0ca5654cc
|
4
|
+
data.tar.gz: 4fb0ece2f84b6e63afe4ecbf2ec45643e679adc8a75419b4c20e5b47facb906e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be407b87558a952e2ac625d72966c95fe446f7578fa2017f9b22545ba0b8109ab871a880f2b3fc8978dd6bb70e5cb062d9491bdd8696dba8e9d33f398ad048fc
|
7
|
+
data.tar.gz: b9dd6837b66fadd470ae5216c2adb1362ab21aac9517e4219ea4f56e831ef2b35183e6e9c0706b62b0aa3f0f2be96086817cf4963e4cc0404c8eade05da0ce3f
|
data/ext/google/protobuf_c/map.c
CHANGED
@@ -680,7 +680,10 @@ void Map_register(VALUE module) {
|
|
680
680
|
rb_define_method(klass, "delete", Map_delete, 1);
|
681
681
|
rb_define_method(klass, "clear", Map_clear, 0);
|
682
682
|
rb_define_method(klass, "length", Map_length, 0);
|
683
|
+
rb_define_method(klass, "size", Map_length, 0);
|
683
684
|
rb_define_method(klass, "dup", Map_dup, 0);
|
685
|
+
// Also define #clone so that we don't inherit Object#clone.
|
686
|
+
rb_define_method(klass, "clone", Map_dup, 0);
|
684
687
|
rb_define_method(klass, "==", Map_eq, 1);
|
685
688
|
rb_define_method(klass, "freeze", Map_freeze, 0);
|
686
689
|
rb_define_method(klass, "hash", Map_hash, 0);
|
@@ -551,6 +551,7 @@ VALUE RepeatedField_plus(VALUE _self, VALUE list) {
|
|
551
551
|
RepeatedField* dupped = ruby_to_RepeatedField(dupped_);
|
552
552
|
upb_array *dupped_array = RepeatedField_GetMutable(dupped_);
|
553
553
|
upb_arena* arena = Arena_get(dupped->arena);
|
554
|
+
Arena_fuse(list_rptfield->arena, arena);
|
554
555
|
int size = upb_array_size(list_rptfield->array);
|
555
556
|
int i;
|
556
557
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -301,8 +301,8 @@ module Google
|
|
301
301
|
internal_add_field(:LABEL_REQUIRED, name, type, number, type_class, options)
|
302
302
|
end
|
303
303
|
|
304
|
-
def repeated(name, type, number, type_class = nil)
|
305
|
-
internal_add_field(:LABEL_REPEATED, name, type, number, type_class,
|
304
|
+
def repeated(name, type, number, type_class = nil, options=nil)
|
305
|
+
internal_add_field(:LABEL_REPEATED, name, type, number, type_class, options)
|
306
306
|
end
|
307
307
|
|
308
308
|
def oneof(name, &block)
|
data/lib/google/protobuf.rb
CHANGED
data/tests/basic.rb
CHANGED
@@ -66,7 +66,8 @@ module BasicTest
|
|
66
66
|
def test_issue_8559_crash
|
67
67
|
msg = TestMessage.new
|
68
68
|
msg.repeated_int32 = ::Google::Protobuf::RepeatedField.new(:int32, [1, 2, 3])
|
69
|
-
|
69
|
+
# TODO: Remove the platform check once https://github.com/jruby/jruby/issues/6818 is released in JRuby 9.3.0.0
|
70
|
+
GC.start(full_mark: true, immediate_sweep: true) unless RUBY_PLATFORM == "java"
|
70
71
|
TestMessage.encode(msg)
|
71
72
|
end
|
72
73
|
|
@@ -168,6 +169,17 @@ module BasicTest
|
|
168
169
|
assert_equal nil, m.singular_msg
|
169
170
|
end
|
170
171
|
|
172
|
+
def test_import_proto2
|
173
|
+
m = TestMessage.new
|
174
|
+
assert !m.has_optional_proto2_submessage?
|
175
|
+
m.optional_proto2_submessage = ::FooBar::Proto2::TestImportedMessage.new
|
176
|
+
assert m.has_optional_proto2_submessage?
|
177
|
+
assert TestMessage.descriptor.lookup('optional_proto2_submessage').has?(m)
|
178
|
+
|
179
|
+
m.clear_optional_proto2_submessage
|
180
|
+
assert !m.has_optional_proto2_submessage?
|
181
|
+
end
|
182
|
+
|
171
183
|
def test_clear_repeated_fields
|
172
184
|
m = TestMessage.new
|
173
185
|
|
@@ -487,6 +499,7 @@ module BasicTest
|
|
487
499
|
:optional_int64=>0,
|
488
500
|
:optional_msg=>nil,
|
489
501
|
:optional_msg2=>nil,
|
502
|
+
:optional_proto2_submessage=>nil,
|
490
503
|
:optional_string=>"foo",
|
491
504
|
:optional_uint32=>0,
|
492
505
|
:optional_uint64=>0,
|
@@ -607,5 +620,21 @@ module BasicTest
|
|
607
620
|
assert_raise(FrozenErrorType) { m.map_string_int32.delete('a') }
|
608
621
|
assert_raise(FrozenErrorType) { m.map_string_int32.clear }
|
609
622
|
end
|
623
|
+
|
624
|
+
def test_map_length
|
625
|
+
m = proto_module::MapMessage.new
|
626
|
+
assert_equal 0, m.map_string_int32.length
|
627
|
+
assert_equal 0, m.map_string_msg.length
|
628
|
+
assert_equal 0, m.map_string_int32.size
|
629
|
+
assert_equal 0, m.map_string_msg.size
|
630
|
+
|
631
|
+
m.map_string_int32['a'] = 1
|
632
|
+
m.map_string_int32['b'] = 2
|
633
|
+
m.map_string_msg['a'] = proto_module::TestMessage2.new
|
634
|
+
assert_equal 2, m.map_string_int32.length
|
635
|
+
assert_equal 1, m.map_string_msg.length
|
636
|
+
assert_equal 2, m.map_string_int32.size
|
637
|
+
assert_equal 1, m.map_string_msg.size
|
638
|
+
end
|
610
639
|
end
|
611
640
|
end
|
data/tests/stress.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.19.0.rc.2
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Protobuf Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler-dock
|
@@ -64,20 +64,6 @@ dependencies:
|
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 3.0.9
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rubygems-tasks
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: 0.2.4
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.2.4
|
81
67
|
description: Protocol Buffers are Google's data interchange format.
|
82
68
|
email: protobuf@googlegroups.com
|
83
69
|
executables: []
|
@@ -129,7 +115,7 @@ homepage: https://developers.google.com/protocol-buffers
|
|
129
115
|
licenses:
|
130
116
|
- BSD-3-Clause
|
131
117
|
metadata:
|
132
|
-
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.
|
118
|
+
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.19.0-rc2/ruby
|
133
119
|
post_install_message:
|
134
120
|
rdoc_options: []
|
135
121
|
require_paths:
|