google-protobuf 3.24.0-x86-mingw32 → 3.24.2-x86-mingw32

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: c3eeeb76cf9988d19b4e561b677522fcc1dd195361caf22c23383cfd0a4a97e1
4
- data.tar.gz: 7e33e330b99e1cb9eaa4a79fe03cfb8b6026a624d4a0812628e7a9e5d4d1ae18
3
+ metadata.gz: a79ba29fe0f8ac37e8a597edca0397f288ff200ee252b3fc2fe69548eb505872
4
+ data.tar.gz: b32fc4c200aaafc82b793b0ff1968588636b2c5a501237bbb6a23b13fffdd3ef
5
5
  SHA512:
6
- metadata.gz: c92571a35d8e7f8e7e9852eccb1889c1e7a9fcc98f30422a188daddf0e528e65c000ff574a49f9a9a01ed04a49c8165ed1de41d2147bb36ff8b35719a2aef1a5
7
- data.tar.gz: cf10ed0c38e073bf4e541fb88c02d41e3f721ff53f4a482e1ec0348c48760636030376189f11b961b637ea912e4f25bd1abaf5c6c7f88c8034474fb09d4f9d8b
6
+ metadata.gz: 48fca927afab3bee630eaf830553142b59ca4ca7066c244c144d681c7e5a6adeaa886cd2fb55b0709f526b2e160eebf05550f18372def0b151cc44cc1b067358
7
+ data.tar.gz: 71a2e2f31c855d13c69abb4ccd35d0306bde86c13c6ca31b69930e2b8bd4a2bf7a99298956d2a529e3e0c30e06da175d948176c3b31c1be42ba3498358b81e45
@@ -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.2
5
5
  platform: x86-mingw32
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-24 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.2/ruby
115
115
  post_install_message:
116
116
  rdoc_options: []
117
117
  require_paths: