google-protobuf 3.24.0-x86-linux → 3.24.1-x86-linux

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of google-protobuf might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea9940bea4fbe631591c31f3b68b64c0be6d412d87aaa295d6a2dff9b5b3a261
4
- data.tar.gz: '084985122419bf76d1d352e5cb61a78e33ef9d23ace47b206732de986ad47968'
3
+ metadata.gz: 3fea4cc5bd1db824ad3adac6f0e2ae4abb2ea770c705a03fbfabc906098fb085
4
+ data.tar.gz: '08a011ccca491ef8ecd8d2aedf0a423d547990fe348201c889e2d72a7769e556'
5
5
  SHA512:
6
- metadata.gz: 98a1fca10f32472ca93d89fb8d6dedb02396d4266a8b64e4ad8abab5fa500e1e66b5e80e2340a930be0ec7a598159a0746cc468fa8a7c3270f3010f194cd9c82
7
- data.tar.gz: 5dc81e661ce213232208234c7340146ab324e1d0d73f468419f691f4b2ecec56c2df8cf59467384c8178fec3f80cf6a1c99ff3220cda0b6d4738a219efa27bd2
6
+ metadata.gz: c56c9cccfd36f26d57dd0c94860f9cc5ef371cdf42d191788b851b85cfe045b9979feea925d021c06145e638bc42d0623acb791b889e570928a9fd354e6cf3bd
7
+ data.tar.gz: 7bb96198a487546352695565d860af0702cc9a3e8b34ec40d9b6ea20eea2d4c654d341aedcc0afd007d9ad3a585c393a853e4d2d0b5223d69a88ac1f5c694823
@@ -276,17 +276,25 @@ static void ObjectCache_Init(VALUE protobuf) {
276
276
  rb_const_set(protobuf, rb_intern("SIZEOF_VALUE"), INT2NUM(SIZEOF_VALUE));
277
277
  }
278
278
 
279
- VALUE ObjectCache_TryAdd(const void *key, VALUE val) {
279
+ static VALUE ObjectCache_GetKey(const void *key) {
280
280
  VALUE key_val = (VALUE)key;
281
281
  PBRUBY_ASSERT((key_val & 3) == 0);
282
- return rb_funcall(weak_obj_cache, item_try_add, 2, LL2NUM(key_val), val);
282
+ // Ensure the key can be stored as a Fixnum since 1 bit is needed for
283
+ // FIXNUM_FLAG and 1 bit is needed for the sign bit.
284
+ VALUE new_key = LL2NUM(key_val >> 2);
285
+ PBRUBY_ASSERT(FIXNUM_P(new_key));
286
+ return new_key;
287
+ }
288
+
289
+ VALUE ObjectCache_TryAdd(const void *key, VALUE val) {
290
+ VALUE key_val = ObjectCache_GetKey(key);
291
+ return rb_funcall(weak_obj_cache, item_try_add, 2, key_val, val);
283
292
  }
284
293
 
285
294
  // Returns the cached object for this key, if any. Otherwise returns Qnil.
286
295
  VALUE ObjectCache_Get(const void *key) {
287
- VALUE key_val = (VALUE)key;
288
- PBRUBY_ASSERT((key_val & 3) == 0);
289
- return rb_funcall(weak_obj_cache, item_get, 1, LL2NUM(key_val));
296
+ VALUE key_val = ObjectCache_GetKey(key);
297
+ return rb_funcall(weak_obj_cache, item_get, 1, key_val);
290
298
  }
291
299
 
292
300
  /*
Binary file
Binary file
Binary file
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.24.0
4
+ version: 3.24.1
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: 2023-08-08 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler-dock
@@ -111,7 +111,7 @@ homepage: https://developers.google.com/protocol-buffers
111
111
  licenses:
112
112
  - BSD-3-Clause
113
113
  metadata:
114
- source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.24.0/ruby
114
+ source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.24.1/ruby
115
115
  post_install_message:
116
116
  rdoc_options: []
117
117
  require_paths: