google-protobuf 3.24.0-x64-mingw32 → 3.24.2-x64-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: 69204b0b50429b21216020533f8a02b88988691d09365c2e4f0841814e3e33b0
4
- data.tar.gz: 527d4eb1225f0102d822a52ad9eeb2fd19ad76d4fb8c1be547041304dff96926
3
+ metadata.gz: 865c2cf70552722128e4cc075a4d6802a1db8843a364e5c319fddf67fb17d95f
4
+ data.tar.gz: 9fdafffd8dc974b99ab068512d3a8c6a102a68798303985da6c27d48978c2afa
5
5
  SHA512:
6
- metadata.gz: 428252f4dbe614ef9e3f1185a72aec07237082519a99334389e1ba6cc84f6a8b20ec383ad977b5438712d592b479fd38f09f4056646ee049af945d786eacf1f4
7
- data.tar.gz: b5d17302de6495378562f63fb89905536cf745b2f8aaabbcfa717b38a962a29b1091fcd956102c2b6686a653bb84cc560af30a8e95ea419a839613363a303790
6
+ metadata.gz: da5167080441eb4fa4518eb91042f51be2fd0f52720b2d4573205d1874d7fca410f289c2abdc046e923520d53bc7b563fee640ec83b55b6ad15f085757dd076e
7
+ data.tar.gz: ef00a740d73a7dc653d56638a3373fa50270dbc7ba441ea28231076f18db9704bcb0ab8ce0951933028a980a9960ce0dc520f2f6937c6495dcce88d40e131ba0
@@ -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
4
+ version: 3.24.2
5
5
  platform: x64-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
@@ -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/ruby
112
+ source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.24.2/ruby
113
113
  post_install_message:
114
114
  rdoc_options: []
115
115
  require_paths: