google-protobuf 4.29.3-java → 4.30.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/glue.c +63 -0
- data/ext/google/protobuf_c/message.c +2 -4
- data/ext/google/protobuf_c/protobuf.c +2 -1
- data/ext/google/protobuf_c/ruby-upb.c +7728 -6620
- data/ext/google/protobuf_c/ruby-upb.h +2390 -1671
- data/ext/google/protobuf_c/third_party/utf8_range/utf8_range.c +15 -275
- data/ext/google/protobuf_c/third_party/utf8_range/utf8_range_neon.inc +117 -0
- data/ext/google/protobuf_c/third_party/utf8_range/utf8_range_sse.inc +272 -0
- data/lib/google/protobuf/descriptor_pb.rb +2 -1
- data/lib/google/protobuf/ffi/descriptor.rb +10 -0
- data/lib/google/protobuf/ffi/enum_descriptor.rb +10 -0
- data/lib/google/protobuf/ffi/ffi.rb +0 -1
- data/lib/google/protobuf/ffi/field_descriptor.rb +10 -0
- data/lib/google/protobuf/ffi/file_descriptor.rb +10 -0
- data/lib/google/protobuf/ffi/internal/convert.rb +1 -5
- data/lib/google/protobuf/ffi/message.rb +1 -3
- data/lib/google/protobuf/ffi/method_descriptor.rb +11 -1
- data/lib/google/protobuf/ffi/oneof_descriptor.rb +10 -0
- data/lib/google/protobuf/ffi/service_descriptor.rb +11 -1
- data/lib/google/protobuf_ffi.rb +2 -1
- data/lib/google/protobuf_java.jar +0 -0
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 874ae811a534999993cedd7e986f3ff584d0e5350b380cae0ef26d5f8546faad
|
4
|
+
data.tar.gz: e7b1ee1a9c3d4db931f69f76ebf980c2d2a9839af50c048fe7e6d83d9d8bd8bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dffd2aca9cc78777bf9864afa3213cbfe2ca72b64d9ab0c1c766d4551ddd992f064907972211f7f3659fac85044326552b8e00d134702d88b6023d605cbfc805
|
7
|
+
data.tar.gz: ec6894004a847970d9197c6682ce37c0aefc3bfe453b9ab85af70b2d143192314f3f66f8702277af1068d54ad4577eb0bac9118087d4d7576814f53035a8d97e
|
@@ -26,6 +26,15 @@ char* EnumDescriptor_serialized_options(const upb_EnumDef* enumdef,
|
|
26
26
|
return serialized;
|
27
27
|
}
|
28
28
|
|
29
|
+
char* EnumDescriptor_serialized_to_proto(const upb_EnumDef* enumdef,
|
30
|
+
size_t* size, upb_Arena* arena) {
|
31
|
+
const google_protobuf_EnumDescriptorProto* file_proto =
|
32
|
+
upb_EnumDef_ToProto(enumdef, arena);
|
33
|
+
char* serialized =
|
34
|
+
google_protobuf_EnumDescriptorProto_serialize(file_proto, arena, size);
|
35
|
+
return serialized;
|
36
|
+
}
|
37
|
+
|
29
38
|
char* FileDescriptor_serialized_options(const upb_FileDef* filedef,
|
30
39
|
size_t* size, upb_Arena* arena) {
|
31
40
|
const google_protobuf_FileOptions* opts = upb_FileDef_Options(filedef);
|
@@ -33,6 +42,15 @@ char* FileDescriptor_serialized_options(const upb_FileDef* filedef,
|
|
33
42
|
return serialized;
|
34
43
|
}
|
35
44
|
|
45
|
+
char* FileDescriptor_serialized_to_proto(const upb_FileDef* filedef,
|
46
|
+
size_t* size, upb_Arena* arena) {
|
47
|
+
const google_protobuf_FileDescriptorProto* file_proto =
|
48
|
+
upb_FileDef_ToProto(filedef, arena);
|
49
|
+
char* serialized =
|
50
|
+
google_protobuf_FileDescriptorProto_serialize(file_proto, arena, size);
|
51
|
+
return serialized;
|
52
|
+
}
|
53
|
+
|
36
54
|
char* Descriptor_serialized_options(const upb_MessageDef* msgdef, size_t* size,
|
37
55
|
upb_Arena* arena) {
|
38
56
|
const google_protobuf_MessageOptions* opts = upb_MessageDef_Options(msgdef);
|
@@ -41,6 +59,15 @@ char* Descriptor_serialized_options(const upb_MessageDef* msgdef, size_t* size,
|
|
41
59
|
return serialized;
|
42
60
|
}
|
43
61
|
|
62
|
+
char* Descriptor_serialized_to_proto(const upb_MessageDef* msgdef, size_t* size,
|
63
|
+
upb_Arena* arena) {
|
64
|
+
const google_protobuf_DescriptorProto* proto =
|
65
|
+
upb_MessageDef_ToProto(msgdef, arena);
|
66
|
+
char* serialized =
|
67
|
+
google_protobuf_DescriptorProto_serialize(proto, arena, size);
|
68
|
+
return serialized;
|
69
|
+
}
|
70
|
+
|
44
71
|
char* OneOfDescriptor_serialized_options(const upb_OneofDef* oneofdef,
|
45
72
|
size_t* size, upb_Arena* arena) {
|
46
73
|
const google_protobuf_OneofOptions* opts = upb_OneofDef_Options(oneofdef);
|
@@ -48,6 +75,15 @@ char* OneOfDescriptor_serialized_options(const upb_OneofDef* oneofdef,
|
|
48
75
|
return serialized;
|
49
76
|
}
|
50
77
|
|
78
|
+
char* OneOfDescriptor_serialized_to_proto(const upb_OneofDef* oneofdef,
|
79
|
+
size_t* size, upb_Arena* arena) {
|
80
|
+
const google_protobuf_OneofDescriptorProto* proto =
|
81
|
+
upb_OneofDef_ToProto(oneofdef, arena);
|
82
|
+
char* serialized =
|
83
|
+
google_protobuf_OneofDescriptorProto_serialize(proto, arena, size);
|
84
|
+
return serialized;
|
85
|
+
}
|
86
|
+
|
51
87
|
char* FieldDescriptor_serialized_options(const upb_FieldDef* fielddef,
|
52
88
|
size_t* size, upb_Arena* arena) {
|
53
89
|
const google_protobuf_FieldOptions* opts = upb_FieldDef_Options(fielddef);
|
@@ -55,6 +91,15 @@ char* FieldDescriptor_serialized_options(const upb_FieldDef* fielddef,
|
|
55
91
|
return serialized;
|
56
92
|
}
|
57
93
|
|
94
|
+
char* FieldDescriptor_serialized_to_proto(const upb_FieldDef* fieldef,
|
95
|
+
size_t* size, upb_Arena* arena) {
|
96
|
+
const google_protobuf_FieldDescriptorProto* proto =
|
97
|
+
upb_FieldDef_ToProto(fieldef, arena);
|
98
|
+
char* serialized =
|
99
|
+
google_protobuf_FieldDescriptorProto_serialize(proto, arena, size);
|
100
|
+
return serialized;
|
101
|
+
}
|
102
|
+
|
58
103
|
char* ServiceDescriptor_serialized_options(const upb_ServiceDef* servicedef,
|
59
104
|
size_t* size, upb_Arena* arena) {
|
60
105
|
const google_protobuf_ServiceOptions* opts =
|
@@ -64,9 +109,27 @@ char* ServiceDescriptor_serialized_options(const upb_ServiceDef* servicedef,
|
|
64
109
|
return serialized;
|
65
110
|
}
|
66
111
|
|
112
|
+
char* ServiceDescriptor_serialized_to_proto(const upb_ServiceDef* servicedef,
|
113
|
+
size_t* size, upb_Arena* arena) {
|
114
|
+
const google_protobuf_ServiceDescriptorProto* proto =
|
115
|
+
upb_ServiceDef_ToProto(servicedef, arena);
|
116
|
+
char* serialized =
|
117
|
+
google_protobuf_ServiceDescriptorProto_serialize(proto, arena, size);
|
118
|
+
return serialized;
|
119
|
+
}
|
120
|
+
|
67
121
|
char* MethodDescriptor_serialized_options(const upb_MethodDef* methoddef,
|
68
122
|
size_t* size, upb_Arena* arena) {
|
69
123
|
const google_protobuf_MethodOptions* opts = upb_MethodDef_Options(methoddef);
|
70
124
|
char* serialized = google_protobuf_MethodOptions_serialize(opts, arena, size);
|
71
125
|
return serialized;
|
72
126
|
}
|
127
|
+
|
128
|
+
char* MethodDescriptor_serialized_to_proto(const upb_MethodDef* methodef,
|
129
|
+
size_t* size, upb_Arena* arena) {
|
130
|
+
const google_protobuf_MethodDescriptorProto* proto =
|
131
|
+
upb_MethodDef_ToProto(methodef, arena);
|
132
|
+
char* serialized =
|
133
|
+
google_protobuf_MethodDescriptorProto_serialize(proto, arena, size);
|
134
|
+
return serialized;
|
135
|
+
}
|
@@ -362,7 +362,8 @@ static VALUE Message_field_accessor(VALUE _self, const upb_FieldDef* f,
|
|
362
362
|
if (!upb_FieldDef_HasPresence(f)) {
|
363
363
|
rb_raise(rb_eRuntimeError, "Field does not have presence.");
|
364
364
|
}
|
365
|
-
return upb_Message_HasFieldByDef(Message_Get(_self, NULL), f)
|
365
|
+
return upb_Message_HasFieldByDef(Message_Get(_self, NULL), f) ? Qtrue
|
366
|
+
: Qfalse;
|
366
367
|
case METHOD_WRAPPER_GETTER: {
|
367
368
|
Message* self = ruby_to_Message(_self);
|
368
369
|
if (upb_Message_HasFieldByDef(self->msg, f)) {
|
@@ -1046,9 +1047,6 @@ static VALUE Message_decode_json(int argc, VALUE* argv, VALUE klass) {
|
|
1046
1047
|
switch (result) {
|
1047
1048
|
case kUpb_JsonDecodeResult_Ok:
|
1048
1049
|
break;
|
1049
|
-
case kUpb_JsonDecodeResult_OkWithEmptyStringNumerics:
|
1050
|
-
rb_warn("%s", upb_Status_ErrorMessage(&status));
|
1051
|
-
break;
|
1052
1050
|
case kUpb_JsonDecodeResult_Error:
|
1053
1051
|
rb_raise(cParseError, "Error occurred during parsing: %s",
|
1054
1052
|
upb_Status_ErrorMessage(&status));
|
@@ -286,7 +286,8 @@ VALUE ObjectCache_Get(const void *key) {
|
|
286
286
|
static VALUE Google_Protobuf_discard_unknown(VALUE self, VALUE msg_rb) {
|
287
287
|
const upb_MessageDef *m;
|
288
288
|
upb_Message *msg = Message_GetMutable(msg_rb, &m);
|
289
|
-
|
289
|
+
const upb_DefPool* ext_pool = upb_FileDef_Pool(upb_MessageDef_File(m));
|
290
|
+
if (!upb_Message_DiscardUnknown(msg, m, ext_pool, 128)) {
|
290
291
|
rb_raise(rb_eRuntimeError, "Messages nested too deeply.");
|
291
292
|
}
|
292
293
|
|