google-protobuf 3.24.0-x86_64-darwin → 3.24.1-x86_64-darwin

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: c9d2c353ff1774393043affa3232df79f306167853cbe35d06a0b608c7a763ff
4
- data.tar.gz: 9044a4698b5589ebd0b3ee8b6653c97b9ceec3916aa57e70245760356d46b7c8
3
+ metadata.gz: 2536d4ebbd7a7b86c67c660d3df73cf3f5f5ae0f8ec7603c9670fa7a61eb300e
4
+ data.tar.gz: 345d7985a2144023ece71d96afab2a4a6da88d47454e876971fa2e60f4a10546
5
5
  SHA512:
6
- metadata.gz: f7c51744dd53ca8db7cbc0ac53850a554034ddcbd9df74326fc9a7b56fe5bb797a2d4f0419a63ee4ecad469e8eb235639142c7162e723693a07b032952aec049
7
- data.tar.gz: 7588e86effbf03d1c5cbae48d2c1fc0e120bf74b7b2b333e2469053b1bde0caf50ef0dcc5ab899f56bbcf93f2ec6ed00830effb4703458484c0799c025246a40
6
+ metadata.gz: 195222ed28fa505f89a75aa01a04fb6e2b239d77897358ab44346d073bfe9c824a02b92ecc98a7a2e51ccd04423b5f7a411e7fe530ed2f6c995ae7ecc502956a
7
+ data.tar.gz: 472fb7e446eb6903af17b5eeae4a65dcae943a515beec8c3ffc9d46a33ea9708794b1b4d33b0ccf20c9a51d1954f698b0c4a509d49f28d93708868c7a1aefde8
@@ -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_64-darwin
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: