google-protobuf 3.24.0.rc.3-arm64-darwin → 3.24.1-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbaa94d893c1172bdc58d73ff0f3cdc12e49f715a04b51ca758782dd25ebabe9
4
- data.tar.gz: c7d8e6e76a8e7aafad7e9507c9cc3901db3aad564efa72d3dac0e3905d31c9fe
3
+ metadata.gz: f080c4fa05f67afff8a5b8150aa31c6a5782e578310123a960542d694d0d5773
4
+ data.tar.gz: 68d4bf3aa717a5a1aeca1a72cb4ecc86b27a248ca2f4c288d9a8fb2e154ec795
5
5
  SHA512:
6
- metadata.gz: d33116b9fcfa18e80081a084f8ef423f436d87cf85990aa14254badc39110af73711a7721eb70f2293fe61b5100437621f5ead503169de64a4578799785e9faf
7
- data.tar.gz: c006367c910ef00d8d7fa1fcd4d93930826febf957835c86bcd6de7c3075395a354d414f1d137ebe417d0b3544d445c8c60acd6c451f004cda8b041ac8ceb931
6
+ metadata.gz: cd9c9fd1c29108bb43fce24de873f7377ea1158bcfa4071535ef16957585d3e33a7674e4c00288e4c5d24a0aad2fb5a6c1ed9a78e168355572ffe7888955369f
7
+ data.tar.gz: d9e49c31a1766dd1c9c41e2659e2ff0aaa23d6a83ac4a4881678d7931d3a3a2a0af7e511caff7f9922c76ae2fa9dcabfb19f63a25b2543c4363085c6c3f6e51e
@@ -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.rc.3
4
+ version: 3.24.1
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Protobuf Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-01 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-rc3/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:
@@ -126,9 +126,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: 3.3.dev
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 1.3.1
131
+ version: '0'
132
132
  requirements: []
133
133
  rubygems_version: 3.3.26
134
134
  signing_key: