Go to the documentation of this file.
40 #include "upb/port_def.inc"
89 #if UINTPTR_MAX == 0xffffffff
129 #if UINTPTR_MAX == 0xffffffff
145 #if UINTPTR_MAX == 0xffffffff
166 #if UINTPTR_MAX == 0xffffffff
247 #define FIELD_TYPE_UNSPECIFIED 0
279 return upb_value_constptr((
const void*)
num);
284 return c >= low &&
c <= high;
306 if (fullname == NULL) {
308 }
else if ((
p = strrchr(fullname,
'.')) == NULL) {
343 if (!strcmp(
name,
"google.protobuf.Any")) {
345 }
else if (!strcmp(
name,
"google.protobuf.FieldMask")) {
347 }
else if (!strcmp(
name,
"google.protobuf.Duration")) {
349 }
else if (!strcmp(
name,
"google.protobuf.Timestamp")) {
351 }
else if (!strcmp(
name,
"google.protobuf.DoubleValue")) {
353 }
else if (!strcmp(
name,
"google.protobuf.FloatValue")) {
355 }
else if (!strcmp(
name,
"google.protobuf.Int64Value")) {
357 }
else if (!strcmp(
name,
"google.protobuf.UInt64Value")) {
359 }
else if (!strcmp(
name,
"google.protobuf.Int32Value")) {
361 }
else if (!strcmp(
name,
"google.protobuf.UInt32Value")) {
363 }
else if (!strcmp(
name,
"google.protobuf.BoolValue")) {
365 }
else if (!strcmp(
name,
"google.protobuf.StringValue")) {
367 }
else if (!strcmp(
name,
"google.protobuf.BytesValue")) {
369 }
else if (!strcmp(
name,
"google.protobuf.Value")) {
371 }
else if (!strcmp(
name,
"google.protobuf.ListValue")) {
373 }
else if (!strcmp(
name,
"google.protobuf.Struct")) {
399 return e->containing_type;
404 return e->defaultval;
413 ? upb_value_getconstptr(
v)
432 return &e->values[
i];
544 return f->is_extension_;
558 return f->has_json_name_;
568 return f->is_extension_ ?
f->scope.extension_scope : NULL;
572 return f->is_extension_ ? NULL :
f->scope.oneof;
629 return &
f->msgdef->layout->fields[
f->layout_index];
635 return f->file->ext_layouts[
f->layout_index];
639 return f->proto3_optional_;
678 return x >= low &&
x <= high;
710 return m->containing_type;
718 return m->file->syntax;
762 if (out_f) *out_f =
f;
763 if (out_o) *out_o =
o;
787 return m->real_oneof_count;
791 return m->ext_range_count;
795 return m->field_count;
799 return m->oneof_count;
803 return m->nested_msg_count;
807 return m->nested_enum_count;
811 return m->nested_ext_count;
815 return m->real_oneof_count;
825 return &
m->ext_ranges[
i];
830 return &
m->fields[
i];
835 return &
m->oneofs[
i];
841 return &
m->nested_msgs[
i];
846 return &
m->nested_enums[
i];
852 return &
m->nested_exts[
i];
856 return m->well_known_type;
889 return o -
o->parent->oneofs;
899 ? upb_value_getptr(val)
927 return f->top_lvl_msg_count;
933 return f->public_dep_count;
937 return f->weak_dep_count;
941 return f->public_deps;
949 return f->top_lvl_enum_count;
953 return f->top_lvl_ext_count;
965 return f->deps[
f->public_deps[
i]];
970 return f->deps[
f->weak_deps[
i]];
975 return &
f->top_lvl_msgs[
i];
980 return &
f->top_lvl_enums[
i];
985 return &
f->top_lvl_exts[
i];
990 return &
f->services[
i];
1007 return m->full_name;
1021 return m->input_type;
1025 return m->output_type;
1029 return m->client_streaming;
1033 return m->server_streaming;
1048 return s->full_name;
1062 return s->method_count;
1066 return i < 0 || i >= s->method_count ? NULL : &s->methods[
i];
1071 for (
int i = 0;
i < s->method_count;
i++) {
1073 return &s->methods[
i];
1094 s->bytes_loaded = 0;
1103 if (!s->extreg)
goto err;
1172 return m->in_message_set ? &
m->nested_exts[0] : NULL;
1227 const char* last_dot = strrchr(
name,
'.');
1250 #define CHK_OOM(x) \
1252 symtab_oomerr(ctx); \
1283 if (
bytes == 0)
return NULL;
1291 #define SET_OPTIONS(target, desc_type, options_type, proto) \
1292 if (google_protobuf_##desc_type##_has_options(proto)) { \
1294 char* pb = google_protobuf_##options_type##_serialize( \
1295 google_protobuf_##desc_type##_options(proto), ctx->tmp_arena, &size); \
1297 target = google_protobuf_##options_type##_parse(pb, size, ctx->arena); \
1300 target = (const google_protobuf_##options_type*)opt_default; \
1308 for (
i = 0;
i <
len;
i++) {
1311 if (
start || !full) {
1312 symtab_errf(
ctx,
"invalid name: unexpected '.' (%.*s)", (
int)
len,
str);
1319 "invalid name: path components must start with a letter (%.*s)",
1325 symtab_errf(
ctx,
"invalid name: non-alphanumeric character (%.*s)",
1331 symtab_errf(
ctx,
"invalid name: empty part (%.*s)", (
int)
len,
str);
1351 return sizeof(
void*);
1363 return sizeof(ent.
k);
1365 return sizeof(
void*);
1377 symtab_errf(
ctx,
"size of message %s exceeded max size of %zu bytes",
1388 return f1->number -
f2->number;
1395 int dense_below = 0;
1396 for (
i = 0;
i <
n;
i++) {
1400 f->layout_index =
i;
1403 dense_below =
i + 1;
1406 l->dense_below = dense_below;
1417 UPB_TREAT_PROTO2_ENUMS_LIKE_PROTO3 ||
1440 static const uint8_t sizes[] = {
1479 size_t sublayout_count = 0;
1486 for (
size_t i = 0;
i < field_count;
i++) {
1504 l->required_count = 0;
1519 l->fasttable[0].field_data = 0;
1536 fields[1].submsg_index = 0;
1567 for (
int i = 0;
i <
m->field_count;
i++) {
1571 field->presence = ++hasbit;
1573 symtab_errf(
ctx,
"Message with >=63 required fields: %s",
1576 l->required_count++;
1581 sublayout_count = 0;
1582 for (
int i = 0;
i <
m->field_count;
i++) {
1590 field->submsg_index = sublayout_count++;
1593 field->submsg_index = sublayout_count++;
1604 field->presence = ++hasbit;
1606 field->presence = 0;
1614 for (
int i = 0;
i <
m->field_count;
i++) {
1629 for (
int i = 0;
i <
m->oneof_count;
i++) {
1631 size_t case_size =
sizeof(
uint32_t);
1632 size_t field_size = 0;
1638 if (
o->field_count == 0) {
1639 symtab_errf(
ctx,
"Oneof must have at least one field (%s)",
o->full_name);
1643 for (
int j = 0; j <
o->field_count; j++) {
1652 for (
int i = 0;
i <
o->field_count;
i++) {
1678 return n == strlen(
b) && memcmp(
a,
b,
n) == 0;
1703 int synthetic_count = 0;
1706 for (
i = 0;
i <
m->oneof_count;
i++) {
1709 if (
o->synthetic &&
o->field_count != 1) {
1710 symtab_errf(
ctx,
"Synthetic oneofs must have one field, not %d: %s",
1716 }
else if (synthetic_count != 0) {
1717 symtab_errf(
ctx,
"Synthetic oneofs must be after all other oneofs: %s",
1725 for (
i = 0;
i <
m->field_count;
i++) {
1729 o->fields[
o->field_count++] =
f;
1733 m->real_oneof_count =
m->oneof_count - synthetic_count;
1737 size_t src,
dst = 0;
1738 bool ucase_next =
false;
1740 #define WRITE(byte) \
1743 buf[dst - 1] = byte; \
1744 else if (dst == len) \
1756 for (src = 0;
name[src]; src++) {
1757 if (
name[src] ==
'_') {
1790 symtab_errf(
ctx,
"duplicate symbol '%s'",
name);
1798 if (*
len == 0)
return false;
1800 for (
size_t i = *
len - 1;
i > 0;
i--) {
1801 if (
base[
i] ==
'.') {
1814 const char* from_name_dbg,
1818 if (sym.
size == 0)
goto notfound;
1820 if (sym.
data[0] ==
'.') {
1828 size_t baselen =
base ? strlen(
base) : 0;
1829 char*
tmp = malloc(sym.
size + baselen + 1);
1864 if (
ret && found_type !=
type) {
1866 "type mismatch when resolving %s: couldn't find "
1884 o->synthetic =
false;
1890 symtab_errf(
ctx,
"duplicate oneof name (%s)",
o->full_name);
1911 if (*src ==
end)
return false;
1922 if (
'0' <=
ch &&
ch <=
'9') {
1926 if (
'a' <=
ch &&
ch <=
'f') {
1927 return ch -
'a' + 0xa;
1937 if (hex_digit < 0) {
1939 "\\x cannot be followed by non-hex digit in field '%s' default",
1943 unsigned int ret = hex_digit;
1945 ret = (
ret << 4) | hex_digit;
1948 symtab_errf(
ctx,
"Value of hex escape in field %s exceeds 8 bits",
1958 if (
'0' <=
ch &&
ch <=
'7') {
1967 const char** src,
const char*
end) {
1969 for (
int i = 0;
i < 3;
i++) {
1972 ch = (
ch << 3) | digit;
1979 const char** src,
const char*
end) {
1982 symtab_errf(
ctx,
"unterminated escape sequence in field %s",
2023 symtab_errf(
ctx,
"Unknown escape sequence: \\%c",
ch);
2027 const char*
data,
size_t len) {
2030 char*
dst = &
ret->str[0];
2031 const char* src =
data;
2062 symtab_errf(
ctx,
"Default too long: %.*s", (
int)
len,
str);
2074 long val = strtol(
str, &
end, 0);
2078 f->defaultval.sint = val;
2088 f->defaultval.sint = ev->
number;
2092 long long val = strtoll(
str, &
end, 0);
2096 f->defaultval.sint = val;
2100 unsigned long val = strtoul(
str, &
end, 0);
2104 f->defaultval.uint = val;
2108 unsigned long long val = strtoull(
str, &
end, 0);
2112 f->defaultval.uint = val;
2116 double val = strtod(
str, &
end);
2117 if (errno == ERANGE || *
end) {
2120 f->defaultval.dbl = val;
2124 float val = strtof(
str, &
end);
2125 if (errno == ERANGE || *
end) {
2128 f->defaultval.flt = val;
2133 f->defaultval.boolean =
false;
2135 f->defaultval.boolean =
true;
2149 symtab_errf(
ctx,
"Message should not have a default (%s)",
2156 symtab_errf(
ctx,
"Invalid default '%.*s' for field %s of type %d", (
int)
len,
2164 f->defaultval.sint = 0;
2168 f->defaultval.uint = 0;
2172 f->defaultval.dbl = 0;
2179 f->defaultval.boolean =
false;
2182 f->defaultval.sint =
f->sub.enumdef->values[0].number;
2194 const char* full_name;
2195 const char* json_name;
2199 f->file =
ctx->file;
2202 symtab_errf(
ctx,
"field has no name");
2213 f->has_json_name_ =
true;
2216 f->has_json_name_ =
false;
2221 f->full_name = full_name;
2222 f->json_name = json_name;
2224 f->number_ = field_number;
2225 f->scope.oneof = NULL;
2226 f->proto3_optional_ =
2230 bool has_type_name =
2240 if (!has_type_name) {
2241 symtab_errf(
ctx,
"field of type %d requires type name (%s)",
2242 (
int)
f->type_, full_name);
2246 if (has_type_name) {
2247 symtab_errf(
ctx,
"invalid type for field with type_name set (%s, %d)",
2248 full_name, (
int)
f->type_);
2251 }
else if (has_type_name) {
2256 if (!is_extension) {
2262 symtab_errf(
ctx,
"invalid field number (%u)", field_number);
2265 f->index_ =
f -
m->fields;
2267 f->is_extension_ =
false;
2271 v = upb_value_constptr(
f);
2272 json_size = strlen(json_name);
2275 symtab_errf(
ctx,
"duplicate field name (%s)",
shortname);
2281 if (strcmp(
shortname, json_name) != 0) {
2283 symtab_errf(
ctx,
"duplicate json_name (%s)", json_name);
2291 symtab_errf(
ctx,
"duplicate field number (%u)", field_number);
2298 int count =
m->layout->field_count;
2302 f->layout_index =
i;
2311 f->is_extension_ =
true;
2312 f->scope.extension_scope =
m;
2314 f->layout_index =
ctx->ext_count++;
2316 UPB_ASSERT(
ctx->file->ext_layouts[
f->layout_index]->field.number ==
2322 symtab_errf(
ctx,
"invalid type for field %s (%d)",
f->full_name,
f->type_);
2326 symtab_errf(
ctx,
"invalid label for field %s (%d)",
f->full_name,
2333 f->sub.unresolved = field_proto;
2337 symtab_errf(
ctx,
"proto3 fields cannot be required (%s)",
f->full_name);
2347 symtab_errf(
ctx,
"fields in oneof must have OPTIONAL label (%s)",
2352 symtab_errf(
ctx,
"oneof_index provided for extension field (%s)",
2356 if (oneof_index >=
m->oneof_count) {
2357 symtab_errf(
ctx,
"oneof_index out of range (%s)",
f->full_name);
2361 f->scope.oneof = oneof;
2364 if (
f->proto3_optional_) {
2371 if (
f->proto3_optional_) {
2372 symtab_errf(
ctx,
"field with proto3_optional was not in a oneof (%s)",
2397 s->file =
ctx->file;
2406 s->method_count =
n;
2411 for (
i = 0;
i <
n;
i++) {
2420 m->client_streaming =
2422 m->server_streaming =
2425 ctx,
m->full_name,
m->full_name,
2429 ctx,
m->full_name,
m->full_name,
2450 return a <
b ? -1 : (
a ==
b ? 0 : 1);
2458 for (
int i = 0;
i < e->value_count;
i++) {
2461 mask |= 1
ULL << val;
2474 for (
int i = 0;
i < e->value_count;
i++) {
2487 for (
int i = 0;
i <
n;
dst++) {
2521 symtab_errf(
ctx,
"for proto3, the first enum value must be zero (%s)",
2543 e->file =
ctx->file;
2561 symtab_errf(
ctx,
"enums must contain at least one value (%s)",
2567 for (
i = 0;
i <
n;
i++) {
2576 e->layout =
ctx->layout->enums[
ctx->enum_count++];
2599 size_t i, n_oneof, n_field, n_ext_range;
2602 m->file =
ctx->file;
2622 m->layout =
ctx->layout->msgs[
ctx->msg_count++];
2632 m->oneof_count = n_oneof;
2634 for (
i = 0;
i < n_oneof;
i++) {
2638 m->field_count = n_field;
2640 for (
i = 0;
i < n_field;
i++) {
2645 m->ext_range_count = n_ext_range;
2647 for (
i = 0;
i < n_ext_range;
i++) {
2660 if (
start < 1 || end <= start || end >
max) {
2661 symtab_errf(
ctx,
"Extension range (%d, %d) is invalid, message=%s\n",
2684 m->nested_enum_count =
n;
2686 for (
size_t i = 0;
i <
n;
i++) {
2687 m->nested_enum_count =
i + 1;
2693 m->nested_ext_count =
n;
2695 for (
size_t i = 0;
i <
n;
i++) {
2703 m->nested_msg_count =
n;
2705 for (
size_t i = 0;
i <
n;
i++) {
2717 switch ((
int)
f->type_) {
2726 f->sub.enumdef =
def;
2730 f->sub.msgdef =
def;
2735 symtab_errf(
ctx,
"Couldn't resolve type name for field %s",
2760 symtab_errf(
ctx,
"extension for field '%s' had no extendee",
f->full_name);
2771 for (
int i = 0,
n =
m->ext_range_count;
i <
n;
i++) {
2773 if (
r->start <=
f->number_ &&
f->number_ <
r->end) {
2781 "field number %u in extension %s has no extension range in "
2783 (
unsigned)
f->number_,
f->full_name,
f->msgdef->full_name);
2813 symtab_errf(
ctx,
"proto3 fields cannot have explicit defaults (%s)",
2818 symtab_errf(
ctx,
"message fields cannot have explicit defaults (%s)",
2823 f->has_default =
true;
2826 f->has_default =
false;
2838 if (
f->is_extension_) {
2844 for (
int i = 0;
i <
m->field_count;
i++) {
2848 m->in_message_set =
false;
2849 for (
int i = 0;
i <
m->nested_ext_count;
i++) {
2855 ext->msgdef->opts)) {
2856 m->in_message_set =
true;
2862 for (
int i = 0;
i <
m->nested_msg_count;
i++) {
2874 for (
size_t i = 0;
i <
n;
i++) {
2899 for (
int i = 0;
i <
n;
i++) {
2902 file->ext_count = ext_count;
2906 file->ext_layouts =
ctx->layout->exts;
2907 if (
ctx->layout->ext_count !=
file->ext_count) {
2908 symtab_errf(
ctx,
"Extension count did not match layout (%d vs %d)",
2909 ctx->layout->ext_count,
file->ext_count);
2917 for (
int i = 0;
i <
file->ext_count;
i++) {
2923 symtab_errf(
ctx,
"File has no name");
2931 google_protobuf_FileDescriptorProto_package(file_proto);
2935 file->package = NULL;
2959 file->dep_count =
n;
2962 for (
i = 0;
i <
n;
i++) {
2966 if (!
file->deps[
i]) {
2969 "', but it has not been loaded",
2976 file->public_dep_count =
n;
2980 if (public_deps[
i] >=
file->dep_count) {
2981 symtab_errf(
ctx,
"public_dep %d is out of range", (
int)public_deps[
i]);
2983 mutable_public_deps[
i] = public_deps[
i];
2988 file->weak_dep_count =
n;
2992 if (weak_deps[
i] >=
file->dep_count) {
2993 symtab_errf(
ctx,
"weak_dep %d is out of range", (
int)weak_deps[
i]);
2995 mutable_weak_deps[
i] = weak_deps[
i];
3000 file->top_lvl_enum_count =
n;
3002 for (
i = 0;
i <
n;
i++) {
3008 file->top_lvl_ext_count =
n;
3010 for (
i = 0;
i <
n;
i++) {
3018 file->top_lvl_msg_count =
n;
3020 for (
i = 0;
i <
n;
i++) {
3026 file->service_count =
n;
3028 for (
i = 0;
i <
n;
i++) {
3034 for (
i = 0;
i < (size_t)
file->top_lvl_ext_count;
i++) {
3038 for (
i = 0;
i < (size_t)
file->top_lvl_msg_count;
i++) {
3042 if (
file->ext_count) {
3096 status,
"tried to build with a different layout (filename=%.*s)",
3150 bool rebuild_minitable) {
3171 init->descriptor.data,
init->descriptor.size, NULL,
3173 s->bytes_loaded +=
init->descriptor.size;
3178 "Failed to parse compiled-in descriptor for file '%s'. This should "
3194 "Error loading compiled-in descriptor for file '%s' (this should "
3195 "never happen): %s\n",
3202 return s->bytes_loaded;
3212 return upb_value_getconstptr(
v);
bool upb_FieldDef_IsPrimitive(const upb_FieldDef *f)
const upb_MessageDef * upb_EnumDef_ContainingType(const upb_EnumDef *e)
@ kUpb_WellKnown_StringValue
const char * upb_OneofDef_Name(const upb_OneofDef *o)
const upb_OneofDef * upb_MessageDef_FindOneofByNameWithSize(const upb_MessageDef *m, const char *name, size_t len)
upb_FieldType upb_FieldDef_Type(const upb_FieldDef *f)
const upb_MiniTable_File * layout
uint32_t upb_FieldDef_Number(const upb_FieldDef *f)
#define kUpb_MaxFieldNumber
bool upb_FieldDef_HasDefault(const upb_FieldDef *f)
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg)
const google_protobuf_MessageOptions * opts
const google_protobuf_EnumValueOptions * opts
static _upb_DefPool_Init * deps[4]
static int field_number_cmp(const void *p1, const void *p2)
bool upb_FieldDef_IsPacked(const upb_FieldDef *f)
@ kUpb_FieldType_SFixed64
UPB_INLINE bool upb_inttable_insert(upb_inttable *t, uintptr_t key, upb_value val)
const upb_MessageDef * input_type
bool upb_ExtensionRange_HasOptions(const upb_ExtensionRange *r)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg)
static void resolve_fielddef(symtab_addctx *ctx, const char *prefix, upb_FieldDef *f)
const upb_EnumDef * enumdef
static const char opt_default_buf[_UPB_MAXOPT_SIZE+sizeof(void *)]
const upb_MiniTable_Extension ** ext_layouts
const upb_EnumDef * upb_DefPool_FindEnumByName(const upb_DefPool *s, const char *sym)
const upb_EnumValueDef * upb_EnumDef_FindValueByNameWithSize(const upb_EnumDef *def, const char *name, size_t len)
const upb_FieldDef ** upb_DefPool_GetAllExtensions(const upb_DefPool *s, const upb_MessageDef *m, size_t *count)
UPB_INLINE upb_StringView const * google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
bool upb_MethodDef_ServerStreaming(const upb_MethodDef *m)
static str_t * newstr(symtab_addctx *ctx, const char *data, size_t len)
const upb_ExtensionRange * upb_MessageDef_ExtensionRange(const upb_MessageDef *m, int i)
bool upb_FieldDef_HasSubDef(const upb_FieldDef *f)
static uint8_t map_descriptortype(const upb_FieldDef *f)
struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto
int upb_OneofDef_numfields(const upb_OneofDef *o)
const google_protobuf_FieldDescriptorProto * unresolved
return memset(p, 0, total)
static upb_value pack_def(const void *ptr, upb_deftype_t type)
const char * upb_FileDef_Package(const upb_FileDef *f)
const grpc_generator::File * file
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg)
const upb_MessageDef * output_type
const upb_MiniTable * upb_MessageDef_MiniTable(const upb_MessageDef *m)
UPB_INLINE bool upb_strtable_init(upb_strtable *table, upb_ctype_t ctype)
#define UPB_STRINGVIEW_ARGS(view)
upb_Syntax upb_MessageDef_Syntax(const upb_MessageDef *m)
const UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *const * google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len)
@ kUpb_LabelFlags_IsPacked
int upb_MessageDef_numfields(const upb_MessageDef *m)
int upb_MessageDef_NestedMessageCount(const upb_MessageDef *m)
char upb_DefPool_TryGetOctalDigit(const char **src, const char *end)
#define FIELD_TYPE_UNSPECIFIED
const upb_FieldDef * upb_OneofDef_LookupNumber(const upb_OneofDef *o, uint32_t num)
struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto
const char * upb_EnumValueDef_Name(const upb_EnumValueDef *ev)
const char * upb_ServiceDef_Name(const upb_ServiceDef *s)
const char * upb_MethodDef_Name(const upb_MethodDef *m)
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg)
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg)
const upb_EnumDef * upb_MessageDef_NestedEnum(const upb_MessageDef *m, int i)
const int32_t * _upb_FileDef_WeakDependencyIndexes(const upb_FileDef *f)
#define SET_OPTIONS(target, desc_type, options_type, proto)
bool upb_MessageDef_FindByNameWithSize(const upb_MessageDef *m, const char *name, size_t len, const upb_FieldDef **out_f, const upb_OneofDef **out_o)
const upb_ExtensionRegistry * upb_DefPool_ExtensionRegistry(const upb_DefPool *s)
const struct upb_MiniTable * submsg
const upb_EnumDef * top_lvl_enums
bool upb_MessageDef_HasOptions(const upb_MessageDef *m)
const upb_EnumDef * nested_enums
const upb_FileDef * upb_FileDef_Dependency(const upb_FileDef *f, int i)
static int count_bits_debug(uint64_t x)
const upb_EnumValueDef * upb_DefPool_FindEnumByNameval(const upb_DefPool *s, const char *sym)
const char * upb_MethodDef_FullName(const upb_MethodDef *m)
const UPB_INLINE google_protobuf_EnumValueDescriptorProto *const * google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
#define UPB_ALIGN_UP(size, align)
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg)
#define UPB_UNREACHABLE()
const upb_FileDef * upb_FieldDef_File(const upb_FieldDef *f)
static void create_enumvaldef(symtab_addctx *ctx, const char *prefix, const google_protobuf_EnumValueDescriptorProto *val_proto, upb_EnumDef *e, int i)
static bool between(int32_t x, int32_t low, int32_t high)
UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg)
const upb_MessageDef * parent
const upb_FieldDef * _upb_DefPool_FindExtensionByMiniTable(const upb_DefPool *s, const upb_MiniTable_Extension *ext)
const upb_MessageDef * upb_OneofDef_ContainingType(const upb_OneofDef *o)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg)
@ kUpb_FieldType_SFixed32
static void set_default_default(symtab_addctx *ctx, upb_FieldDef *f)
static struct test_ctx ctx
bool upb_FieldDef_checktype(int32_t type)
@ UPB_DEFTYPE_FIELD_JSONNAME
struct google_protobuf_EnumOptions google_protobuf_EnumOptions
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg)
const upb_MiniTable_Field * upb_FieldDef_MiniTable(const upb_FieldDef *f)
static void resolve_extension(symtab_addctx *ctx, const char *prefix, upb_FieldDef *f, const google_protobuf_FieldDescriptorProto *field_proto)
bool upb_strtable_lookup2(const upb_strtable *t, const char *key, size_t len, upb_value *v)
int upb_FileDef_TopLevelExtensionCount(const upb_FileDef *f)
bool upb_FieldDef_checkdescriptortype(int32_t type)
int upb_MessageDef_NestedExtensionCount(const upb_MessageDef *m)
const upb_FileDef * upb_EnumDef_File(const upb_EnumDef *e)
bool upb_EnumValueDef_HasOptions(const upb_EnumValueDef *e)
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg)
const UPB_INLINE google_protobuf_OneofDescriptorProto *const * google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len)
const google_protobuf_ServiceOptions * opts
struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto
static char * strviewdup(symtab_addctx *ctx, upb_StringView view)
const char * upb_Status_ErrorMessage(const upb_Status *status)
static const void * symtab_lookup2(const upb_DefPool *s, const char *sym, size_t size, upb_deftype_t type)
UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg)
static bool streql2(const char *a, size_t n, const char *b)
UPB_INLINE upb_Arena * upb_Arena_New(void)
void upb_Status_Clear(upb_Status *status)
const UPB_INLINE google_protobuf_MethodDescriptorProto *const * google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len)
const upb_OneofDef * upb_FieldDef_RealContainingOneof(const upb_FieldDef *f)
static int compare_int32(const void *a_ptr, const void *b_ptr)
static void create_service(symtab_addctx *ctx, const google_protobuf_ServiceDescriptorProto *svc_proto, const upb_ServiceDef *_s)
struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto
upb_Syntax upb_FileDef_Syntax(const upb_FileDef *f)
grpc_core::ScopedArenaPtr arena
const char * upb_ServiceDef_FullName(const upb_ServiceDef *s)
const upb_EnumDef * upb_FileDef_TopLevelEnum(const upb_FileDef *f, int i)
static void create_msgdef(symtab_addctx *ctx, const char *prefix, const google_protobuf_DescriptorProto *msg_proto, const upb_MessageDef *containing_type, const upb_MessageDef *_m)
@ kUpb_LabelFlags_IsExtension
const upb_MessageDef * msgdef
int cmp_fields(const void *p1, const void *p2)
union upb_MapEntry::@708 k
struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange
const upb_DefPool * symtab
static const char * makefullname(symtab_addctx *ctx, const char *prefix, upb_StringView name)
const upb_EnumValueDef * upb_EnumDef_FindValueByNumber(const upb_EnumDef *def, int32_t num)
bool upb_inttable_next2(const upb_inttable *t, uintptr_t *key, upb_value *val, intptr_t *iter)
@ kUpb_ExtMode_NonExtendable
@ kUpb_WellKnown_FloatValue
upb_WellKnown well_known_type
uint32_t upb_FieldDef_Index(const upb_FieldDef *f)
UPB_INLINE bool upb_strtable_lookup(const upb_strtable *t, const char *key, upb_value *v)
const upb_MessageDef * top_lvl_msgs
static void assign_layout_indices(const upb_MessageDef *m, upb_MiniTable *l, upb_MiniTable_Field *fields)
UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg)
for(map_begin_internal(intern, &it);!map_done(&it);map_next(&it))
bool upb_EnumDef_HasOptions(const upb_EnumDef *e)
upb_Label upb_FieldDef_Label(const upb_FieldDef *f)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg)
struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto
UPB_INLINE void upb_inttable_compact(upb_inttable *t)
static void upb_Status_setoom(upb_Status *status)
uint32_t field_rank(const upb_FieldDef *f)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
const upb_FieldDef * upb_MessageDef_FindByJsonNameWithSize(const upb_MessageDef *m, const char *name, size_t len)
void upb_Status_SetErrorMessage(upb_Status *status, const char *msg)
UPB_INLINE bool upb_MessageDef_IsMapEntry(const upb_MessageDef *m)
upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef *m)
void upb_Status_VSetErrorFormat(upb_Status *status, const char *fmt, va_list args)
const char * upb_MessageDef_Name(const upb_MessageDef *m)
const upb_FieldDef * upb_FileDef_TopLevelExtension(const upb_FileDef *f, int i)
const google_protobuf_MethodOptions * upb_MethodDef_Options(const upb_MethodDef *m)
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg)
uint32_t upb_EnumValueDef_Index(const upb_EnumValueDef *ev)
int upb_MessageDef_realoneofcount(const upb_MessageDef *m)
UPB_NORETURN static UPB_NOINLINE void symtab_oomerr(symtab_addctx *ctx)
int upb_FileDef_WeakDependencyCount(const upb_FileDef *f)
char * upb_strdup2(const char *s, size_t len, upb_alloc *a)
const google_protobuf_ExtensionRangeOptions * upb_ExtensionRange_Options(const upb_ExtensionRange *r)
bool upb_FieldDef_IsMap(const upb_FieldDef *f)
const upb_FieldDef * top_lvl_exts
void upb_strtable_removeiter(upb_strtable *t, intptr_t *iter)
const google_protobuf_EnumOptions * upb_EnumDef_Options(const upb_EnumDef *e)
bool upb_EnumDef_CheckNumber(const upb_EnumDef *e, int32_t num)
static size_t div_round_up(size_t n, size_t d)
bool upb_FieldDef_HasPresence(const upb_FieldDef *f)
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg)
static bool upb_isbetween(uint8_t c, uint8_t low, uint8_t high)
@ kUpb_WellKnown_BytesValue
static const upb_FileDef * _upb_DefPool_AddFile(upb_DefPool *s, const google_protobuf_FileDescriptorProto *file_proto, const upb_MiniTable_File *layout, upb_Status *status)
const google_protobuf_OneofOptions * opts
union upb_FieldDef::@700 sub
@ kUpb_WellKnown_Unspecified
struct google_protobuf_FieldOptions google_protobuf_FieldOptions
static const void * symtab_resolveany(symtab_addctx *ctx, const char *from_name_dbg, const char *base, upb_StringView sym, upb_deftype_t *type)
const google_protobuf_FileOptions * upb_FileDef_Options(const upb_FileDef *f)
@ kUpb_WellKnown_Timestamp
const upb_MessageDef * upb_MessageDef_NestedMessage(const upb_MessageDef *m, int i)
const google_protobuf_FileOptions * opts
const upb_ServiceDef * upb_DefPool_FindServiceByName(const upb_DefPool *s, const char *name)
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg)
const upb_ExtensionRange * ext_ranges
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg)
static void make_layout(symtab_addctx *ctx, const upb_MessageDef *m)
UPB_INLINE bool upb_MiniTable_Enum_CheckValue(const upb_MiniTable_Enum *e, int32_t val)
const int32_t * _upb_FileDef_PublicDependencyIndexes(const upb_FileDef *f)
const upb_EnumDef * parent
const google_protobuf_ExtensionRangeOptions * opts
UPB_INLINE void * upb_Arena_Malloc(upb_Arena *a, size_t size)
static bool remove_component(char *base, size_t *len)
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len)
const google_protobuf_EnumOptions * opts
const upb_MessageDef * upb_FileDef_TopLevelMessage(const upb_FileDef *f, int i)
static void build_filedef(symtab_addctx *ctx, upb_FileDef *file, const google_protobuf_FileDescriptorProto *file_proto)
union upb_FieldDef::@698 defaultval
UPB_INLINE bool upb_inttable_init(upb_inttable *table, upb_ctype_t ctype)
const upb_DefPool * upb_FileDef_Pool(const upb_FileDef *f)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg)
static void create_enumdef(symtab_addctx *ctx, const char *prefix, const google_protobuf_EnumDescriptorProto *enum_proto, const upb_MessageDef *containing_type, const upb_EnumDef *_e)
UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg)
int upb_OneofDef_FieldCount(const upb_OneofDef *o)
upb_DefPool * upb_DefPool_New(void)
static void remove_filedef(upb_DefPool *s, upb_FileDef *file)
unsigned __int64 uint64_t
union upb_MapEntry::@709 v
static const char * opt_default
const char * upb_EnumDef_FullName(const upb_EnumDef *e)
@ kUpb_WellKnown_UInt32Value
void upb_Status_SetErrorFormat(upb_Status *status, const char *fmt,...)
bool _upb_FieldDef_IsProto3Optional(const upb_FieldDef *f)
int def(FILE *source, FILE *dest, int level)
upb_MessageValue upb_FieldDef_Default(const upb_FieldDef *f)
UPB_INLINE int32_t const * google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len)
struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto
@ kUpb_DecodeOption_AliasString
bool upb_FieldDef_IsExtension(const upb_FieldDef *f)
static size_t upb_MessageValue_sizeof(upb_CType type)
static const char * shortdefname(const char *fullname)
const char * upb_FileDef_Name(const upb_FileDef *f)
@ kUpb_WellKnown_BoolValue
#define UPB_STRINGVIEW_FORMAT
static const void * unpack_def(upb_value v, upb_deftype_t type)
bool upb_OneofDef_HasOptions(const upb_OneofDef *o)
const UPB_INLINE google_protobuf_ServiceDescriptorProto *const * google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE void upb_gfree(void *ptr)
const int32_t * weak_deps
UPB_NORETURN UPB_NOINLINE UPB_PRINTF(2, 3)
UPB_INLINE int32_t const * google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg)
int upb_MethodDef_Index(const upb_MethodDef *m)
_W64 unsigned int uintptr_t
const google_protobuf_EnumValueOptions * upb_EnumValueDef_Options(const upb_EnumValueDef *e)
upb_CType upb_FieldDef_CType(const upb_FieldDef *f)
const upb_ServiceDef * upb_FileDef_Service(const upb_FileDef *f, int i)
const upb_FieldDef * nested_exts
int upb_EnumDef_ValueCount(const upb_EnumDef *e)
const upb_MessageDef * extension_scope
int32_t upb_ExtensionRange_Start(const upb_ExtensionRange *e)
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg)
int upb_FileDef_TopLevelEnumCount(const upb_FileDef *f)
int32_t upb_ExtensionRange_End(const upb_ExtensionRange *e)
const google_protobuf_OneofOptions * upb_OneofDef_Options(const upb_OneofDef *o)
size_t getjsonname(const char *name, char *buf, size_t len)
bool _upb_DefPool_LoadDefInitEx(upb_DefPool *s, const _upb_DefPool_Init *init, bool rebuild_minitable)
upb_MiniTable_Field field
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg)
const upb_OneofDef * upb_MessageDef_Oneof(const upb_MessageDef *m, int i)
@ kUpb_ExtMode_Extendable
void qsort(void *a, size_t n, size_t es, int(*cmp)(const void *, const void *))
const google_protobuf_MethodOptions * opts
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg)
const upb_MessageDef * upb_FieldDef_MessageSubDef(const upb_FieldDef *f)
upb_ExtensionRegistry * extreg
bool upb_FieldDef_checklabel(int32_t label)
const upb_MessageDef * upb_MethodDef_InputType(const upb_MethodDef *m)
const UPB_INLINE google_protobuf_EnumDescriptorProto *const * google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len)
static char upb_DefPool_ParseHexEscape(symtab_addctx *ctx, const upb_FieldDef *f, const char **src, const char *end)
const upb_EnumDef * upb_FieldDef_EnumSubDef(const upb_FieldDef *f)
size_t upb_inttable_count(const upb_inttable *t)
const upb_FieldDef * upb_DefPool_FindExtensionByNameWithSize(const upb_DefPool *s, const char *name, size_t size)
bool upb_MethodDef_HasOptions(const upb_MethodDef *m)
bool upb_FieldDef_HasOptions(const upb_FieldDef *f)
const upb_MessageDef * nested_msgs
const upb_MiniTable * extendee
static void create_fielddef(symtab_addctx *ctx, const char *prefix, upb_MessageDef *m, const google_protobuf_FieldDescriptorProto *field_proto, const upb_FieldDef *_f, bool is_extension)
int upb_MessageDef_ExtensionRangeCount(const upb_MessageDef *m)
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg)
const upb_FieldDef * upb_OneofDef_LookupNameWithSize(const upb_OneofDef *o, const char *name, size_t length)
const upb_MethodDef * upb_ServiceDef_Method(const upb_ServiceDef *s, int i)
static const void * symtab_lookup(const upb_DefPool *s, const char *sym, upb_deftype_t type)
static char upb_DefPool_ParseOctalEscape(symtab_addctx *ctx, const upb_FieldDef *f, const char **src, const char *end)
const upb_MiniTable * layout
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg)
#define UPB_INTTABLE_BEGIN
static bool upb_DefPool_TryGetChar(const char **src, const char *end, char *ch)
const char * upb_EnumValueDef_FullName(const upb_EnumValueDef *ev)
const upb_FieldDef * upb_DefPool_FindExtensionByNumber(const upb_DefPool *s, const upb_MessageDef *m, int32_t fieldnum)
int32_t upb_EnumDef_Default(const upb_EnumDef *e)
static const char * shortname(const char *longname)
const upb_FileDef * upb_FileDef_WeakDependency(const upb_FileDef *f, int i)
const upb_OneofDef * oneofs
static char upb_ascii_lower(char ch)
const google_protobuf_MessageOptions * upb_MessageDef_Options(const upb_MessageDef *m)
static void symtab_add(symtab_addctx *ctx, const char *name, upb_value v)
const UPB_INLINE google_protobuf_EnumDescriptorProto *const * google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len)
GTEST_API_ const char * fmt
static uint8_t upb_msg_fielddefsize(const upb_FieldDef *f)
const upb_MessageDef * upb_FieldDef_ContainingType(const upb_FieldDef *f)
@ kUpb_WellKnown_UInt64Value
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg)
@ kUpb_WellKnown_Duration
bool upb_OneofDef_IsSynthetic(const upb_OneofDef *o)
uint32_t upb_OneofDef_Index(const upb_OneofDef *o)
const FieldDescriptor * field
UPB_INLINE void * upb_gmalloc(size_t size)
int upb_FileDef_ServiceCount(const upb_FileDef *f)
static bool upb_isletter(char c)
union upb_FieldDef::@699 scope
void upb_DefPool_Free(upb_DefPool *s)
const char * upb_FieldDef_JsonName(const upb_FieldDef *f)
const upb_DefPool * symtab
static char * makejsonname(symtab_addctx *ctx, const char *name)
const UPB_INLINE google_protobuf_DescriptorProto *const * google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len)
static void parse_default(symtab_addctx *ctx, const char *str, size_t len, upb_FieldDef *f)
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg)
bool upb_inttable_lookup(const upb_inttable *t, uintptr_t key, upb_value *v)
const upb_FileDef ** deps
static void check_ident(symtab_addctx *ctx, upb_StringView name, bool full)
const upb_FieldDef * upb_OneofDef_Field(const upb_OneofDef *o, int i)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg)
static void nullz(upb_status *status)
const upb_MessageDef * containing_type
const upb_FieldDef * upb_MessageDef_NestedExtension(const upb_MessageDef *m, int i)
const upb_MessageDef * upb_MessageDef_ContainingType(const upb_MessageDef *m)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg)
const upb_ServiceDef * services
bool upb_FieldDef_IsRepeated(const upb_FieldDef *f)
static void finalize_oneofs(symtab_addctx *ctx, upb_MessageDef *m)
const upb_MessageDef * upb_DefPool_FindMessageByNameWithSize(const upb_DefPool *s, const char *sym, size_t len)
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len)
bool upb_Status_IsOk(const upb_Status *status)
const google_protobuf_ServiceOptions * upb_ServiceDef_Options(const upb_ServiceDef *s)
const char * upb_EnumDef_Name(const upb_EnumDef *e)
const int32_t * public_deps
const upb_EnumValueDef * values
UniquePtr< SSL_SESSION > ret
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg)
static upb_deftype_t deftype(upb_value v)
bool upb_FieldDef_IsString(const upb_FieldDef *f)
const upb_MessageDef * containing_type
int upb_MessageDef_OneofCount(const upb_MessageDef *m)
const upb_OneofDef * oneof
AllocList * next[kMaxLevel]
static void fill_fieldlayout(upb_MiniTable_Field *field, const upb_FieldDef *f)
struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions
int upb_FileDef_PublicDependencyCount(const upb_FileDef *f)
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg)
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg)
@ kUpb_ExtMode_IsMessageSet
const upb_FileDef * upb_ServiceDef_File(const upb_ServiceDef *s)
struct google_protobuf_OneofOptions google_protobuf_OneofOptions
std::array< int64_t, Size > values
static const char prefix[]
static bool upb_isalphanum(char c)
static void assign_msg_wellknowntype(upb_MessageDef *m)
size_t _upb_DefPool_BytesLoaded(const upb_DefPool *s)
const upb_FieldDef * upb_DefPool_FindExtensionByName(const upb_DefPool *s, const char *sym)
static void resolve_msgdef(symtab_addctx *ctx, upb_MessageDef *m)
const char * upb_MessageDef_FullName(const upb_MessageDef *m)
@ kUpb_WellKnown_ListValue
const upb_MiniTable_Enum * layout
const upb_FileDef * upb_MessageDef_File(const upb_MessageDef *m)
@ kUpb_WellKnown_Int64Value
int upb_MessageDef_numoneofs(const upb_MessageDef *m)
static void msgdef_create_nested(symtab_addctx *ctx, const google_protobuf_DescriptorProto *msg_proto, upb_MessageDef *m)
const upb_FileDef * upb_DefPool_AddFile(upb_DefPool *s, const google_protobuf_FileDescriptorProto *file_proto, upb_Status *status)
upb_ExtensionRegistry * upb_ExtensionRegistry_New(upb_Arena *arena)
@ kUpb_WellKnown_DoubleValue
struct google_protobuf_MethodOptions google_protobuf_MethodOptions
@ kUpb_WellKnown_Int32Value
const upb_FileDef * upb_DefPool_FindFileContainingSymbol(const upb_DefPool *s, const char *name)
UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg)
struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions
upb_Arena * _upb_DefPool_Arena(const upb_DefPool *s)
static const void * symtab_resolve(symtab_addctx *ctx, const char *from_name_dbg, const char *base, upb_StringView sym, upb_deftype_t type)
bool upb_FieldDef_IsSubMessage(const upb_FieldDef *f)
static uint32_t upb_MiniTable_place(symtab_addctx *ctx, upb_MiniTable *l, size_t size, const upb_MessageDef *m)
const upb_OneofDef * upb_FieldDef_ContainingOneof(const upb_FieldDef *f)
const upb_FileDef * upb_FileDef_PublicDependency(const upb_FileDef *f, int i)
static bool streql_view(upb_StringView view, const char *b)
int upb_MessageDef_NestedEnumCount(const upb_MessageDef *m)
const upb_msglayout_field * _upb_extreg_get(const upb_extreg *r, const upb_msglayout *l, uint32_t num)
const upb_ServiceDef * upb_DefPool_FindServiceByNameWithSize(const upb_DefPool *s, const char *name, size_t size)
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg)
bool upb_ServiceDef_HasOptions(const upb_ServiceDef *s)
int upb_MessageDef_numrealoneofs(const upb_MessageDef *m)
const upb_MessageDef * upb_MethodDef_OutputType(const upb_MethodDef *m)
const char * upb_FieldDef_Name(const upb_FieldDef *f)
int upb_ServiceDef_Index(const upb_ServiceDef *s)
static int count_exts_in_msg(const google_protobuf_DescriptorProto *msg_proto)
const upb_EnumDef * upb_EnumValueDef_Enum(const upb_EnumValueDef *ev)
struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions
int upb_MessageDef_FieldCount(const upb_MessageDef *m)
struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
const google_protobuf_FieldOptions * opts
const UPB_INLINE google_protobuf_DescriptorProto *const * google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len)
bool _upb_extreg_add(upb_extreg *r, const upb_msglayout_ext *e, size_t count)
@ kUpb_FieldRep_StringView
static void create_oneofdef(symtab_addctx *ctx, upb_MessageDef *m, const google_protobuf_OneofDescriptorProto *oneof_proto, const upb_OneofDef *_o)
const upb_MessageDef * upb_FieldDef_ExtensionScope(const upb_FieldDef *f)
const upb_FieldDef * upb_MessageDef_Field(const upb_MessageDef *m, int i)
bool upb_MethodDef_ClientStreaming(const upb_MethodDef *m)
int upb_ServiceDef_MethodCount(const upb_ServiceDef *s)
void * symtab_alloc(symtab_addctx *ctx, size_t bytes)
static void resolve_subdef(symtab_addctx *ctx, const char *prefix, upb_FieldDef *f)
bool upb_FieldDef_HasJsonName(const upb_FieldDef *f)
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parse_ex(const char *buf, size_t size, const upb_ExtensionRegistry *extreg, int options, upb_Arena *arena)
const char * fastdecode_generic(struct upb_decstate *d, const char *ptr, upb_msg *msg, intptr_t table, uint64_t hasbits, uint64_t data)
const google_protobuf_FieldOptions * upb_FieldDef_Options(const upb_FieldDef *f)
const upb_FileDef * upb_DefPool_FindFileByNameWithSize(const upb_DefPool *s, const char *name, size_t len)
struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto
UPB_INLINE bool upb_strtable_insert(upb_strtable *t, const char *key, upb_value val)
@ kUpb_WellKnown_FieldMask
bool upb_strtable_next2(const upb_strtable *t, upb_StringView *key, upb_value *val, intptr_t *iter)
const upb_FieldDef * upb_MessageDef_FindFieldByNumber(const upb_MessageDef *m, uint32_t i)
static void resolve_default(symtab_addctx *ctx, upb_FieldDef *f, const google_protobuf_FieldDescriptorProto *field_proto)
struct google_protobuf_FileOptions google_protobuf_FileOptions
int32_t upb_EnumValueDef_Number(const upb_EnumValueDef *ev)
const upb_FieldDef * fields
struct google_protobuf_MessageOptions google_protobuf_MessageOptions
const upb_MessageDef * upb_DefPool_FindMessageByName(const upb_DefPool *s, const char *sym)
bool _upb_DefPool_registerlayout(upb_DefPool *s, const char *filename, const upb_MiniTable_File *file)
const upb_FieldDef * upb_MessageDef_FindFieldByNameWithSize(const upb_MessageDef *m, const char *name, size_t len)
bool upb_Arena_Fuse(upb_Arena *a1, upb_Arena *a2)
void upb_Arena_Free(upb_Arena *a)
if(p->owned &&p->wrapped !=NULL)
bool upb_FileDef_HasOptions(const upb_FileDef *f)
const char * upb_FieldDef_FullName(const upb_FieldDef *f)
#define UPB_LONGJMP(buf, val)
const upb_ServiceDef * upb_MethodDef_Service(const upb_MethodDef *m)
upb_MiniTable_Enum * create_enumlayout(symtab_addctx *ctx, const upb_EnumDef *e)
const upb_MethodDef * upb_ServiceDef_FindMethodByName(const upb_ServiceDef *s, const char *name)
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg)
static str_t * unescape(symtab_addctx *ctx, const upb_FieldDef *f, const char *data, size_t len)
bool upb_FieldDef_checkintfmt(int32_t fmt)
const upb_EnumValueDef * upb_EnumDef_Value(const upb_EnumDef *e, int i)
static char upb_DefPool_ParseEscape(symtab_addctx *ctx, const upb_FieldDef *f, const char **src, const char *end)
int upb_FileDef_TopLevelMessageCount(const upb_FileDef *f)
const upb_FieldDef ** fields
const upb_MiniTable_Extension * _upb_FieldDef_ExtensionMiniTable(const upb_FieldDef *f)
int upb_FileDef_DependencyCount(const upb_FileDef *f)
static char upb_DefPool_TryGetHexDigit(symtab_addctx *ctx, const upb_FieldDef *f, const char **src, const char *end)
const upb_FileDef * upb_DefPool_FindFileByName(const upb_DefPool *s, const char *name)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:09