google-protobuf 4.29.3-java → 4.30.0.rc.1-java
Sign up to get free protection for your applications and to get access to all the features.
- 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 +2391 -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: 07a6e2accd102240121cb4301abeeee2d07d6f15c71188380dd2a6bca0b23e96
|
4
|
+
data.tar.gz: f521ddf61e61b5ff2dde8d932b22f4317db11ac3a135b9c79e9d8e4b63e1a527
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 201bc81db609cabb82991bd4ce8e300d4435f10ae657a03d84ae46d542421250b2976c0bf61b6efc160de4b4d319d5b3d6943dd23cda61ff20494fb997aa523a
|
7
|
+
data.tar.gz: e9946b6ac6e31eee74e865926550a34faf1612d84c1a2d2e9ea306f4655de1050bd38999083a96556f649c3e5cfe711f329589c1bbd7922419e458d262c9bf60
|
@@ -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
|
|