google-protobuf 3.19.4 → 3.23.3

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.

Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/ext/google/protobuf_c/convert.c +128 -115
  3. data/ext/google/protobuf_c/convert.h +12 -9
  4. data/ext/google/protobuf_c/defs.c +215 -209
  5. data/ext/google/protobuf_c/defs.h +19 -19
  6. data/ext/google/protobuf_c/extconf.rb +12 -5
  7. data/ext/google/protobuf_c/map.c +102 -109
  8. data/ext/google/protobuf_c/map.h +7 -8
  9. data/ext/google/protobuf_c/message.c +446 -341
  10. data/ext/google/protobuf_c/message.h +22 -19
  11. data/ext/google/protobuf_c/protobuf.c +71 -59
  12. data/ext/google/protobuf_c/protobuf.h +13 -10
  13. data/ext/google/protobuf_c/repeated_field.c +82 -84
  14. data/ext/google/protobuf_c/repeated_field.h +6 -6
  15. data/ext/google/protobuf_c/ruby-upb.c +11651 -6848
  16. data/ext/google/protobuf_c/ruby-upb.h +10715 -3639
  17. data/ext/google/protobuf_c/third_party/utf8_range/LICENSE +22 -0
  18. data/ext/google/protobuf_c/third_party/utf8_range/naive.c +92 -0
  19. data/ext/google/protobuf_c/third_party/utf8_range/range2-neon.c +157 -0
  20. data/ext/google/protobuf_c/third_party/utf8_range/range2-sse.c +170 -0
  21. data/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h +21 -0
  22. data/ext/google/protobuf_c/wrap_memcpy.c +4 -3
  23. data/lib/google/protobuf/any_pb.rb +24 -5
  24. data/lib/google/protobuf/api_pb.rb +26 -23
  25. data/lib/google/protobuf/descriptor_dsl.rb +8 -1
  26. data/lib/google/protobuf/descriptor_pb.rb +32 -225
  27. data/lib/google/protobuf/duration_pb.rb +24 -5
  28. data/lib/google/protobuf/empty_pb.rb +24 -3
  29. data/lib/google/protobuf/field_mask_pb.rb +24 -4
  30. data/lib/google/protobuf/message_exts.rb +7 -2
  31. data/lib/google/protobuf/plugin_pb.rb +47 -0
  32. data/lib/google/protobuf/repeated_field.rb +15 -2
  33. data/lib/google/protobuf/source_context_pb.rb +24 -4
  34. data/lib/google/protobuf/struct_pb.rb +24 -20
  35. data/lib/google/protobuf/timestamp_pb.rb +24 -5
  36. data/lib/google/protobuf/type_pb.rb +26 -68
  37. data/lib/google/protobuf/well_known_types.rb +11 -6
  38. data/lib/google/protobuf/wrappers_pb.rb +24 -28
  39. data/lib/google/protobuf.rb +4 -4
  40. metadata +13 -13
  41. data/tests/basic.rb +0 -648
  42. data/tests/generated_code_test.rb +0 -23
  43. data/tests/stress.rb +0 -38
data/tests/stress.rb DELETED
@@ -1,38 +0,0 @@
1
- #!/usr/bin/ruby
2
-
3
- require 'google/protobuf'
4
- require 'test/unit'
5
-
6
- module StressTest
7
- pool = Google::Protobuf::DescriptorPool.new
8
- pool.build do
9
- add_message "TestMessage" do
10
- optional :a, :int32, 1
11
- repeated :b, :message, 2, "M"
12
- end
13
- add_message "M" do
14
- optional :foo, :string, 1
15
- end
16
- end
17
-
18
- TestMessage = pool.lookup("TestMessage").msgclass
19
- M = pool.lookup("M").msgclass
20
-
21
- class StressTest < Test::Unit::TestCase
22
- def get_msg
23
- TestMessage.new(:a => 1000,
24
- :b => [M.new(:foo => "hello"),
25
- M.new(:foo => "world")])
26
- end
27
- def test_stress
28
- m = get_msg
29
- data = TestMessage.encode(m)
30
- 100_000.times do
31
- mnew = TestMessage.decode(data)
32
- mnew = mnew.dup
33
- assert_equal m.inspect, mnew.inspect
34
- assert TestMessage.encode(mnew) == data
35
- end
36
- end
37
- end
38
- end