google-protobuf 3.17.3 → 3.18.1
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 +4 -4
- data/ext/google/protobuf_c/convert.c +4 -5
- data/ext/google/protobuf_c/defs.c +26 -1326
- data/ext/google/protobuf_c/extconf.rb +0 -1
- data/ext/google/protobuf_c/message.c +1 -2
- data/ext/google/protobuf_c/repeated_field.c +1 -1
- data/ext/google/protobuf_c/ruby-upb.c +603 -290
- data/ext/google/protobuf_c/ruby-upb.h +420 -127
- data/lib/google/protobuf/api_pb.rb +2 -2
- data/lib/google/protobuf/descriptor_dsl.rb +458 -0
- data/lib/google/protobuf/descriptor_pb.rb +266 -0
- data/lib/google/protobuf/type_pb.rb +2 -2
- data/lib/google/protobuf.rb +1 -69
- data/tests/basic.rb +12 -0
- metadata +6 -5
- data/ext/google/protobuf_c/third_party/wyhash/wyhash.h +0 -145
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd0e8ed8ec0725c7a073fc2e55f68e6d2aea6d8c202262f9c0ae5ffb71cbe891
|
4
|
+
data.tar.gz: 0b7e9339a029994aede3ac5232f8747e6fda2aa2d723f94f0c6b98eff40c0117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f6d374c5c3bc0dc53f64621c18a213a679650d8bca7a817e27293143b13c16771db3589c22c142a7663e10971192ada4e7a1a4588f803d64f1bafd9861f9828
|
7
|
+
data.tar.gz: c238c0606b5726669693fc500e5c3e9bf7295e4c120209184d09ef7f9d2c83ceb9751e5f14aab22253646e5012267b7d59f5cc1929bb5f38121246323f4e1095
|
@@ -41,7 +41,6 @@
|
|
41
41
|
|
42
42
|
#include "message.h"
|
43
43
|
#include "protobuf.h"
|
44
|
-
#include "third_party/wyhash/wyhash.h"
|
45
44
|
|
46
45
|
static upb_strview Convert_StringData(VALUE str, upb_arena *arena) {
|
47
46
|
upb_strview ret;
|
@@ -328,19 +327,19 @@ bool Msgval_IsEqual(upb_msgval val1, upb_msgval val2, TypeInfo type_info) {
|
|
328
327
|
uint64_t Msgval_GetHash(upb_msgval val, TypeInfo type_info, uint64_t seed) {
|
329
328
|
switch (type_info.type) {
|
330
329
|
case UPB_TYPE_BOOL:
|
331
|
-
return
|
330
|
+
return Wyhash(&val, 1, seed, kWyhashSalt);
|
332
331
|
case UPB_TYPE_FLOAT:
|
333
332
|
case UPB_TYPE_INT32:
|
334
333
|
case UPB_TYPE_UINT32:
|
335
334
|
case UPB_TYPE_ENUM:
|
336
|
-
return
|
335
|
+
return Wyhash(&val, 4, seed, kWyhashSalt);
|
337
336
|
case UPB_TYPE_DOUBLE:
|
338
337
|
case UPB_TYPE_INT64:
|
339
338
|
case UPB_TYPE_UINT64:
|
340
|
-
return
|
339
|
+
return Wyhash(&val, 8, seed, kWyhashSalt);
|
341
340
|
case UPB_TYPE_STRING:
|
342
341
|
case UPB_TYPE_BYTES:
|
343
|
-
return
|
342
|
+
return Wyhash(val.str_val.data, val.str_val.size, seed, kWyhashSalt);
|
344
343
|
case UPB_TYPE_MESSAGE:
|
345
344
|
return Message_Hash(val.msg_val, type_info.def.msgdef, seed);
|
346
345
|
default:
|