google-protobuf 3.24.0.rc.3-x64-mingw-ucrt → 3.24.1-x64-mingw-ucrt

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: 3549d8a26d08dc9260233cbdfe283eb888c6160de35b00114a77e0b1de9360c1
4
- data.tar.gz: 0fe4571fe4781adf79a4e6d7bda58a51e1042f3344826a669b41361a429bac50
3
+ metadata.gz: 94b2ab4ad164abca2689c2ce946309a742f461ec3e3abf982158029b62c3d00a
4
+ data.tar.gz: fd058c005b25384db8af05b5870988b59ffa07b5a6ac1cad8c8b8d2d5fbf9192
5
5
  SHA512:
6
- metadata.gz: '058b3ff140aa38d118589b75b6fca709d059be20325e5b676b1da3d3b61063b917db71b3c63c4b8b7b648e84cef449cfef93925e784c5f488a50203fcd28a747'
7
- data.tar.gz: 4902e420db62fa7faa9b969a0e142d78bdccb5204b72ea9472086e7144f4fc5c598eec1a2f0521ea6152919e26f7431cfb5685033bb2e584aa4a8fcc7d71a3fd
6
+ metadata.gz: 004dec70caed36ab856bfa5c5338a197854f6dd3550d7a974f7cb9c62e41b285ac4c45465956b783e6daaa679895f67cfd1df7cf27da2feac9da6bf59cdd64a3
7
+ data.tar.gz: ce6e70dc4dc100d33cee0342348db371ea9dade3ac499e2b788c71f403ef9ce0a2621331f609f0b7ddf3534f396b4a0fb9a8e04563c637dd895a9b1668e697a8
@@ -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
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: x64-mingw-ucrt
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
@@ -109,7 +109,7 @@ homepage: https://developers.google.com/protocol-buffers
109
109
  licenses:
110
110
  - BSD-3-Clause
111
111
  metadata:
112
- source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.24.0-rc3/ruby
112
+ source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.24.1/ruby
113
113
  post_install_message:
114
114
  rdoc_options: []
115
115
  require_paths:
@@ -124,9 +124,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
124
  version: 3.3.dev
125
125
  required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ">"
127
+ - - ">="
128
128
  - !ruby/object:Gem::Version
129
- version: 1.3.1
129
+ version: '0'
130
130
  requirements: []
131
131
  rubygems_version: 3.3.26
132
132
  signing_key: