google-protobuf 3.25.4-java → 3.25.6-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c383a12660004f41a5227f6fecf4942246973fbd971dd362dd1de620415ade9b
4
- data.tar.gz: ed6f32b6f02986fd69395a14f40e6227335812d3eeb35673428b3217bbb4203c
3
+ metadata.gz: 1b192c9f55b347c4b16a9b4e6b23158b1cbfd4db78aef603602869111bd7acc4
4
+ data.tar.gz: 0f9b4262b3f30c6ce756fae7fcb389d595e4a19d26d1240386c94ea9a612d26e
5
5
  SHA512:
6
- metadata.gz: 7f28c7ca2626914dbed361a4ffe78ad4d41afec4031b22c5d603766cbcf61923aeac5d5dfb6a3b04ad42804cff0065c60e260e71c9caf66f627cb0a7aad02afe
7
- data.tar.gz: b5e804aad2812e4b331144482d478b2fc534067dc315702a6cf696ba6312ee8ade68da7e8df82024745539bfd3af5a8107a1fef32b9e1f6e6ecd47cc6e048dbb
6
+ metadata.gz: 10c76bba6dbf743cd087d28d698e0b891c28c44ceebc93df11cb2fd0cde0d39b3203f8c330d47d55bbaf74dd26f74dabf5c5774fcc183ee483db45f778df9d4c
7
+ data.tar.gz: db84c2241da4ac44ce8cae4121299f0e30b8654d8f736c75ecd84ebc7a1ea0e604cdabf29f081aefe9f3d3ed06d9ac5027347daa7a9bc6a22787f5b9f758697a
@@ -488,7 +488,8 @@ static int Map_initialize_kwarg(VALUE key, VALUE val, VALUE _self) {
488
488
  k = Convert_RubyToUpb(key, "", map_init->key_type, NULL);
489
489
 
490
490
  if (map_init->val_type.type == kUpb_CType_Message && TYPE(val) == T_HASH) {
491
- upb_MiniTable* t = upb_MessageDef_MiniTable(map_init->val_type.def.msgdef);
491
+ const upb_MiniTable* t =
492
+ upb_MessageDef_MiniTable(map_init->val_type.def.msgdef);
492
493
  upb_Message* msg = upb_Message_New(t, map_init->arena);
493
494
  Message_InitFromValue(msg, map_init->val_type.def.msgdef, val,
494
495
  map_init->arena);
@@ -519,7 +520,7 @@ static upb_MessageValue MessageValue_FromValue(VALUE val, TypeInfo info,
519
520
  upb_Arena* arena) {
520
521
  if (info.type == kUpb_CType_Message) {
521
522
  upb_MessageValue msgval;
522
- upb_MiniTable* t = upb_MessageDef_MiniTable(info.def.msgdef);
523
+ const upb_MiniTable* t = upb_MessageDef_MiniTable(info.def.msgdef);
523
524
  upb_Message* msg = upb_Message_New(t, arena);
524
525
  Message_InitFromValue(msg, info.def.msgdef, val, arena);
525
526
  msgval.msg_val = msg;
@@ -635,7 +636,7 @@ static VALUE Message_initialize(int argc, VALUE* argv, VALUE _self) {
635
636
  Message* self = ruby_to_Message(_self);
636
637
  VALUE arena_rb = Arena_new();
637
638
  upb_Arena* arena = Arena_get(arena_rb);
638
- upb_MiniTable* t = upb_MessageDef_MiniTable(self->msgdef);
639
+ const upb_MiniTable* t = upb_MessageDef_MiniTable(self->msgdef);
639
640
  upb_Message* msg = upb_Message_New(t, arena);
640
641
 
641
642
  Message_InitPtr(_self, msg, arena_rb);
@@ -678,7 +679,8 @@ bool Message_Equal(const upb_Message* m1, const upb_Message* m2,
678
679
  if (upb_Status_IsOk(&status)) {
679
680
  return return_value;
680
681
  } else {
681
- rb_raise(cParseError, upb_Status_ErrorMessage(&status));
682
+ rb_raise(cParseError, "Message_Equal(): %s",
683
+ upb_Status_ErrorMessage(&status));
682
684
  }
683
685
  }
684
686
 
@@ -709,7 +711,8 @@ uint64_t Message_Hash(const upb_Message* msg, const upb_MessageDef* m,
709
711
  if (upb_Status_IsOk(&status)) {
710
712
  return return_value;
711
713
  } else {
712
- rb_raise(cParseError, upb_Status_ErrorMessage(&status));
714
+ rb_raise(cParseError, "Message_Hash(): %s",
715
+ upb_Status_ErrorMessage(&status));
713
716
  }
714
717
  }
715
718
 
@@ -5771,9 +5771,35 @@ bool _upb_mapsorter_pushexts(_upb_mapsorter* s,
5771
5771
 
5772
5772
  // Must be last.
5773
5773
 
5774
- const float kUpb_FltInfinity = INFINITY;
5775
- const double kUpb_Infinity = INFINITY;
5776
- const double kUpb_NaN = NAN;
5774
+ // The latest win32 SDKs have an invalid definition of NAN.
5775
+ // https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907
5776
+ //
5777
+ // Unfortunately, the `0.0 / 0.0` workaround doesn't work in Clang under C23, so
5778
+ // try __builtin_nan first, if that exists.
5779
+ #ifdef _WIN32
5780
+ #ifdef __has_builtin
5781
+ #if __has_builtin(__builtin_nan)
5782
+ #define UPB_NAN __builtin_nan("0")
5783
+ #endif
5784
+ #if __has_builtin(__builtin_inf)
5785
+ #define UPB_INFINITY __builtin_inf()
5786
+ #endif
5787
+ #endif
5788
+ #ifndef UPB_NAN
5789
+ #define UPB_NAN 0.0 / 0.0
5790
+ #endif
5791
+ #ifndef UPB_INFINITY
5792
+ #define UPB_INFINITY 1.0 / 0.0
5793
+ #endif
5794
+ #else
5795
+ // For !_WIN32, assume math.h works.
5796
+ #define UPB_NAN NAN
5797
+ #define UPB_INFINITY INFINITY
5798
+ #endif
5799
+
5800
+ const float kUpb_FltInfinity = UPB_INFINITY;
5801
+ const double kUpb_Infinity = UPB_INFINITY;
5802
+ const double kUpb_NaN = UPB_NAN;
5777
5803
 
5778
5804
  static const size_t overhead = sizeof(upb_Message_InternalData);
5779
5805
 
@@ -12,7 +12,7 @@
12
12
  #include "shared_convert.h"
13
13
 
14
14
  bool shared_Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2,
15
- upb_CType type, upb_MessageDef* msgdef,
15
+ upb_CType type, const upb_MessageDef* msgdef,
16
16
  upb_Status* status) {
17
17
  switch (type) {
18
18
  case kUpb_CType_Bool:
@@ -39,7 +39,7 @@ bool shared_Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2,
39
39
  }
40
40
 
41
41
  uint64_t shared_Msgval_GetHash(upb_MessageValue val, upb_CType type,
42
- upb_MessageDef* msgdef, uint64_t seed,
42
+ const upb_MessageDef* msgdef, uint64_t seed,
43
43
  upb_Status* status) {
44
44
  switch (type) {
45
45
  case kUpb_CType_Bool:
@@ -61,4 +61,4 @@ uint64_t shared_Msgval_GetHash(upb_MessageValue val, upb_CType type,
61
61
  default:
62
62
  upb_Status_SetErrorMessage(status, "Internal error, unexpected type");
63
63
  }
64
- }
64
+ }
@@ -16,11 +16,11 @@
16
16
  #include "shared_message.h"
17
17
 
18
18
  bool shared_Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2,
19
- upb_CType type, upb_MessageDef* msgdef,
19
+ upb_CType type, const upb_MessageDef* msgdef,
20
20
  upb_Status* status);
21
21
 
22
22
  uint64_t shared_Msgval_GetHash(upb_MessageValue val, upb_CType type,
23
- upb_MessageDef* msgdef, uint64_t seed,
23
+ const upb_MessageDef* msgdef, uint64_t seed,
24
24
  upb_Status* status);
25
25
 
26
26
  #endif // RUBY_PROTOBUF_SHARED_CONVERT_H_
@@ -32,6 +32,7 @@ uint64_t shared_Message_Hash(const upb_Message* msg, const upb_MessageDef* m,
32
32
  } else {
33
33
  upb_Arena_Free(arena);
34
34
  upb_Status_SetErrorMessage(status, "Error calculating hash");
35
+ return 0;
35
36
  }
36
37
  }
37
38
 
Binary file
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.25.4
4
+ version: 3.25.6
5
5
  platform: java
6
6
  authors:
7
7
  - Protobuf Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-24 00:00:00.000000000 Z
11
+ date: 2025-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +179,7 @@ homepage: https://developers.google.com/protocol-buffers
179
179
  licenses:
180
180
  - BSD-3-Clause
181
181
  metadata:
182
- source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.25.4/ruby
182
+ source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.25.6/ruby
183
183
  post_install_message:
184
184
  rdoc_options: []
185
185
  require_paths: