google-protobuf 3.17.3-x86-linux → 3.18.0.rc.1-x86-linux
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.
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 +0 -1
- data/ext/google/protobuf_c/ruby-upb.c +603 -290
- data/ext/google/protobuf_c/ruby-upb.h +420 -127
- data/lib/google/2.3/protobuf_c.so +0 -0
- data/lib/google/2.4/protobuf_c.so +0 -0
- data/lib/google/2.5/protobuf_c.so +0 -0
- data/lib/google/2.6/protobuf_c.so +0 -0
- data/lib/google/2.7/protobuf_c.so +0 -0
- data/lib/google/3.0/protobuf_c.so +0 -0
- data/lib/google/protobuf.rb +1 -69
- 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
- metadata +7 -6
- data/ext/google/protobuf_c/third_party/wyhash/wyhash.h +0 -145
@@ -636,6 +636,48 @@ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
|
|
636
636
|
/* Returns a reference to the message's unknown data. */
|
637
637
|
const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
|
638
638
|
|
639
|
+
/** upb_extreg *******************************************************************/
|
640
|
+
|
641
|
+
/* Extension registry: a dynamic data structure that stores a map of:
|
642
|
+
* (upb_msglayout, number) -> extension info
|
643
|
+
*
|
644
|
+
* upb_decode() uses upb_extreg to look up extensions while parsing binary
|
645
|
+
* format.
|
646
|
+
*
|
647
|
+
* upb_extreg is part of the mini-table (msglayout) family of objects. Like all
|
648
|
+
* mini-table objects, it is suitable for reflection-less builds that do not
|
649
|
+
* want to expose names into the binary.
|
650
|
+
*
|
651
|
+
* Unlike most mini-table types, upb_extreg requires dynamic memory allocation
|
652
|
+
* and dynamic initialization:
|
653
|
+
* * If reflection is being used, then upb_symtab will construct an appropriate
|
654
|
+
* upb_extreg automatically.
|
655
|
+
* * For a mini-table only build, the user must manually construct the
|
656
|
+
* upb_extreg and populate it with all of the extensions the user cares about.
|
657
|
+
* * A third alternative is to manually unpack relevant extensions after the
|
658
|
+
* main parse is complete, similar to how Any works. This is perhaps the
|
659
|
+
* nicest solution from the perspective of reducing dependencies, avoiding
|
660
|
+
* dynamic memory allocation, and avoiding the need to parse uninteresting
|
661
|
+
* extensions. The downsides are:
|
662
|
+
* (1) parse errors are not caught during the main parse
|
663
|
+
* (2) the CPU hit of parsing comes during access, which could cause an
|
664
|
+
* undesirable stutter in application performance.
|
665
|
+
*
|
666
|
+
* Users cannot directly get or put into this map. Users can only add the
|
667
|
+
* extensions from a generated module and pass the extension registry to the
|
668
|
+
* binary decoder.
|
669
|
+
*
|
670
|
+
* A upb_symtab provides a upb_extreg, so any users who use reflection do not
|
671
|
+
* need to populate a upb_extreg directly.
|
672
|
+
*/
|
673
|
+
|
674
|
+
struct upb_extreg;
|
675
|
+
typedef struct upb_extreg upb_extreg;
|
676
|
+
|
677
|
+
/* Creates a upb_extreg in the given arena. The arena must outlive any use of
|
678
|
+
* the extreg. */
|
679
|
+
upb_extreg *upb_extreg_new(upb_arena *arena);
|
680
|
+
|
639
681
|
#ifdef __cplusplus
|
640
682
|
} /* extern "C" */
|
641
683
|
#endif
|
@@ -657,12 +699,13 @@ enum {
|
|
657
699
|
#define UPB_DECODE_MAXDEPTH(depth) ((depth) << 16)
|
658
700
|
|
659
701
|
bool _upb_decode(const char *buf, size_t size, upb_msg *msg,
|
660
|
-
const upb_msglayout *l,
|
702
|
+
const upb_msglayout *l, const upb_extreg *extreg, int options,
|
703
|
+
upb_arena *arena);
|
661
704
|
|
662
705
|
UPB_INLINE
|
663
706
|
bool upb_decode(const char *buf, size_t size, upb_msg *msg,
|
664
707
|
const upb_msglayout *l, upb_arena *arena) {
|
665
|
-
return _upb_decode(buf, size, msg, l,
|
708
|
+
return _upb_decode(buf, size, msg, l, NULL, 0, arena);
|
666
709
|
}
|
667
710
|
|
668
711
|
#ifdef __cplusplus
|
@@ -836,6 +879,10 @@ typedef struct upb_tabval {
|
|
836
879
|
|
837
880
|
/* upb_table ******************************************************************/
|
838
881
|
|
882
|
+
uint64_t Wyhash(const void *data, size_t len, uint64_t seed,
|
883
|
+
const uint64_t salt[]);
|
884
|
+
extern const uint64_t kWyhashSalt[5];
|
885
|
+
|
839
886
|
typedef struct _upb_tabent {
|
840
887
|
upb_tabkey key;
|
841
888
|
upb_tabval val;
|
@@ -1047,9 +1094,34 @@ typedef struct {
|
|
1047
1094
|
int16_t presence; /* If >0, hasbit_index. If <0, ~oneof_index. */
|
1048
1095
|
uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */
|
1049
1096
|
uint8_t descriptortype;
|
1050
|
-
|
1097
|
+
int8_t mode; /* upb_fieldmode, with flags from upb_labelflags */
|
1051
1098
|
} upb_msglayout_field;
|
1052
1099
|
|
1100
|
+
typedef enum {
|
1101
|
+
_UPB_MODE_MAP = 0,
|
1102
|
+
_UPB_MODE_ARRAY = 1,
|
1103
|
+
_UPB_MODE_SCALAR = 2,
|
1104
|
+
} upb_fieldmode;
|
1105
|
+
|
1106
|
+
/* Extra flags on the mode field. */
|
1107
|
+
enum upb_labelflags {
|
1108
|
+
_UPB_MODE_IS_PACKED = 4,
|
1109
|
+
};
|
1110
|
+
|
1111
|
+
UPB_INLINE upb_fieldmode _upb_getmode(const upb_msglayout_field *field) {
|
1112
|
+
return (upb_fieldmode)(field->mode & 3);
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) {
|
1116
|
+
/* This works because upb_fieldmode has no value 3. */
|
1117
|
+
return !(field->mode & _UPB_MODE_SCALAR);
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
UPB_INLINE bool _upb_issubmsg(const upb_msglayout_field *field) {
|
1121
|
+
return field->descriptortype == UPB_DTYPE_MESSAGE ||
|
1122
|
+
field->descriptortype == UPB_DTYPE_GROUP;
|
1123
|
+
}
|
1124
|
+
|
1053
1125
|
struct upb_decstate;
|
1054
1126
|
struct upb_msglayout;
|
1055
1127
|
|
@@ -1070,27 +1142,65 @@ struct upb_msglayout {
|
|
1070
1142
|
uint16_t size;
|
1071
1143
|
uint16_t field_count;
|
1072
1144
|
bool extendable;
|
1145
|
+
uint8_t dense_below;
|
1073
1146
|
uint8_t table_mask;
|
1074
1147
|
/* To constant-initialize the tables of variable length, we need a flexible
|
1075
1148
|
* array member, and we need to compile in C99 mode. */
|
1076
1149
|
_upb_fasttable_entry fasttable[];
|
1077
1150
|
};
|
1078
1151
|
|
1152
|
+
typedef struct {
|
1153
|
+
upb_msglayout_field field;
|
1154
|
+
const upb_msglayout *extendee;
|
1155
|
+
const upb_msglayout *submsg; /* NULL for non-submessage fields. */
|
1156
|
+
} upb_msglayout_ext;
|
1157
|
+
|
1158
|
+
/** upb_extreg ****************************************************************/
|
1159
|
+
|
1160
|
+
/* Adds the given extension info for message type |l| and field number |num|
|
1161
|
+
* into the registry. Returns false if this message type and field number were
|
1162
|
+
* already in the map, or if memory allocation fails. */
|
1163
|
+
bool _upb_extreg_add(upb_extreg *r, const upb_msglayout_ext *e, size_t count);
|
1164
|
+
|
1165
|
+
/* Looks up the extension (if any) defined for message type |l| and field
|
1166
|
+
* number |num|. If an extension was found, copies the field info into |*ext|
|
1167
|
+
* and returns true. Otherwise returns false. */
|
1168
|
+
const upb_msglayout_field *_upb_extreg_get(const upb_extreg *r,
|
1169
|
+
const upb_msglayout *l,
|
1170
|
+
uint32_t num);
|
1171
|
+
|
1079
1172
|
/** upb_msg *******************************************************************/
|
1080
1173
|
|
1081
|
-
/* Internal members of a upb_msg
|
1082
|
-
*
|
1083
|
-
* points after the
|
1174
|
+
/* Internal members of a upb_msg that track unknown fields and/or extensions.
|
1175
|
+
* We can change this without breaking binary compatibility. We put these
|
1176
|
+
* before the user's data. The user's upb_msg* points after the
|
1177
|
+
* upb_msg_internal. */
|
1084
1178
|
|
1085
1179
|
typedef struct {
|
1086
|
-
|
1180
|
+
/* Total size of this structure, including the data that follows.
|
1181
|
+
* Must be aligned to 8, which is alignof(upb_msg_ext) */
|
1087
1182
|
uint32_t size;
|
1088
|
-
/* Data follows. */
|
1089
|
-
} upb_msg_unknowndata;
|
1090
1183
|
|
1091
|
-
/*
|
1184
|
+
/* Offsets relative to the beginning of this structure.
|
1185
|
+
*
|
1186
|
+
* Unknown data grows forward from the beginning to unknown_end.
|
1187
|
+
* Extension data grows backward from size to ext_begin.
|
1188
|
+
* When the two meet, we're out of data and have to realloc.
|
1189
|
+
*
|
1190
|
+
* If we imagine that the final member of this struct is:
|
1191
|
+
* char data[size - overhead]; // overhead = sizeof(upb_msg_internaldata)
|
1192
|
+
*
|
1193
|
+
* Then we have:
|
1194
|
+
* unknown data: data[0 .. (unknown_end - overhead)]
|
1195
|
+
* extensions data: data[(ext_begin - overhead) .. (size - overhead)] */
|
1196
|
+
uint32_t unknown_end;
|
1197
|
+
uint32_t ext_begin;
|
1198
|
+
/* Data follows, as if there were an array:
|
1199
|
+
* char data[size - sizeof(upb_msg_internaldata)]; */
|
1200
|
+
} upb_msg_internaldata;
|
1201
|
+
|
1092
1202
|
typedef struct {
|
1093
|
-
|
1203
|
+
upb_msg_internaldata *internal;
|
1094
1204
|
} upb_msg_internal;
|
1095
1205
|
|
1096
1206
|
/* Maps upb_fieldtype_t -> memory size. */
|
@@ -1129,6 +1239,35 @@ void _upb_msg_discardunknown_shallow(upb_msg *msg);
|
|
1129
1239
|
bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
|
1130
1240
|
upb_arena *arena);
|
1131
1241
|
|
1242
|
+
/** upb_msg_ext ***************************************************************/
|
1243
|
+
|
1244
|
+
/* The internal representation of an extension is self-describing: it contains
|
1245
|
+
* enough information that we can serialize it to binary format without needing
|
1246
|
+
* to look it up in a registry. */
|
1247
|
+
typedef struct {
|
1248
|
+
const upb_msglayout_ext *ext;
|
1249
|
+
union {
|
1250
|
+
upb_strview str;
|
1251
|
+
void *ptr;
|
1252
|
+
double dbl;
|
1253
|
+
char scalar_data[8];
|
1254
|
+
} data;
|
1255
|
+
} upb_msg_ext;
|
1256
|
+
|
1257
|
+
/* Adds the given extension data to the given message. The returned extension will
|
1258
|
+
* have its "ext" member initialized according to |ext|. */
|
1259
|
+
upb_msg_ext *_upb_msg_getorcreateext(upb_msg *msg, const upb_msglayout_ext *ext,
|
1260
|
+
upb_arena *arena);
|
1261
|
+
|
1262
|
+
/* Returns an array of extensions for this message. Note: the array is
|
1263
|
+
* ordered in reverse relative to the order of creation. */
|
1264
|
+
const upb_msg_ext *_upb_msg_getexts(const upb_msg *msg, size_t *count);
|
1265
|
+
|
1266
|
+
/* Returns an extension for the given field number, or NULL if no extension
|
1267
|
+
* exists for this field number. */
|
1268
|
+
const upb_msg_ext *_upb_msg_getext(const upb_msg *msg,
|
1269
|
+
const upb_msglayout_ext *ext);
|
1270
|
+
|
1132
1271
|
/** Hasbit access *************************************************************/
|
1133
1272
|
|
1134
1273
|
UPB_INLINE bool _upb_hasbit(const upb_msg *msg, size_t idx) {
|
@@ -1192,14 +1331,6 @@ UPB_INLINE bool _upb_has_submsg_nohasbit(const upb_msg *msg, size_t ofs) {
|
|
1192
1331
|
return *UPB_PTR_AT(msg, ofs, const upb_msg*) != NULL;
|
1193
1332
|
}
|
1194
1333
|
|
1195
|
-
UPB_INLINE bool _upb_isrepeated(const upb_msglayout_field *field) {
|
1196
|
-
return (field->label & 3) == UPB_LABEL_REPEATED;
|
1197
|
-
}
|
1198
|
-
|
1199
|
-
UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) {
|
1200
|
-
return field->label >= UPB_LABEL_REPEATED;
|
1201
|
-
}
|
1202
|
-
|
1203
1334
|
/** upb_array *****************************************************************/
|
1204
1335
|
|
1205
1336
|
/* Our internal representation for repeated fields. */
|
@@ -2121,13 +2252,19 @@ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_
|
|
2121
2252
|
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size,
|
2122
2253
|
upb_arena *arena) {
|
2123
2254
|
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
2124
|
-
|
2255
|
+
if (!ret) return NULL;
|
2256
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) return NULL;
|
2257
|
+
return ret;
|
2125
2258
|
}
|
2126
2259
|
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse_ex(const char *buf, size_t size,
|
2127
|
-
|
2260
|
+
const upb_extreg *extreg, int options,
|
2261
|
+
upb_arena *arena) {
|
2128
2262
|
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
2129
|
-
|
2130
|
-
|
2263
|
+
if (!ret) return NULL;
|
2264
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, extreg, options, arena)) {
|
2265
|
+
return NULL;
|
2266
|
+
}
|
2267
|
+
return ret;
|
2131
2268
|
}
|
2132
2269
|
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
|
2133
2270
|
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
|
@@ -2158,13 +2295,19 @@ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorPr
|
|
2158
2295
|
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size,
|
2159
2296
|
upb_arena *arena) {
|
2160
2297
|
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
2161
|
-
|
2298
|
+
if (!ret) return NULL;
|
2299
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) return NULL;
|
2300
|
+
return ret;
|
2162
2301
|
}
|
2163
2302
|
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse_ex(const char *buf, size_t size,
|
2164
|
-
|
2303
|
+
const upb_extreg *extreg, int options,
|
2304
|
+
upb_arena *arena) {
|
2165
2305
|
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
2166
|
-
|
2167
|
-
|
2306
|
+
if (!ret) return NULL;
|
2307
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, extreg, options, arena)) {
|
2308
|
+
return NULL;
|
2309
|
+
}
|
2310
|
+
return ret;
|
2168
2311
|
}
|
2169
2312
|
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2170
2313
|
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
|
@@ -2321,13 +2464,19 @@ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(
|
|
2321
2464
|
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size,
|
2322
2465
|
upb_arena *arena) {
|
2323
2466
|
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
2324
|
-
|
2467
|
+
if (!ret) return NULL;
|
2468
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) return NULL;
|
2469
|
+
return ret;
|
2325
2470
|
}
|
2326
2471
|
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse_ex(const char *buf, size_t size,
|
2327
|
-
|
2472
|
+
const upb_extreg *extreg, int options,
|
2473
|
+
upb_arena *arena) {
|
2328
2474
|
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
2329
|
-
|
2330
|
-
|
2475
|
+
if (!ret) return NULL;
|
2476
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, extreg, options, arena)) {
|
2477
|
+
return NULL;
|
2478
|
+
}
|
2479
|
+
return ret;
|
2331
2480
|
}
|
2332
2481
|
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2333
2482
|
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
|
@@ -2480,13 +2629,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_Descr
|
|
2480
2629
|
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size,
|
2481
2630
|
upb_arena *arena) {
|
2482
2631
|
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
2483
|
-
|
2632
|
+
if (!ret) return NULL;
|
2633
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) return NULL;
|
2634
|
+
return ret;
|
2484
2635
|
}
|
2485
2636
|
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char *buf, size_t size,
|
2486
|
-
|
2637
|
+
const upb_extreg *extreg, int options,
|
2638
|
+
upb_arena *arena) {
|
2487
2639
|
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
2488
|
-
|
2489
|
-
|
2640
|
+
if (!ret) return NULL;
|
2641
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, extreg, options, arena)) {
|
2642
|
+
return NULL;
|
2643
|
+
}
|
2644
|
+
return ret;
|
2490
2645
|
}
|
2491
2646
|
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
|
2492
2647
|
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
|
@@ -2529,13 +2684,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_Descri
|
|
2529
2684
|
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size,
|
2530
2685
|
upb_arena *arena) {
|
2531
2686
|
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
2532
|
-
|
2687
|
+
if (!ret) return NULL;
|
2688
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) return NULL;
|
2689
|
+
return ret;
|
2533
2690
|
}
|
2534
2691
|
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char *buf, size_t size,
|
2535
|
-
|
2692
|
+
const upb_extreg *extreg, int options,
|
2693
|
+
upb_arena *arena) {
|
2536
2694
|
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
2537
|
-
|
2538
|
-
|
2695
|
+
if (!ret) return NULL;
|
2696
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, extreg, options, arena)) {
|
2697
|
+
return NULL;
|
2698
|
+
}
|
2699
|
+
return ret;
|
2539
2700
|
}
|
2540
2701
|
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
|
2541
2702
|
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
|
@@ -2563,13 +2724,19 @@ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRange
|
|
2563
2724
|
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size,
|
2564
2725
|
upb_arena *arena) {
|
2565
2726
|
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
2566
|
-
|
2727
|
+
if (!ret) return NULL;
|
2728
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) return NULL;
|
2729
|
+
return ret;
|
2567
2730
|
}
|
2568
2731
|
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse_ex(const char *buf, size_t size,
|
2569
|
-
|
2732
|
+
const upb_extreg *extreg, int options,
|
2733
|
+
upb_arena *arena) {
|
2570
2734
|
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
2571
|
-
|
2572
|
-
|
2735
|
+
if (!ret) return NULL;
|
2736
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, extreg, options, arena)) {
|
2737
|
+
return NULL;
|
2738
|
+
}
|
2739
|
+
return ret;
|
2573
2740
|
}
|
2574
2741
|
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
|
2575
2742
|
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
|
@@ -2600,13 +2767,19 @@ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptor
|
|
2600
2767
|
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size,
|
2601
2768
|
upb_arena *arena) {
|
2602
2769
|
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
2603
|
-
|
2770
|
+
if (!ret) return NULL;
|
2771
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) return NULL;
|
2772
|
+
return ret;
|
2604
2773
|
}
|
2605
2774
|
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse_ex(const char *buf, size_t size,
|
2606
|
-
|
2775
|
+
const upb_extreg *extreg, int options,
|
2776
|
+
upb_arena *arena) {
|
2607
2777
|
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
2608
|
-
|
2609
|
-
|
2778
|
+
if (!ret) return NULL;
|
2779
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, extreg, options, arena)) {
|
2780
|
+
return NULL;
|
2781
|
+
}
|
2782
|
+
return ret;
|
2610
2783
|
}
|
2611
2784
|
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2612
2785
|
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
|
@@ -2697,13 +2870,19 @@ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptor
|
|
2697
2870
|
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size,
|
2698
2871
|
upb_arena *arena) {
|
2699
2872
|
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
2700
|
-
|
2873
|
+
if (!ret) return NULL;
|
2874
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) return NULL;
|
2875
|
+
return ret;
|
2701
2876
|
}
|
2702
2877
|
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse_ex(const char *buf, size_t size,
|
2703
|
-
|
2878
|
+
const upb_extreg *extreg, int options,
|
2879
|
+
upb_arena *arena) {
|
2704
2880
|
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
2705
|
-
|
2706
|
-
|
2881
|
+
if (!ret) return NULL;
|
2882
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, extreg, options, arena)) {
|
2883
|
+
return NULL;
|
2884
|
+
}
|
2885
|
+
return ret;
|
2707
2886
|
}
|
2708
2887
|
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2709
2888
|
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
|
@@ -2740,13 +2919,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorPr
|
|
2740
2919
|
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size,
|
2741
2920
|
upb_arena *arena) {
|
2742
2921
|
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
2743
|
-
|
2922
|
+
if (!ret) return NULL;
|
2923
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) return NULL;
|
2924
|
+
return ret;
|
2744
2925
|
}
|
2745
2926
|
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse_ex(const char *buf, size_t size,
|
2746
|
-
|
2927
|
+
const upb_extreg *extreg, int options,
|
2928
|
+
upb_arena *arena) {
|
2747
2929
|
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
2748
|
-
|
2749
|
-
|
2930
|
+
if (!ret) return NULL;
|
2931
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, extreg, options, arena)) {
|
2932
|
+
return NULL;
|
2933
|
+
}
|
2934
|
+
return ret;
|
2750
2935
|
}
|
2751
2936
|
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2752
2937
|
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
|
@@ -2824,13 +3009,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobu
|
|
2824
3009
|
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size,
|
2825
3010
|
upb_arena *arena) {
|
2826
3011
|
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
2827
|
-
|
3012
|
+
if (!ret) return NULL;
|
3013
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) return NULL;
|
3014
|
+
return ret;
|
2828
3015
|
}
|
2829
3016
|
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char *buf, size_t size,
|
2830
|
-
|
3017
|
+
const upb_extreg *extreg, int options,
|
3018
|
+
upb_arena *arena) {
|
2831
3019
|
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
2832
|
-
|
2833
|
-
|
3020
|
+
if (!ret) return NULL;
|
3021
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, extreg, options, arena)) {
|
3022
|
+
return NULL;
|
3023
|
+
}
|
3024
|
+
return ret;
|
2834
3025
|
}
|
2835
3026
|
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
|
2836
3027
|
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
|
@@ -2858,13 +3049,19 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDe
|
|
2858
3049
|
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size,
|
2859
3050
|
upb_arena *arena) {
|
2860
3051
|
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
2861
|
-
|
3052
|
+
if (!ret) return NULL;
|
3053
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) return NULL;
|
3054
|
+
return ret;
|
2862
3055
|
}
|
2863
3056
|
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse_ex(const char *buf, size_t size,
|
2864
|
-
|
3057
|
+
const upb_extreg *extreg, int options,
|
3058
|
+
upb_arena *arena) {
|
2865
3059
|
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
2866
|
-
|
2867
|
-
|
3060
|
+
if (!ret) return NULL;
|
3061
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, extreg, options, arena)) {
|
3062
|
+
return NULL;
|
3063
|
+
}
|
3064
|
+
return ret;
|
2868
3065
|
}
|
2869
3066
|
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2870
3067
|
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
|
@@ -2907,13 +3104,19 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescri
|
|
2907
3104
|
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size,
|
2908
3105
|
upb_arena *arena) {
|
2909
3106
|
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
2910
|
-
|
3107
|
+
if (!ret) return NULL;
|
3108
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) return NULL;
|
3109
|
+
return ret;
|
2911
3110
|
}
|
2912
3111
|
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse_ex(const char *buf, size_t size,
|
2913
|
-
|
3112
|
+
const upb_extreg *extreg, int options,
|
3113
|
+
upb_arena *arena) {
|
2914
3114
|
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
2915
|
-
|
2916
|
-
|
3115
|
+
if (!ret) return NULL;
|
3116
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, extreg, options, arena)) {
|
3117
|
+
return NULL;
|
3118
|
+
}
|
3119
|
+
return ret;
|
2917
3120
|
}
|
2918
3121
|
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2919
3122
|
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
|
@@ -2965,13 +3168,19 @@ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescript
|
|
2965
3168
|
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size,
|
2966
3169
|
upb_arena *arena) {
|
2967
3170
|
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
2968
|
-
|
3171
|
+
if (!ret) return NULL;
|
3172
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) return NULL;
|
3173
|
+
return ret;
|
2969
3174
|
}
|
2970
3175
|
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse_ex(const char *buf, size_t size,
|
2971
|
-
|
3176
|
+
const upb_extreg *extreg, int options,
|
3177
|
+
upb_arena *arena) {
|
2972
3178
|
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
2973
|
-
|
2974
|
-
|
3179
|
+
if (!ret) return NULL;
|
3180
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, extreg, options, arena)) {
|
3181
|
+
return NULL;
|
3182
|
+
}
|
3183
|
+
return ret;
|
2975
3184
|
}
|
2976
3185
|
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
2977
3186
|
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
|
@@ -3032,13 +3241,19 @@ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_aren
|
|
3032
3241
|
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size,
|
3033
3242
|
upb_arena *arena) {
|
3034
3243
|
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
3035
|
-
|
3244
|
+
if (!ret) return NULL;
|
3245
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) return NULL;
|
3246
|
+
return ret;
|
3036
3247
|
}
|
3037
3248
|
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse_ex(const char *buf, size_t size,
|
3038
|
-
|
3249
|
+
const upb_extreg *extreg, int options,
|
3250
|
+
upb_arena *arena) {
|
3039
3251
|
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
3040
|
-
|
3041
|
-
|
3252
|
+
if (!ret) return NULL;
|
3253
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, extreg, options, arena)) {
|
3254
|
+
return NULL;
|
3255
|
+
}
|
3256
|
+
return ret;
|
3042
3257
|
}
|
3043
3258
|
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
|
3044
3259
|
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
|
@@ -3189,13 +3404,19 @@ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(up
|
|
3189
3404
|
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size,
|
3190
3405
|
upb_arena *arena) {
|
3191
3406
|
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
3192
|
-
|
3407
|
+
if (!ret) return NULL;
|
3408
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) return NULL;
|
3409
|
+
return ret;
|
3193
3410
|
}
|
3194
3411
|
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse_ex(const char *buf, size_t size,
|
3195
|
-
|
3412
|
+
const upb_extreg *extreg, int options,
|
3413
|
+
upb_arena *arena) {
|
3196
3414
|
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
3197
|
-
|
3198
|
-
|
3415
|
+
if (!ret) return NULL;
|
3416
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, extreg, options, arena)) {
|
3417
|
+
return NULL;
|
3418
|
+
}
|
3419
|
+
return ret;
|
3199
3420
|
}
|
3200
3421
|
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
|
3201
3422
|
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
|
@@ -3250,13 +3471,19 @@ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_ar
|
|
3250
3471
|
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size,
|
3251
3472
|
upb_arena *arena) {
|
3252
3473
|
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
3253
|
-
|
3474
|
+
if (!ret) return NULL;
|
3475
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) return NULL;
|
3476
|
+
return ret;
|
3254
3477
|
}
|
3255
3478
|
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse_ex(const char *buf, size_t size,
|
3256
|
-
|
3479
|
+
const upb_extreg *extreg, int options,
|
3480
|
+
upb_arena *arena) {
|
3257
3481
|
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
3258
|
-
|
3259
|
-
|
3482
|
+
if (!ret) return NULL;
|
3483
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, extreg, options, arena)) {
|
3484
|
+
return NULL;
|
3485
|
+
}
|
3486
|
+
return ret;
|
3260
3487
|
}
|
3261
3488
|
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
|
3262
3489
|
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
|
@@ -3323,13 +3550,19 @@ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_ar
|
|
3323
3550
|
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size,
|
3324
3551
|
upb_arena *arena) {
|
3325
3552
|
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
3326
|
-
|
3553
|
+
if (!ret) return NULL;
|
3554
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) return NULL;
|
3555
|
+
return ret;
|
3327
3556
|
}
|
3328
3557
|
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse_ex(const char *buf, size_t size,
|
3329
|
-
|
3558
|
+
const upb_extreg *extreg, int options,
|
3559
|
+
upb_arena *arena) {
|
3330
3560
|
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
3331
|
-
|
3332
|
-
|
3561
|
+
if (!ret) return NULL;
|
3562
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, extreg, options, arena)) {
|
3563
|
+
return NULL;
|
3564
|
+
}
|
3565
|
+
return ret;
|
3333
3566
|
}
|
3334
3567
|
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
|
3335
3568
|
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
|
@@ -3360,13 +3593,19 @@ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_aren
|
|
3360
3593
|
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size,
|
3361
3594
|
upb_arena *arena) {
|
3362
3595
|
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
3363
|
-
|
3596
|
+
if (!ret) return NULL;
|
3597
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) return NULL;
|
3598
|
+
return ret;
|
3364
3599
|
}
|
3365
3600
|
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse_ex(const char *buf, size_t size,
|
3366
|
-
|
3601
|
+
const upb_extreg *extreg, int options,
|
3602
|
+
upb_arena *arena) {
|
3367
3603
|
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
3368
|
-
|
3369
|
-
|
3604
|
+
if (!ret) return NULL;
|
3605
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, extreg, options, arena)) {
|
3606
|
+
return NULL;
|
3607
|
+
}
|
3608
|
+
return ret;
|
3370
3609
|
}
|
3371
3610
|
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
|
3372
3611
|
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
|
@@ -3409,13 +3648,19 @@ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_ne
|
|
3409
3648
|
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size,
|
3410
3649
|
upb_arena *arena) {
|
3411
3650
|
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
3412
|
-
|
3651
|
+
if (!ret) return NULL;
|
3652
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) return NULL;
|
3653
|
+
return ret;
|
3413
3654
|
}
|
3414
3655
|
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse_ex(const char *buf, size_t size,
|
3415
|
-
|
3656
|
+
const upb_extreg *extreg, int options,
|
3657
|
+
upb_arena *arena) {
|
3416
3658
|
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
3417
|
-
|
3418
|
-
|
3659
|
+
if (!ret) return NULL;
|
3660
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, extreg, options, arena)) {
|
3661
|
+
return NULL;
|
3662
|
+
}
|
3663
|
+
return ret;
|
3419
3664
|
}
|
3420
3665
|
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
|
3421
3666
|
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
|
@@ -3452,13 +3697,19 @@ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(up
|
|
3452
3697
|
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size,
|
3453
3698
|
upb_arena *arena) {
|
3454
3699
|
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
3455
|
-
|
3700
|
+
if (!ret) return NULL;
|
3701
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) return NULL;
|
3702
|
+
return ret;
|
3456
3703
|
}
|
3457
3704
|
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse_ex(const char *buf, size_t size,
|
3458
|
-
|
3705
|
+
const upb_extreg *extreg, int options,
|
3706
|
+
upb_arena *arena) {
|
3459
3707
|
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
3460
|
-
|
3461
|
-
|
3708
|
+
if (!ret) return NULL;
|
3709
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, extreg, options, arena)) {
|
3710
|
+
return NULL;
|
3711
|
+
}
|
3712
|
+
return ret;
|
3462
3713
|
}
|
3463
3714
|
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
|
3464
3715
|
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
|
@@ -3495,13 +3746,19 @@ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_
|
|
3495
3746
|
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size,
|
3496
3747
|
upb_arena *arena) {
|
3497
3748
|
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
3498
|
-
|
3749
|
+
if (!ret) return NULL;
|
3750
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) return NULL;
|
3751
|
+
return ret;
|
3499
3752
|
}
|
3500
3753
|
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse_ex(const char *buf, size_t size,
|
3501
|
-
|
3754
|
+
const upb_extreg *extreg, int options,
|
3755
|
+
upb_arena *arena) {
|
3502
3756
|
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
3503
|
-
|
3504
|
-
|
3757
|
+
if (!ret) return NULL;
|
3758
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, extreg, options, arena)) {
|
3759
|
+
return NULL;
|
3760
|
+
}
|
3761
|
+
return ret;
|
3505
3762
|
}
|
3506
3763
|
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
|
3507
3764
|
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
|
@@ -3544,13 +3801,19 @@ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOpt
|
|
3544
3801
|
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size,
|
3545
3802
|
upb_arena *arena) {
|
3546
3803
|
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
3547
|
-
|
3804
|
+
if (!ret) return NULL;
|
3805
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) return NULL;
|
3806
|
+
return ret;
|
3548
3807
|
}
|
3549
3808
|
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse_ex(const char *buf, size_t size,
|
3550
|
-
|
3809
|
+
const upb_extreg *extreg, int options,
|
3810
|
+
upb_arena *arena) {
|
3551
3811
|
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
3552
|
-
|
3553
|
-
|
3812
|
+
if (!ret) return NULL;
|
3813
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, extreg, options, arena)) {
|
3814
|
+
return NULL;
|
3815
|
+
}
|
3816
|
+
return ret;
|
3554
3817
|
}
|
3555
3818
|
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
|
3556
3819
|
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
|
@@ -3617,13 +3880,19 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_Uninter
|
|
3617
3880
|
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size,
|
3618
3881
|
upb_arena *arena) {
|
3619
3882
|
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
3620
|
-
|
3883
|
+
if (!ret) return NULL;
|
3884
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) return NULL;
|
3885
|
+
return ret;
|
3621
3886
|
}
|
3622
3887
|
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse_ex(const char *buf, size_t size,
|
3623
|
-
|
3888
|
+
const upb_extreg *extreg, int options,
|
3889
|
+
upb_arena *arena) {
|
3624
3890
|
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
3625
|
-
|
3626
|
-
|
3891
|
+
if (!ret) return NULL;
|
3892
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, extreg, options, arena)) {
|
3893
|
+
return NULL;
|
3894
|
+
}
|
3895
|
+
return ret;
|
3627
3896
|
}
|
3628
3897
|
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
|
3629
3898
|
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
|
@@ -3651,13 +3920,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(up
|
|
3651
3920
|
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size,
|
3652
3921
|
upb_arena *arena) {
|
3653
3922
|
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
3654
|
-
|
3923
|
+
if (!ret) return NULL;
|
3924
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) return NULL;
|
3925
|
+
return ret;
|
3655
3926
|
}
|
3656
3927
|
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse_ex(const char *buf, size_t size,
|
3657
|
-
|
3928
|
+
const upb_extreg *extreg, int options,
|
3929
|
+
upb_arena *arena) {
|
3658
3930
|
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
3659
|
-
|
3660
|
-
|
3931
|
+
if (!ret) return NULL;
|
3932
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, extreg, options, arena)) {
|
3933
|
+
return NULL;
|
3934
|
+
}
|
3935
|
+
return ret;
|
3661
3936
|
}
|
3662
3937
|
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
|
3663
3938
|
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
|
@@ -3688,13 +3963,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeIn
|
|
3688
3963
|
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size,
|
3689
3964
|
upb_arena *arena) {
|
3690
3965
|
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
3691
|
-
|
3966
|
+
if (!ret) return NULL;
|
3967
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) return NULL;
|
3968
|
+
return ret;
|
3692
3969
|
}
|
3693
3970
|
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse_ex(const char *buf, size_t size,
|
3694
|
-
|
3971
|
+
const upb_extreg *extreg, int options,
|
3972
|
+
upb_arena *arena) {
|
3695
3973
|
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
3696
|
-
|
3697
|
-
|
3974
|
+
if (!ret) return NULL;
|
3975
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, extreg, options, arena)) {
|
3976
|
+
return NULL;
|
3977
|
+
}
|
3978
|
+
return ret;
|
3698
3979
|
}
|
3699
3980
|
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
|
3700
3981
|
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
|
@@ -3755,13 +4036,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_
|
|
3755
4036
|
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size,
|
3756
4037
|
upb_arena *arena) {
|
3757
4038
|
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
3758
|
-
|
4039
|
+
if (!ret) return NULL;
|
4040
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) return NULL;
|
4041
|
+
return ret;
|
3759
4042
|
}
|
3760
4043
|
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse_ex(const char *buf, size_t size,
|
3761
|
-
|
4044
|
+
const upb_extreg *extreg, int options,
|
4045
|
+
upb_arena *arena) {
|
3762
4046
|
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
3763
|
-
|
3764
|
-
|
4047
|
+
if (!ret) return NULL;
|
4048
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, extreg, options, arena)) {
|
4049
|
+
return NULL;
|
4050
|
+
}
|
4051
|
+
return ret;
|
3765
4052
|
}
|
3766
4053
|
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
|
3767
4054
|
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
|
@@ -3792,13 +4079,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_Generat
|
|
3792
4079
|
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size,
|
3793
4080
|
upb_arena *arena) {
|
3794
4081
|
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
3795
|
-
|
4082
|
+
if (!ret) return NULL;
|
4083
|
+
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) return NULL;
|
4084
|
+
return ret;
|
3796
4085
|
}
|
3797
4086
|
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char *buf, size_t size,
|
3798
|
-
|
4087
|
+
const upb_extreg *extreg, int options,
|
4088
|
+
upb_arena *arena) {
|
3799
4089
|
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
3800
|
-
|
3801
|
-
|
4090
|
+
if (!ret) return NULL;
|
4091
|
+
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, extreg, options, arena)) {
|
4092
|
+
return NULL;
|
4093
|
+
}
|
4094
|
+
return ret;
|
3802
4095
|
}
|
3803
4096
|
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
|
3804
4097
|
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
|