From 4ffe0868f9f4c0d8abf46e83a7b1fdadb939f083 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Wed, 6 Dec 2023 02:02:36 +0000 Subject: [PATCH] Auto-generate files after cl/588239901 --- php/ext/google/protobuf/php-upb.c | 25 +- php/ext/google/protobuf/php-upb.h | 1097 ++++++++++---------- ruby/ext/google/protobuf_c/ruby-upb.c | 25 +- ruby/ext/google/protobuf_c/ruby-upb.h | 1097 ++++++++++---------- upb/cmake/google/protobuf/descriptor.upb.h | 164 +-- 5 files changed, 1206 insertions(+), 1202 deletions(-) diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index f9a8d22e1a58..a737011bb715 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c @@ -6197,7 +6197,7 @@ upb_Message* _upb_Message_Copy(upb_Message* dst, const upb_Message* src, if (unknown_size != 0) { UPB_ASSERT(ptr); // Make a copy into destination arena. - if (!upb_Message_AddUnknown(dst, ptr, unknown_size, arena)) { + if (!_upb_Message_AddUnknown(dst, ptr, unknown_size, arena)) { return NULL; } } @@ -6695,8 +6695,13 @@ bool _upb_mapsorter_pushexts(_upb_mapsorter* s, static const size_t message_overhead = sizeof(upb_Message_InternalData); -bool upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, - upb_Arena* arena) { +upb_Message* upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena) { + return _upb_Message_New(mini_table, arena); +} + +bool _upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, + upb_Arena* arena) { if (!UPB_PRIVATE(_upb_Message_Realloc)(msg, len, arena)) return false; upb_Message_Internal* in = upb_Message_Getinternal(msg); memcpy(UPB_PTR_AT(in->internal, in->internal->unknown_end, char), data, len); @@ -12837,7 +12842,7 @@ static upb_Message* _upb_Decoder_NewSubMessage(upb_Decoder* d, upb_TaggedMessagePtr* target) { const upb_MiniTable* subl = _upb_MiniTableSubs_MessageByField(subs, field); UPB_ASSERT(subl); - upb_Message* msg = upb_Message_New(subl, &d->arena); + upb_Message* msg = _upb_Message_New(subl, &d->arena); if (!msg) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); // Extensions should not be unlinked. A message extension should not be @@ -12965,7 +12970,7 @@ static void _upb_Decoder_AddUnknownVarints(upb_Decoder* d, upb_Message* msg, end = upb_Decoder_EncodeVarint32(val1, end); end = upb_Decoder_EncodeVarint32(val2, end); - if (!upb_Message_AddUnknown(msg, buf, end - buf, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, buf, end - buf, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } @@ -13251,7 +13256,7 @@ static const char* _upb_Decoder_DecodeToMap(upb_Decoder* d, const char* ptr, _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } _upb_Decoder_AddUnknownVarints(d, msg, tag, size); - if (!upb_Message_AddUnknown(msg, buf, size, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, buf, size, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } else { @@ -13429,9 +13434,9 @@ static void upb_Decoder_AddUnknownMessageSetItem(upb_Decoder* d, ptr = upb_Decoder_EncodeVarint32(kEndItemTag, ptr); char* end = ptr; - if (!upb_Message_AddUnknown(msg, buf, split - buf, &d->arena) || - !upb_Message_AddUnknown(msg, message_data, message_size, &d->arena) || - !upb_Message_AddUnknown(msg, split, end - split, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, buf, split - buf, &d->arena) || + !_upb_Message_AddUnknown(msg, message_data, message_size, &d->arena) || + !_upb_Message_AddUnknown(msg, split, end - split, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } @@ -13816,7 +13821,7 @@ static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d, start = d->unknown; d->unknown = NULL; } - if (!upb_Message_AddUnknown(msg, start, ptr - start, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, start, ptr - start, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } else if (wire_type == kUpb_WireType_StartGroup) { diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index 97477a9113b8..a3587dd16d6d 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -915,17 +915,99 @@ UPB_API void* upb_Array_MutableDataPtr(upb_Array* arr); #ifndef UPB_MESSAGE_INTERNAL_EXTENSION_H_ #define UPB_MESSAGE_INTERNAL_EXTENSION_H_ + +// Public APIs for message operations that do not depend on the schema. +// +// MiniTable-based accessors live in accessors.h. + +#ifndef UPB_MESSAGE_MESSAGE_H_ +#define UPB_MESSAGE_MESSAGE_H_ + #include -#ifndef UPB_MINI_TABLE_EXTENSION_H_ -#define UPB_MINI_TABLE_EXTENSION_H_ +#ifndef UPB_MINI_TABLE_MESSAGE_H_ +#define UPB_MINI_TABLE_MESSAGE_H_ + + +#ifndef UPB_MINI_TABLE_ENUM_H_ +#define UPB_MINI_TABLE_ENUM_H_ #include -#ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ -#define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ +#ifndef UPB_MINI_TABLE_INTERNAL_ENUM_H_ +#define UPB_MINI_TABLE_INTERNAL_ENUM_H_ + +#include + +// Must be last. + +struct upb_MiniTableEnum { + uint32_t UPB_PRIVATE(mask_limit); // Highest that can be tested with mask. + uint32_t UPB_PRIVATE(value_count); // Number of values after the bitfield. + uint32_t UPB_PRIVATE(data)[]; // Bitmask + enumerated values follow. +}; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)( + const struct upb_MiniTableEnum* e, uint32_t val) { + if (UPB_LIKELY(val < 64)) { + const uint64_t mask = + e->UPB_PRIVATE(data)[0] | ((uint64_t)e->UPB_PRIVATE(data)[1] << 32); + const uint64_t bit = 1ULL << val; + return (mask & bit) != 0; + } + if (UPB_LIKELY(val < e->UPB_PRIVATE(mask_limit))) { + const uint32_t mask = e->UPB_PRIVATE(data)[val / 32]; + const uint32_t bit = 1ULL << (val % 32); + return (mask & bit) != 0; + } + + // OPT: binary search long lists? + const uint32_t* start = + &e->UPB_PRIVATE(data)[e->UPB_PRIVATE(mask_limit) / 32]; + const uint32_t* limit = &e->UPB_PRIVATE( + data)[e->UPB_PRIVATE(mask_limit) / 32 + e->UPB_PRIVATE(value_count)]; + for (const uint32_t* p = start; p < limit; p++) { + if (*p == val) return true; + } + return false; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_INTERNAL_ENUM_H_ */ + +// Must be last + +typedef struct upb_MiniTableEnum upb_MiniTableEnum; + +#ifdef __cplusplus +extern "C" { +#endif + +// Validates enum value against range defined by enum mini table. +UPB_INLINE bool upb_MiniTableEnum_CheckValue(const upb_MiniTableEnum* e, + uint32_t val) { + return UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)(e, val); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_ENUM_H_ */ + +#ifndef UPB_MINI_TABLE_FIELD_H_ +#define UPB_MINI_TABLE_FIELD_H_ #include @@ -1199,6 +1281,78 @@ UPB_INLINE size_t UPB_PRIVATE(_upb_MiniTableField_ElemSizeLg2)( #endif /* UPB_MINI_TABLE_INTERNAL_FIELD_H_ */ +// Must be last. + +typedef struct upb_MiniTableField upb_MiniTableField; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_API_INLINE upb_CType upb_MiniTableField_CType(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_CType)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_HasPresence( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_HasPresence)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsArray(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsArray)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsClosedEnum)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsExtension( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsExtension)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsInOneof(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsInOneof)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsMap(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsMap)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsPacked(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsPacked)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsScalar(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsScalar)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsSubMessage( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsSubMessage)(f); +} + +UPB_API_INLINE uint32_t upb_MiniTableField_Number(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_Number)(f); +} + +UPB_API_INLINE upb_FieldType +upb_MiniTableField_Type(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_Type)(f); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_FIELD_H_ */ + +#ifndef UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ +#define UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ + + #ifndef UPB_MINI_TABLE_INTERNAL_SUB_H_ #define UPB_MINI_TABLE_INTERNAL_SUB_H_ @@ -1246,72 +1400,308 @@ UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTableSub_Message)( // Must be last. -struct upb_MiniTableExtension { - // Do not move this field. We need to be able to alias pointers. - struct upb_MiniTableField UPB_PRIVATE(field); - - const struct upb_MiniTable* UPB_PRIVATE(extendee); - union upb_MiniTableSub UPB_PRIVATE(sub); // NULL unless submsg or proto2 enum -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( - _upb_MiniTableExtension_AsField)(const struct upb_MiniTableExtension* e) { - return (const struct upb_MiniTableField*)&e->UPB_PRIVATE(field); -} - -UPB_INLINE uint32_t UPB_PRIVATE(_upb_MiniTableExtension_Number)( - const struct upb_MiniTableExtension* e) { - return e->UPB_PRIVATE(field).UPB_ONLYBITS(number); -} +struct upb_Decoder; +typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, + upb_Message* msg, intptr_t table, + uint64_t hasbits, uint64_t data); +typedef struct { + uint64_t field_data; + _upb_FieldParser* field_parser; +} _upb_FastTable_Entry; -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( - _upb_MiniTableExtension_GetSubMessage)( - const struct upb_MiniTableExtension* e) { - return e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg); -} +typedef enum { + kUpb_ExtMode_NonExtendable = 0, // Non-extendable message. + kUpb_ExtMode_Extendable = 1, // Normal extendable message. + kUpb_ExtMode_IsMessageSet = 2, // MessageSet message. + kUpb_ExtMode_IsMessageSet_ITEM = + 3, // MessageSet item (temporary only, see decode.c) -UPB_INLINE void UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)( - struct upb_MiniTableExtension* e, const struct upb_MiniTable* m) { - e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg) = m; -} + // During table building we steal a bit to indicate that the message is a map + // entry. *Only* used during table building! + kUpb_ExtMode_IsMapEntry = 4, +} upb_ExtMode; -#ifdef __cplusplus -} /* extern "C" */ -#endif +// upb_MiniTable represents the memory layout of a given upb_MessageDef. +// The members are public so generated code can initialize them, +// but users MUST NOT directly read or write any of its members. +// LINT.IfChange(minitable_struct_definition) +struct upb_MiniTable { + const union upb_MiniTableSub* UPB_PRIVATE(subs); + const struct upb_MiniTableField* UPB_ONLYBITS(fields); + // Must be aligned to sizeof(void*). Doesn't include internal members like + // unknown fields, extension dict, pointer to msglayout, etc. + uint16_t UPB_PRIVATE(size); -#endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */ + uint16_t UPB_ONLYBITS(field_count); -// Must be last. + uint8_t UPB_PRIVATE(ext); // upb_ExtMode, uint8_t here so sizeof(ext) == 1 + uint8_t UPB_PRIVATE(dense_below); + uint8_t UPB_PRIVATE(table_mask); + uint8_t UPB_PRIVATE(required_count); // Required fields have the low hasbits. -typedef struct upb_MiniTableExtension upb_MiniTableExtension; + // To statically initialize the tables of variable length, we need a flexible + // array member, and we need to compile in gnu99 mode (constant initialization + // of flexible array members is a GNU extension, not in C99 unfortunately. + _upb_FastTable_Entry UPB_PRIVATE(fasttable)[]; +}; +// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table.ts) #ifdef __cplusplus extern "C" { #endif -UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTableExtension_AsField( - const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_AsField)(e); -} +UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTable_Empty)(void) { + extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); -UPB_API_INLINE uint32_t -upb_MiniTableExtension_Number(const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_Number)(e); + return &UPB_PRIVATE(_kUpb_MiniTable_Empty); } -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableExtension_GetSubMessage( - const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_GetSubMessage)(e); +UPB_INLINE int UPB_PRIVATE(_upb_MiniTable_FieldCount)( + const struct upb_MiniTable* m) { + return m->UPB_ONLYBITS(field_count); } -UPB_API_INLINE void upb_MiniTableExtension_SetSubMessage( - upb_MiniTableExtension* e, const struct upb_MiniTable* m) { - return UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)(e, m); +UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_IsEmpty)( + const struct upb_MiniTable* m) { + extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); + + return m == &UPB_PRIVATE(_kUpb_MiniTable_Empty); +} + +UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( + _upb_MiniTable_GetFieldByIndex)(const struct upb_MiniTable* m, uint32_t i) { + return &m->UPB_ONLYBITS(fields)[i]; +} + +UPB_INLINE const union upb_MiniTableSub* UPB_PRIVATE( + _upb_MiniTable_GetSubByIndex)(const struct upb_MiniTable* m, uint32_t i) { + return &m->UPB_PRIVATE(subs)[i]; +} + +UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( + _upb_MiniTable_GetSubMessageTable)(const struct upb_MiniTable* m, + const struct upb_MiniTableField* f) { + UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Message); + const struct upb_MiniTable* ret = UPB_PRIVATE(_upb_MiniTableSub_Message)( + m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); + UPB_ASSUME(ret); + return UPB_PRIVATE(_upb_MiniTable_IsEmpty)(ret) ? NULL : ret; +} + +UPB_INLINE const struct upb_MiniTableEnum* UPB_PRIVATE( + _upb_MiniTable_GetSubEnumTable)(const struct upb_MiniTable* m, + const struct upb_MiniTableField* f) { + UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Enum); + return UPB_PRIVATE(_upb_MiniTableSub_Enum)( + m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); +} + +UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)( + const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f) != NULL; +} + +// Computes a bitmask in which the |m->required_count| lowest bits are set, +// except that we skip the lowest bit (because upb never uses hasbit 0). +// +// Sample output: +// RequiredMask(1) => 0b10 (0x2) +// RequiredMask(5) => 0b111110 (0x3e) +UPB_INLINE uint64_t +UPB_PRIVATE(_upb_MiniTable_RequiredMask)(const struct upb_MiniTable* m) { + int n = m->UPB_PRIVATE(required_count); + UPB_ASSERT(0 < n && n <= 63); + return ((1ULL << n) - 1) << 1; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ */ + +// Must be last. + +typedef struct upb_MiniTable upb_MiniTable; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_API const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( + const upb_MiniTable* m, uint32_t number); + +UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_GetFieldByIndex( + const upb_MiniTable* m, uint32_t index) { + return UPB_PRIVATE(_upb_MiniTable_GetFieldByIndex)(m, index); +} + +UPB_API_INLINE int upb_MiniTable_FieldCount(const upb_MiniTable* m) { + return UPB_PRIVATE(_upb_MiniTable_FieldCount)(m); +} + +// Returns the MiniTable for a message field, NULL if the field is unlinked. +UPB_API_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable( + const upb_MiniTable* m, const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f); +} + +// Returns the MiniTableEnum for a message field, NULL if the field is unlinked. +UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable( + const upb_MiniTable* m, const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_GetSubEnumTable)(m, f); +} + +// Returns true if this MiniTable field is linked to a MiniTable for the +// sub-message. +UPB_API_INLINE bool upb_MiniTable_MessageFieldIsLinked( + const upb_MiniTable* m, const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)(m, f); +} + +// TODO: Implement convenience getters for map entries: +// +// upb_MiniTable_GetMapKey() +// upb_MiniTable_GetMapValue() +// These could also assert that this is indeed a map entry (well, as best we +// can. We can assert that there are two fields with field numbers 1 and 2). + +// If this field is in a oneof, returns the first field in the oneof. +// +// Otherwise returns NULL. +// +// Usage: +// const upb_MiniTableField* field = upb_MiniTable_GetOneof(m, f); +// do { +// .. +// } while (upb_MiniTable_NextOneofField(m, &field); +// +const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, + const upb_MiniTableField* f); + +// Iterates to the next field in the oneof. If this is the last field in the +// oneof, returns false. The ordering of fields in the oneof is not +// guaranteed. +// REQUIRES: |f| is the field initialized by upb_MiniTable_GetOneof and updated +// by prior upb_MiniTable_NextOneofField calls. +bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, + const upb_MiniTableField** f); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_MESSAGE_H_ */ + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +// Creates a new message with the given mini_table on the given arena. +UPB_API upb_Message* upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena); + +// Returns a reference to the message's unknown data. +const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len); + +// Removes partial unknown data from message. +void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len); + +// Returns the number of extensions present in this message. +size_t upb_Message_ExtensionCount(const upb_Message* msg); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MESSAGE_MESSAGE_H_ */ + +#ifndef UPB_MINI_TABLE_EXTENSION_H_ +#define UPB_MINI_TABLE_EXTENSION_H_ + +#include + + +#ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ +#define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ + +#include + + +// Must be last. + +struct upb_MiniTableExtension { + // Do not move this field. We need to be able to alias pointers. + struct upb_MiniTableField UPB_PRIVATE(field); + + const struct upb_MiniTable* UPB_PRIVATE(extendee); + union upb_MiniTableSub UPB_PRIVATE(sub); // NULL unless submsg or proto2 enum +}; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( + _upb_MiniTableExtension_AsField)(const struct upb_MiniTableExtension* e) { + return (const struct upb_MiniTableField*)&e->UPB_PRIVATE(field); +} + +UPB_INLINE uint32_t UPB_PRIVATE(_upb_MiniTableExtension_Number)( + const struct upb_MiniTableExtension* e) { + return e->UPB_PRIVATE(field).UPB_ONLYBITS(number); +} + +UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( + _upb_MiniTableExtension_GetSubMessage)( + const struct upb_MiniTableExtension* e) { + return e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg); +} + +UPB_INLINE void UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)( + struct upb_MiniTableExtension* e, const struct upb_MiniTable* m) { + e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg) = m; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */ + +// Must be last. + +typedef struct upb_MiniTableExtension upb_MiniTableExtension; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTableExtension_AsField( + const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_AsField)(e); +} + +UPB_API_INLINE uint32_t +upb_MiniTableExtension_Number(const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_Number)(e); +} + +UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableExtension_GetSubMessage( + const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_GetSubMessage)(e); +} + +UPB_API_INLINE void upb_MiniTableExtension_SetSubMessage( + upb_MiniTableExtension* e, const struct upb_MiniTable* m) { + return UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)(e, m); } #ifdef __cplusplus @@ -1946,376 +2336,20 @@ typedef struct { #endif // UPB_MINI_TABLE_INTERNAL_TYPES_H_ -#ifndef UPB_MINI_TABLE_MESSAGE_H_ -#define UPB_MINI_TABLE_MESSAGE_H_ - +// Must be last. -#ifndef UPB_MINI_TABLE_ENUM_H_ -#define UPB_MINI_TABLE_ENUM_H_ +#ifdef __cplusplus +extern "C" { +#endif -#include +extern const float kUpb_FltInfinity; +extern const double kUpb_Infinity; +extern const double kUpb_NaN; - -#ifndef UPB_MINI_TABLE_INTERNAL_ENUM_H_ -#define UPB_MINI_TABLE_INTERNAL_ENUM_H_ - -#include - -// Must be last. - -struct upb_MiniTableEnum { - uint32_t UPB_PRIVATE(mask_limit); // Highest that can be tested with mask. - uint32_t UPB_PRIVATE(value_count); // Number of values after the bitfield. - uint32_t UPB_PRIVATE(data)[]; // Bitmask + enumerated values follow. -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)( - const struct upb_MiniTableEnum* e, uint32_t val) { - if (UPB_LIKELY(val < 64)) { - const uint64_t mask = - e->UPB_PRIVATE(data)[0] | ((uint64_t)e->UPB_PRIVATE(data)[1] << 32); - const uint64_t bit = 1ULL << val; - return (mask & bit) != 0; - } - if (UPB_LIKELY(val < e->UPB_PRIVATE(mask_limit))) { - const uint32_t mask = e->UPB_PRIVATE(data)[val / 32]; - const uint32_t bit = 1ULL << (val % 32); - return (mask & bit) != 0; - } - - // OPT: binary search long lists? - const uint32_t* start = - &e->UPB_PRIVATE(data)[e->UPB_PRIVATE(mask_limit) / 32]; - const uint32_t* limit = &e->UPB_PRIVATE( - data)[e->UPB_PRIVATE(mask_limit) / 32 + e->UPB_PRIVATE(value_count)]; - for (const uint32_t* p = start; p < limit; p++) { - if (*p == val) return true; - } - return false; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_ENUM_H_ */ - -// Must be last - -typedef struct upb_MiniTableEnum upb_MiniTableEnum; - -#ifdef __cplusplus -extern "C" { -#endif - -// Validates enum value against range defined by enum mini table. -UPB_INLINE bool upb_MiniTableEnum_CheckValue(const upb_MiniTableEnum* e, - uint32_t val) { - return UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)(e, val); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_ENUM_H_ */ - -#ifndef UPB_MINI_TABLE_FIELD_H_ -#define UPB_MINI_TABLE_FIELD_H_ - -#include - - -// Must be last. - -typedef struct upb_MiniTableField upb_MiniTableField; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE upb_CType upb_MiniTableField_CType(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_CType)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_HasPresence( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_HasPresence)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsArray(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsArray)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsClosedEnum)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsExtension( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsExtension)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsInOneof(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsInOneof)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsMap(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsMap)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsPacked(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsPacked)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsScalar(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsScalar)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsSubMessage( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsSubMessage)(f); -} - -UPB_API_INLINE uint32_t upb_MiniTableField_Number(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Number)(f); -} - -UPB_API_INLINE upb_FieldType -upb_MiniTableField_Type(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Type)(f); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_FIELD_H_ */ - -#ifndef UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ -#define UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ - - -// Must be last. - -struct upb_Decoder; -typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, - upb_Message* msg, intptr_t table, - uint64_t hasbits, uint64_t data); -typedef struct { - uint64_t field_data; - _upb_FieldParser* field_parser; -} _upb_FastTable_Entry; - -typedef enum { - kUpb_ExtMode_NonExtendable = 0, // Non-extendable message. - kUpb_ExtMode_Extendable = 1, // Normal extendable message. - kUpb_ExtMode_IsMessageSet = 2, // MessageSet message. - kUpb_ExtMode_IsMessageSet_ITEM = - 3, // MessageSet item (temporary only, see decode.c) - - // During table building we steal a bit to indicate that the message is a map - // entry. *Only* used during table building! - kUpb_ExtMode_IsMapEntry = 4, -} upb_ExtMode; - -// upb_MiniTable represents the memory layout of a given upb_MessageDef. -// The members are public so generated code can initialize them, -// but users MUST NOT directly read or write any of its members. -// LINT.IfChange(minitable_struct_definition) -struct upb_MiniTable { - const union upb_MiniTableSub* UPB_PRIVATE(subs); - const struct upb_MiniTableField* UPB_ONLYBITS(fields); - - // Must be aligned to sizeof(void*). Doesn't include internal members like - // unknown fields, extension dict, pointer to msglayout, etc. - uint16_t UPB_PRIVATE(size); - - uint16_t UPB_ONLYBITS(field_count); - - uint8_t UPB_PRIVATE(ext); // upb_ExtMode, uint8_t here so sizeof(ext) == 1 - uint8_t UPB_PRIVATE(dense_below); - uint8_t UPB_PRIVATE(table_mask); - uint8_t UPB_PRIVATE(required_count); // Required fields have the low hasbits. - - // To statically initialize the tables of variable length, we need a flexible - // array member, and we need to compile in gnu99 mode (constant initialization - // of flexible array members is a GNU extension, not in C99 unfortunately. - _upb_FastTable_Entry UPB_PRIVATE(fasttable)[]; -}; -// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table.ts) - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTable_Empty)(void) { - extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); - - return &UPB_PRIVATE(_kUpb_MiniTable_Empty); -} - -UPB_INLINE int UPB_PRIVATE(_upb_MiniTable_FieldCount)( - const struct upb_MiniTable* m) { - return m->UPB_ONLYBITS(field_count); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_IsEmpty)( - const struct upb_MiniTable* m) { - extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); - - return m == &UPB_PRIVATE(_kUpb_MiniTable_Empty); -} - -UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( - _upb_MiniTable_GetFieldByIndex)(const struct upb_MiniTable* m, uint32_t i) { - return &m->UPB_ONLYBITS(fields)[i]; -} - -UPB_INLINE const union upb_MiniTableSub* UPB_PRIVATE( - _upb_MiniTable_GetSubByIndex)(const struct upb_MiniTable* m, uint32_t i) { - return &m->UPB_PRIVATE(subs)[i]; -} - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( - _upb_MiniTable_GetSubMessageTable)(const struct upb_MiniTable* m, - const struct upb_MiniTableField* f) { - UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Message); - const struct upb_MiniTable* ret = UPB_PRIVATE(_upb_MiniTableSub_Message)( - m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); - UPB_ASSUME(ret); - return UPB_PRIVATE(_upb_MiniTable_IsEmpty)(ret) ? NULL : ret; -} - -UPB_INLINE const struct upb_MiniTableEnum* UPB_PRIVATE( - _upb_MiniTable_GetSubEnumTable)(const struct upb_MiniTable* m, - const struct upb_MiniTableField* f) { - UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Enum); - return UPB_PRIVATE(_upb_MiniTableSub_Enum)( - m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f) != NULL; -} - -// Computes a bitmask in which the |m->required_count| lowest bits are set, -// except that we skip the lowest bit (because upb never uses hasbit 0). -// -// Sample output: -// RequiredMask(1) => 0b10 (0x2) -// RequiredMask(5) => 0b111110 (0x3e) -UPB_INLINE uint64_t -UPB_PRIVATE(_upb_MiniTable_RequiredMask)(const struct upb_MiniTable* m) { - int n = m->UPB_PRIVATE(required_count); - UPB_ASSERT(0 < n && n <= 63); - return ((1ULL << n) - 1) << 1; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ */ - -// Must be last. - -typedef struct upb_MiniTable upb_MiniTable; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( - const upb_MiniTable* m, uint32_t number); - -UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_GetFieldByIndex( - const upb_MiniTable* m, uint32_t index) { - return UPB_PRIVATE(_upb_MiniTable_GetFieldByIndex)(m, index); -} - -UPB_API_INLINE int upb_MiniTable_FieldCount(const upb_MiniTable* m) { - return UPB_PRIVATE(_upb_MiniTable_FieldCount)(m); -} - -// Returns the MiniTable for a message field, NULL if the field is unlinked. -UPB_API_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable( - const upb_MiniTable* m, const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f); -} - -// Returns the MiniTableEnum for a message field, NULL if the field is unlinked. -UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable( - const upb_MiniTable* m, const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_GetSubEnumTable)(m, f); -} - -// Returns true if this MiniTable field is linked to a MiniTable for the -// sub-message. -UPB_API_INLINE bool upb_MiniTable_MessageFieldIsLinked( - const upb_MiniTable* m, const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)(m, f); -} - -// TODO: Implement convenience getters for map entries: -// -// upb_MiniTable_GetMapKey() -// upb_MiniTable_GetMapValue() -// These could also assert that this is indeed a map entry (well, as best we -// can. We can assert that there are two fields with field numbers 1 and 2). - -// If this field is in a oneof, returns the first field in the oneof. -// -// Otherwise returns NULL. -// -// Usage: -// const upb_MiniTableField* field = upb_MiniTable_GetOneof(m, f); -// do { -// .. -// } while (upb_MiniTable_NextOneofField(m, &field); -// -const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, - const upb_MiniTableField* f); - -// Iterates to the next field in the oneof. If this is the last field in the -// oneof, returns false. The ordering of fields in the oneof is not -// guaranteed. -// REQUIRES: |f| is the field initialized by upb_MiniTable_GetOneof and updated -// by prior upb_MiniTable_NextOneofField calls. -bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, - const upb_MiniTableField** f); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_MESSAGE_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -extern const float kUpb_FltInfinity; -extern const double kUpb_Infinity; -extern const double kUpb_NaN; - -/* Internal members of a upb_Message that track unknown fields and/or - * extensions. We can change this without breaking binary compatibility. We put - * these before the user's data. The user's upb_Message* points after the - * upb_Message_Internal. */ +/* Internal members of a upb_Message that track unknown fields and/or + * extensions. We can change this without breaking binary compatibility. We put + * these before the user's data. The user's upb_Message* points after the + * upb_Message_Internal. */ struct upb_Message_InternalData { /* Total size of this structure, including the data that follows. @@ -2345,8 +2379,9 @@ UPB_INLINE size_t upb_msg_sizeof(const upb_MiniTable* m) { return m->UPB_PRIVATE(size) + sizeof(upb_Message_Internal); } -UPB_INLINE upb_Message* UPB_PRIVATE(_upb_Message_New)( - const upb_MiniTable* mini_table, upb_Arena* arena) { +// Inline version upb_Message_New(), for internal use. +UPB_INLINE upb_Message* _upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena) { size_t size = upb_msg_sizeof(mini_table); void* mem = upb_Arena_Malloc(arena, size + sizeof(upb_Message_Internal)); if (UPB_UNLIKELY(!mem)) return NULL; @@ -2364,58 +2399,20 @@ UPB_INLINE upb_Message_Internal* upb_Message_Getinternal( // Discards the unknown fields for this message only. void _upb_Message_DiscardUnknown_shallow(upb_Message* msg); -bool UPB_PRIVATE(_upb_Message_Realloc)(upb_Message* msg, size_t need, - upb_Arena* arena); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_H_ */ - -// Public APIs for message operations that do not depend on the schema. -// -// MiniTable-based accessors live in accessors.h. - -#ifndef UPB_MESSAGE_MESSAGE_H_ -#define UPB_MESSAGE_MESSAGE_H_ - -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Creates a new message with the given mini_table on the given arena. -UPB_API_INLINE upb_Message* upb_Message_New(const upb_MiniTable* mini_table, - upb_Arena* arena) { - return UPB_PRIVATE(_upb_Message_New)(mini_table, arena); -} - // Adds unknown data (serialized protobuf data) to the given message. // The data is copied into the message instance. -bool upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, - upb_Arena* arena); +bool _upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, + upb_Arena* arena); -// Returns a reference to the message's unknown data. -const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len); - -// Removes partial unknown data from message. -void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len); - -// Returns the number of extensions present in this message. -size_t upb_Message_ExtensionCount(const upb_Message* msg); +bool UPB_PRIVATE(_upb_Message_Realloc)(upb_Message* msg, size_t need, + upb_Arena* arena); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* UPB_MESSAGE_MESSAGE_H_ */ +#endif /* UPB_MESSAGE_INTERNAL_H_ */ // Must be last. @@ -3235,7 +3232,7 @@ UPB_API_INLINE upb_Message* upb_Message_GetOrCreateMutableMessage( const upb_MiniTable* sub_mini_table = upb_MiniTableSub_Message( mini_table->UPB_PRIVATE(subs)[field->UPB_PRIVATE(submsg_index)]); UPB_ASSERT(sub_mini_table); - sub_message = upb_Message_New(sub_mini_table, arena); + sub_message = _upb_Message_New(sub_mini_table, arena); *UPB_PTR_AT(msg, field->offset, upb_Message*) = sub_message; UPB_PRIVATE(_upb_Message_SetPresence)(msg, field); } @@ -4377,7 +4374,7 @@ typedef enum { /* google.protobuf.FileDescriptorSet */ UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorSet*)upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); + return (google_protobuf_FileDescriptorSet*)_upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); } UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); @@ -4468,7 +4465,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); + struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4477,7 +4474,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr /* google.protobuf.FileDescriptorProto */ UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorProto*)upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); + return (google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); @@ -4912,7 +4909,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescripto if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4938,7 +4935,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescr if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4964,7 +4961,7 @@ UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDe if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); + struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4990,7 +4987,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5002,7 +4999,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FileOptions*)upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); + sub = (struct google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); if (sub) google_protobuf_FileDescriptorProto_set_options(msg, sub); } return sub; @@ -5014,7 +5011,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_ UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { - sub = (struct google_protobuf_SourceCodeInfo*)upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); + sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); if (sub) google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); } return sub; @@ -5079,7 +5076,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_ /* google.protobuf.DescriptorProto */ UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + return (google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); @@ -5463,7 +5460,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5489,7 +5486,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorPro if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5515,7 +5512,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_Descripto if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5541,7 +5538,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobu if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); + struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5567,7 +5564,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5579,7 +5576,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_Desc UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MessageOptions*)upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); + sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); if (sub) google_protobuf_DescriptorProto_set_options(msg, sub); } return sub; @@ -5605,7 +5602,7 @@ UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); + struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5631,7 +5628,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); + struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5664,7 +5661,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobu /* google.protobuf.DescriptorProto.ExtensionRange */ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ExtensionRange*)upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); + return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); @@ -5757,7 +5754,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(googl UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ExtensionRangeOptions*)upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); + sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); if (sub) google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); } return sub; @@ -5766,7 +5763,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip /* google.protobuf.DescriptorProto.ReservedRange */ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ReservedRange*)upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); + return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); @@ -5841,7 +5838,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro /* google.protobuf.ExtensionRangeOptions */ UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions*)upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); + return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); @@ -5999,7 +5996,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions_Declaration* google_prot if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); + struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6015,7 +6012,7 @@ UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_features(google_protob UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ExtensionRangeOptions_mutable_features(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ExtensionRangeOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_ExtensionRangeOptions_set_features(msg, sub); } return sub; @@ -6041,7 +6038,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6050,7 +6047,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension /* google.protobuf.ExtensionRangeOptions.Declaration */ UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions_Declaration*)upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); + return (google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ExtensionRangeOptions_Declaration* ret = google_protobuf_ExtensionRangeOptions_Declaration_new(arena); @@ -6182,7 +6179,7 @@ UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_repeated(g /* google.protobuf.FieldDescriptorProto */ UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); @@ -6415,7 +6412,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions*)upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); + sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); if (sub) google_protobuf_FieldDescriptorProto_set_options(msg, sub); } return sub; @@ -6436,7 +6433,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_ /* google.protobuf.OneofDescriptorProto */ UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_OneofDescriptorProto*)upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); + return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); @@ -6510,7 +6507,7 @@ UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_OneofOptions*)upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); + sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); if (sub) google_protobuf_OneofDescriptorProto_set_options(msg, sub); } return sub; @@ -6519,7 +6516,7 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP /* google.protobuf.EnumDescriptorProto */ UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); @@ -6718,7 +6715,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); + struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6730,7 +6727,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumOptions*)upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); + sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); if (sub) google_protobuf_EnumDescriptorProto_set_options(msg, sub); } return sub; @@ -6756,7 +6753,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); + struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6789,7 +6786,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_pro /* google.protobuf.EnumDescriptorProto.EnumReservedRange */ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); @@ -6864,7 +6861,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go /* google.protobuf.EnumValueDescriptorProto */ UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumValueDescriptorProto*)upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); + return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); @@ -6957,7 +6954,7 @@ UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_prot UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumValueOptions*)upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); + sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); if (sub) google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); } return sub; @@ -6966,7 +6963,7 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes /* google.protobuf.ServiceDescriptorProto */ UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_ServiceDescriptorProto*)upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); + return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); @@ -7091,7 +7088,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); + struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -7103,7 +7100,7 @@ UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protob UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ServiceOptions*)upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); + sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); if (sub) google_protobuf_ServiceDescriptorProto_set_options(msg, sub); } return sub; @@ -7112,7 +7109,7 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip /* google.protobuf.MethodDescriptorProto */ UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_MethodDescriptorProto*)upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); + return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); @@ -7254,7 +7251,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobu UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MethodOptions*)upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); + sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); if (sub) google_protobuf_MethodDescriptorProto_set_options(msg, sub); } return sub; @@ -7271,7 +7268,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl /* google.protobuf.FileOptions */ UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) { - return (google_protobuf_FileOptions*)upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); + return (google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); } UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); @@ -7743,7 +7740,7 @@ UPB_INLINE void google_protobuf_FileOptions_set_features(google_protobuf_FileOpt UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FileOptions_mutable_features(google_protobuf_FileOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FileOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FileOptions_set_features(msg, sub); } return sub; @@ -7769,7 +7766,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -7778,7 +7775,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio /* google.protobuf.MessageOptions */ UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) { - return (google_protobuf_MessageOptions*)upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); + return (google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); } UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); @@ -7965,7 +7962,7 @@ UPB_INLINE void google_protobuf_MessageOptions_set_features(google_protobuf_Mess UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MessageOptions_mutable_features(google_protobuf_MessageOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MessageOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_MessageOptions_set_features(msg, sub); } return sub; @@ -7991,7 +7988,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8000,7 +7997,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp /* google.protobuf.FieldOptions */ UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions*)upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); + return (google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); } UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); @@ -8375,7 +8372,7 @@ UPB_INLINE struct google_protobuf_FieldOptions_EditionDefault* google_protobuf_F if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); + struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8387,7 +8384,7 @@ UPB_INLINE void google_protobuf_FieldOptions_set_features(google_protobuf_FieldO UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FieldOptions_mutable_features(google_protobuf_FieldOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FieldOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FieldOptions_set_features(msg, sub); } return sub; @@ -8413,7 +8410,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8422,7 +8419,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti /* google.protobuf.FieldOptions.EditionDefault */ UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions_EditionDefault*)upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); + return (google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); } UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldOptions_EditionDefault* ret = google_protobuf_FieldOptions_EditionDefault_new(arena); @@ -8497,7 +8494,7 @@ UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_set_edition(google_p /* google.protobuf.OneofOptions */ UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) { - return (google_protobuf_OneofOptions*)upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); + return (google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); } UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); @@ -8589,7 +8586,7 @@ UPB_INLINE void google_protobuf_OneofOptions_set_features(google_protobuf_OneofO UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_OneofOptions_mutable_features(google_protobuf_OneofOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_OneofOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_OneofOptions_set_features(msg, sub); } return sub; @@ -8615,7 +8612,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8624,7 +8621,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti /* google.protobuf.EnumOptions */ UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumOptions*)upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); + return (google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); } UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); @@ -8773,7 +8770,7 @@ UPB_INLINE void google_protobuf_EnumOptions_set_features(google_protobuf_EnumOpt UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumOptions_mutable_features(google_protobuf_EnumOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_EnumOptions_set_features(msg, sub); } return sub; @@ -8799,7 +8796,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8808,7 +8805,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio /* google.protobuf.EnumValueOptions */ UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumValueOptions*)upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); + return (google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); } UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); @@ -8934,7 +8931,7 @@ UPB_INLINE void google_protobuf_EnumValueOptions_set_features(google_protobuf_En UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumValueOptions_mutable_features(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumValueOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_EnumValueOptions_set_features(msg, sub); } return sub; @@ -8964,7 +8961,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8973,7 +8970,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue /* google.protobuf.ServiceOptions */ UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) { - return (google_protobuf_ServiceOptions*)upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); + return (google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); } UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); @@ -9084,7 +9081,7 @@ UPB_INLINE void google_protobuf_ServiceOptions_set_features(google_protobuf_Serv UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ServiceOptions_mutable_features(google_protobuf_ServiceOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ServiceOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_ServiceOptions_set_features(msg, sub); } return sub; @@ -9110,7 +9107,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9119,7 +9116,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp /* google.protobuf.MethodOptions */ UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) { - return (google_protobuf_MethodOptions*)upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); + return (google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); } UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); @@ -9249,7 +9246,7 @@ UPB_INLINE void google_protobuf_MethodOptions_set_features(google_protobuf_Metho UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MethodOptions_mutable_features(google_protobuf_MethodOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MethodOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_MethodOptions_set_features(msg, sub); } return sub; @@ -9275,7 +9272,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9284,7 +9281,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt /* google.protobuf.UninterpretedOption */ UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + return (google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); } UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); @@ -9465,7 +9462,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); + struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9498,7 +9495,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_p /* google.protobuf.UninterpretedOption.NamePart */ UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption_NamePart*)upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); + return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); @@ -9573,7 +9570,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go /* google.protobuf.FeatureSet */ UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_new(upb_Arena* arena) { - return (google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + return (google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSet* ret = google_protobuf_FeatureSet_new(arena); @@ -9724,7 +9721,7 @@ UPB_INLINE void google_protobuf_FeatureSet_set_json_format(google_protobuf_Featu /* google.protobuf.FeatureSetDefaults */ UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults*)upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); + return (google_protobuf_FeatureSetDefaults*)_upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSetDefaults* ret = google_protobuf_FeatureSetDefaults_new(arena); @@ -9845,7 +9842,7 @@ UPB_INLINE struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* g if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); + struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9862,7 +9859,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_set_maximum_edition(google_pr /* google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault */ UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); + return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* ret = google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(arena); @@ -9932,7 +9929,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_ UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_mutable_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_features(msg, sub); } return sub; @@ -9945,7 +9942,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_ /* google.protobuf.SourceCodeInfo */ UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo*)upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); + return (google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); } UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); @@ -10036,7 +10033,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); + struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -10045,7 +10042,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc /* google.protobuf.SourceCodeInfo.Location */ UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo_Location*)upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); + return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); } UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); @@ -10303,7 +10300,7 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_com /* google.protobuf.GeneratedCodeInfo */ UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo*)upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); + return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); @@ -10394,7 +10391,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); + struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -10403,7 +10400,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ /* google.protobuf.GeneratedCodeInfo.Annotation */ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation*)upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); @@ -13531,8 +13528,8 @@ UPB_INLINE const char* _upb_Decoder_BufferFlipCallback( if (!old_end) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); if (d->unknown) { - if (!upb_Message_AddUnknown(d->unknown_msg, d->unknown, - old_end - d->unknown, &d->arena)) { + if (!_upb_Message_AddUnknown(d->unknown_msg, d->unknown, + old_end - d->unknown, &d->arena)) { _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } d->unknown = new_start; diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index dd98d8379609..310001009e48 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c @@ -5711,7 +5711,7 @@ upb_Message* _upb_Message_Copy(upb_Message* dst, const upb_Message* src, if (unknown_size != 0) { UPB_ASSERT(ptr); // Make a copy into destination arena. - if (!upb_Message_AddUnknown(dst, ptr, unknown_size, arena)) { + if (!_upb_Message_AddUnknown(dst, ptr, unknown_size, arena)) { return NULL; } } @@ -6209,8 +6209,13 @@ bool _upb_mapsorter_pushexts(_upb_mapsorter* s, static const size_t message_overhead = sizeof(upb_Message_InternalData); -bool upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, - upb_Arena* arena) { +upb_Message* upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena) { + return _upb_Message_New(mini_table, arena); +} + +bool _upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, + upb_Arena* arena) { if (!UPB_PRIVATE(_upb_Message_Realloc)(msg, len, arena)) return false; upb_Message_Internal* in = upb_Message_Getinternal(msg); memcpy(UPB_PTR_AT(in->internal, in->internal->unknown_end, char), data, len); @@ -12351,7 +12356,7 @@ static upb_Message* _upb_Decoder_NewSubMessage(upb_Decoder* d, upb_TaggedMessagePtr* target) { const upb_MiniTable* subl = _upb_MiniTableSubs_MessageByField(subs, field); UPB_ASSERT(subl); - upb_Message* msg = upb_Message_New(subl, &d->arena); + upb_Message* msg = _upb_Message_New(subl, &d->arena); if (!msg) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); // Extensions should not be unlinked. A message extension should not be @@ -12479,7 +12484,7 @@ static void _upb_Decoder_AddUnknownVarints(upb_Decoder* d, upb_Message* msg, end = upb_Decoder_EncodeVarint32(val1, end); end = upb_Decoder_EncodeVarint32(val2, end); - if (!upb_Message_AddUnknown(msg, buf, end - buf, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, buf, end - buf, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } @@ -12765,7 +12770,7 @@ static const char* _upb_Decoder_DecodeToMap(upb_Decoder* d, const char* ptr, _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } _upb_Decoder_AddUnknownVarints(d, msg, tag, size); - if (!upb_Message_AddUnknown(msg, buf, size, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, buf, size, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } else { @@ -12943,9 +12948,9 @@ static void upb_Decoder_AddUnknownMessageSetItem(upb_Decoder* d, ptr = upb_Decoder_EncodeVarint32(kEndItemTag, ptr); char* end = ptr; - if (!upb_Message_AddUnknown(msg, buf, split - buf, &d->arena) || - !upb_Message_AddUnknown(msg, message_data, message_size, &d->arena) || - !upb_Message_AddUnknown(msg, split, end - split, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, buf, split - buf, &d->arena) || + !_upb_Message_AddUnknown(msg, message_data, message_size, &d->arena) || + !_upb_Message_AddUnknown(msg, split, end - split, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } @@ -13330,7 +13335,7 @@ static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d, start = d->unknown; d->unknown = NULL; } - if (!upb_Message_AddUnknown(msg, start, ptr - start, &d->arena)) { + if (!_upb_Message_AddUnknown(msg, start, ptr - start, &d->arena)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } } else if (wire_type == kUpb_WireType_StartGroup) { diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 34d828f18064..adef471dbdea 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -917,17 +917,99 @@ UPB_API void* upb_Array_MutableDataPtr(upb_Array* arr); #ifndef UPB_MESSAGE_INTERNAL_EXTENSION_H_ #define UPB_MESSAGE_INTERNAL_EXTENSION_H_ + +// Public APIs for message operations that do not depend on the schema. +// +// MiniTable-based accessors live in accessors.h. + +#ifndef UPB_MESSAGE_MESSAGE_H_ +#define UPB_MESSAGE_MESSAGE_H_ + #include -#ifndef UPB_MINI_TABLE_EXTENSION_H_ -#define UPB_MINI_TABLE_EXTENSION_H_ +#ifndef UPB_MINI_TABLE_MESSAGE_H_ +#define UPB_MINI_TABLE_MESSAGE_H_ + + +#ifndef UPB_MINI_TABLE_ENUM_H_ +#define UPB_MINI_TABLE_ENUM_H_ #include -#ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ -#define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ +#ifndef UPB_MINI_TABLE_INTERNAL_ENUM_H_ +#define UPB_MINI_TABLE_INTERNAL_ENUM_H_ + +#include + +// Must be last. + +struct upb_MiniTableEnum { + uint32_t UPB_PRIVATE(mask_limit); // Highest that can be tested with mask. + uint32_t UPB_PRIVATE(value_count); // Number of values after the bitfield. + uint32_t UPB_PRIVATE(data)[]; // Bitmask + enumerated values follow. +}; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)( + const struct upb_MiniTableEnum* e, uint32_t val) { + if (UPB_LIKELY(val < 64)) { + const uint64_t mask = + e->UPB_PRIVATE(data)[0] | ((uint64_t)e->UPB_PRIVATE(data)[1] << 32); + const uint64_t bit = 1ULL << val; + return (mask & bit) != 0; + } + if (UPB_LIKELY(val < e->UPB_PRIVATE(mask_limit))) { + const uint32_t mask = e->UPB_PRIVATE(data)[val / 32]; + const uint32_t bit = 1ULL << (val % 32); + return (mask & bit) != 0; + } + + // OPT: binary search long lists? + const uint32_t* start = + &e->UPB_PRIVATE(data)[e->UPB_PRIVATE(mask_limit) / 32]; + const uint32_t* limit = &e->UPB_PRIVATE( + data)[e->UPB_PRIVATE(mask_limit) / 32 + e->UPB_PRIVATE(value_count)]; + for (const uint32_t* p = start; p < limit; p++) { + if (*p == val) return true; + } + return false; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_INTERNAL_ENUM_H_ */ + +// Must be last + +typedef struct upb_MiniTableEnum upb_MiniTableEnum; + +#ifdef __cplusplus +extern "C" { +#endif + +// Validates enum value against range defined by enum mini table. +UPB_INLINE bool upb_MiniTableEnum_CheckValue(const upb_MiniTableEnum* e, + uint32_t val) { + return UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)(e, val); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_ENUM_H_ */ + +#ifndef UPB_MINI_TABLE_FIELD_H_ +#define UPB_MINI_TABLE_FIELD_H_ #include @@ -1201,6 +1283,78 @@ UPB_INLINE size_t UPB_PRIVATE(_upb_MiniTableField_ElemSizeLg2)( #endif /* UPB_MINI_TABLE_INTERNAL_FIELD_H_ */ +// Must be last. + +typedef struct upb_MiniTableField upb_MiniTableField; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_API_INLINE upb_CType upb_MiniTableField_CType(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_CType)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_HasPresence( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_HasPresence)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsArray(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsArray)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsClosedEnum)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsExtension( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsExtension)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsInOneof(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsInOneof)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsMap(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsMap)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsPacked(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsPacked)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsScalar(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsScalar)(f); +} + +UPB_API_INLINE bool upb_MiniTableField_IsSubMessage( + const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_IsSubMessage)(f); +} + +UPB_API_INLINE uint32_t upb_MiniTableField_Number(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_Number)(f); +} + +UPB_API_INLINE upb_FieldType +upb_MiniTableField_Type(const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTableField_Type)(f); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_FIELD_H_ */ + +#ifndef UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ +#define UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ + + #ifndef UPB_MINI_TABLE_INTERNAL_SUB_H_ #define UPB_MINI_TABLE_INTERNAL_SUB_H_ @@ -1248,72 +1402,308 @@ UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTableSub_Message)( // Must be last. -struct upb_MiniTableExtension { - // Do not move this field. We need to be able to alias pointers. - struct upb_MiniTableField UPB_PRIVATE(field); - - const struct upb_MiniTable* UPB_PRIVATE(extendee); - union upb_MiniTableSub UPB_PRIVATE(sub); // NULL unless submsg or proto2 enum -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( - _upb_MiniTableExtension_AsField)(const struct upb_MiniTableExtension* e) { - return (const struct upb_MiniTableField*)&e->UPB_PRIVATE(field); -} - -UPB_INLINE uint32_t UPB_PRIVATE(_upb_MiniTableExtension_Number)( - const struct upb_MiniTableExtension* e) { - return e->UPB_PRIVATE(field).UPB_ONLYBITS(number); -} +struct upb_Decoder; +typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, + upb_Message* msg, intptr_t table, + uint64_t hasbits, uint64_t data); +typedef struct { + uint64_t field_data; + _upb_FieldParser* field_parser; +} _upb_FastTable_Entry; -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( - _upb_MiniTableExtension_GetSubMessage)( - const struct upb_MiniTableExtension* e) { - return e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg); -} +typedef enum { + kUpb_ExtMode_NonExtendable = 0, // Non-extendable message. + kUpb_ExtMode_Extendable = 1, // Normal extendable message. + kUpb_ExtMode_IsMessageSet = 2, // MessageSet message. + kUpb_ExtMode_IsMessageSet_ITEM = + 3, // MessageSet item (temporary only, see decode.c) -UPB_INLINE void UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)( - struct upb_MiniTableExtension* e, const struct upb_MiniTable* m) { - e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg) = m; -} + // During table building we steal a bit to indicate that the message is a map + // entry. *Only* used during table building! + kUpb_ExtMode_IsMapEntry = 4, +} upb_ExtMode; -#ifdef __cplusplus -} /* extern "C" */ -#endif +// upb_MiniTable represents the memory layout of a given upb_MessageDef. +// The members are public so generated code can initialize them, +// but users MUST NOT directly read or write any of its members. +// LINT.IfChange(minitable_struct_definition) +struct upb_MiniTable { + const union upb_MiniTableSub* UPB_PRIVATE(subs); + const struct upb_MiniTableField* UPB_ONLYBITS(fields); + // Must be aligned to sizeof(void*). Doesn't include internal members like + // unknown fields, extension dict, pointer to msglayout, etc. + uint16_t UPB_PRIVATE(size); -#endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */ + uint16_t UPB_ONLYBITS(field_count); -// Must be last. + uint8_t UPB_PRIVATE(ext); // upb_ExtMode, uint8_t here so sizeof(ext) == 1 + uint8_t UPB_PRIVATE(dense_below); + uint8_t UPB_PRIVATE(table_mask); + uint8_t UPB_PRIVATE(required_count); // Required fields have the low hasbits. -typedef struct upb_MiniTableExtension upb_MiniTableExtension; + // To statically initialize the tables of variable length, we need a flexible + // array member, and we need to compile in gnu99 mode (constant initialization + // of flexible array members is a GNU extension, not in C99 unfortunately. + _upb_FastTable_Entry UPB_PRIVATE(fasttable)[]; +}; +// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table.ts) #ifdef __cplusplus extern "C" { #endif -UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTableExtension_AsField( - const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_AsField)(e); -} +UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTable_Empty)(void) { + extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); -UPB_API_INLINE uint32_t -upb_MiniTableExtension_Number(const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_Number)(e); + return &UPB_PRIVATE(_kUpb_MiniTable_Empty); } -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableExtension_GetSubMessage( - const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_GetSubMessage)(e); +UPB_INLINE int UPB_PRIVATE(_upb_MiniTable_FieldCount)( + const struct upb_MiniTable* m) { + return m->UPB_ONLYBITS(field_count); } -UPB_API_INLINE void upb_MiniTableExtension_SetSubMessage( - upb_MiniTableExtension* e, const struct upb_MiniTable* m) { - return UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)(e, m); +UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_IsEmpty)( + const struct upb_MiniTable* m) { + extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); + + return m == &UPB_PRIVATE(_kUpb_MiniTable_Empty); +} + +UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( + _upb_MiniTable_GetFieldByIndex)(const struct upb_MiniTable* m, uint32_t i) { + return &m->UPB_ONLYBITS(fields)[i]; +} + +UPB_INLINE const union upb_MiniTableSub* UPB_PRIVATE( + _upb_MiniTable_GetSubByIndex)(const struct upb_MiniTable* m, uint32_t i) { + return &m->UPB_PRIVATE(subs)[i]; +} + +UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( + _upb_MiniTable_GetSubMessageTable)(const struct upb_MiniTable* m, + const struct upb_MiniTableField* f) { + UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Message); + const struct upb_MiniTable* ret = UPB_PRIVATE(_upb_MiniTableSub_Message)( + m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); + UPB_ASSUME(ret); + return UPB_PRIVATE(_upb_MiniTable_IsEmpty)(ret) ? NULL : ret; +} + +UPB_INLINE const struct upb_MiniTableEnum* UPB_PRIVATE( + _upb_MiniTable_GetSubEnumTable)(const struct upb_MiniTable* m, + const struct upb_MiniTableField* f) { + UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Enum); + return UPB_PRIVATE(_upb_MiniTableSub_Enum)( + m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); +} + +UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)( + const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f) != NULL; +} + +// Computes a bitmask in which the |m->required_count| lowest bits are set, +// except that we skip the lowest bit (because upb never uses hasbit 0). +// +// Sample output: +// RequiredMask(1) => 0b10 (0x2) +// RequiredMask(5) => 0b111110 (0x3e) +UPB_INLINE uint64_t +UPB_PRIVATE(_upb_MiniTable_RequiredMask)(const struct upb_MiniTable* m) { + int n = m->UPB_PRIVATE(required_count); + UPB_ASSERT(0 < n && n <= 63); + return ((1ULL << n) - 1) << 1; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ */ + +// Must be last. + +typedef struct upb_MiniTable upb_MiniTable; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_API const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( + const upb_MiniTable* m, uint32_t number); + +UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_GetFieldByIndex( + const upb_MiniTable* m, uint32_t index) { + return UPB_PRIVATE(_upb_MiniTable_GetFieldByIndex)(m, index); +} + +UPB_API_INLINE int upb_MiniTable_FieldCount(const upb_MiniTable* m) { + return UPB_PRIVATE(_upb_MiniTable_FieldCount)(m); +} + +// Returns the MiniTable for a message field, NULL if the field is unlinked. +UPB_API_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable( + const upb_MiniTable* m, const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f); +} + +// Returns the MiniTableEnum for a message field, NULL if the field is unlinked. +UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable( + const upb_MiniTable* m, const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_GetSubEnumTable)(m, f); +} + +// Returns true if this MiniTable field is linked to a MiniTable for the +// sub-message. +UPB_API_INLINE bool upb_MiniTable_MessageFieldIsLinked( + const upb_MiniTable* m, const upb_MiniTableField* f) { + return UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)(m, f); +} + +// TODO: Implement convenience getters for map entries: +// +// upb_MiniTable_GetMapKey() +// upb_MiniTable_GetMapValue() +// These could also assert that this is indeed a map entry (well, as best we +// can. We can assert that there are two fields with field numbers 1 and 2). + +// If this field is in a oneof, returns the first field in the oneof. +// +// Otherwise returns NULL. +// +// Usage: +// const upb_MiniTableField* field = upb_MiniTable_GetOneof(m, f); +// do { +// .. +// } while (upb_MiniTable_NextOneofField(m, &field); +// +const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, + const upb_MiniTableField* f); + +// Iterates to the next field in the oneof. If this is the last field in the +// oneof, returns false. The ordering of fields in the oneof is not +// guaranteed. +// REQUIRES: |f| is the field initialized by upb_MiniTable_GetOneof and updated +// by prior upb_MiniTable_NextOneofField calls. +bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, + const upb_MiniTableField** f); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_MESSAGE_H_ */ + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +// Creates a new message with the given mini_table on the given arena. +UPB_API upb_Message* upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena); + +// Returns a reference to the message's unknown data. +const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len); + +// Removes partial unknown data from message. +void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len); + +// Returns the number of extensions present in this message. +size_t upb_Message_ExtensionCount(const upb_Message* msg); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MESSAGE_MESSAGE_H_ */ + +#ifndef UPB_MINI_TABLE_EXTENSION_H_ +#define UPB_MINI_TABLE_EXTENSION_H_ + +#include + + +#ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ +#define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ + +#include + + +// Must be last. + +struct upb_MiniTableExtension { + // Do not move this field. We need to be able to alias pointers. + struct upb_MiniTableField UPB_PRIVATE(field); + + const struct upb_MiniTable* UPB_PRIVATE(extendee); + union upb_MiniTableSub UPB_PRIVATE(sub); // NULL unless submsg or proto2 enum +}; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( + _upb_MiniTableExtension_AsField)(const struct upb_MiniTableExtension* e) { + return (const struct upb_MiniTableField*)&e->UPB_PRIVATE(field); +} + +UPB_INLINE uint32_t UPB_PRIVATE(_upb_MiniTableExtension_Number)( + const struct upb_MiniTableExtension* e) { + return e->UPB_PRIVATE(field).UPB_ONLYBITS(number); +} + +UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( + _upb_MiniTableExtension_GetSubMessage)( + const struct upb_MiniTableExtension* e) { + return e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg); +} + +UPB_INLINE void UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)( + struct upb_MiniTableExtension* e, const struct upb_MiniTable* m) { + e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg) = m; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */ + +// Must be last. + +typedef struct upb_MiniTableExtension upb_MiniTableExtension; + +#ifdef __cplusplus +extern "C" { +#endif + +UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTableExtension_AsField( + const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_AsField)(e); +} + +UPB_API_INLINE uint32_t +upb_MiniTableExtension_Number(const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_Number)(e); +} + +UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableExtension_GetSubMessage( + const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_GetSubMessage)(e); +} + +UPB_API_INLINE void upb_MiniTableExtension_SetSubMessage( + upb_MiniTableExtension* e, const struct upb_MiniTable* m) { + return UPB_PRIVATE(_upb_MiniTableExtension_SetSubMessage)(e, m); } #ifdef __cplusplus @@ -1948,376 +2338,20 @@ typedef struct { #endif // UPB_MINI_TABLE_INTERNAL_TYPES_H_ -#ifndef UPB_MINI_TABLE_MESSAGE_H_ -#define UPB_MINI_TABLE_MESSAGE_H_ - +// Must be last. -#ifndef UPB_MINI_TABLE_ENUM_H_ -#define UPB_MINI_TABLE_ENUM_H_ +#ifdef __cplusplus +extern "C" { +#endif -#include +extern const float kUpb_FltInfinity; +extern const double kUpb_Infinity; +extern const double kUpb_NaN; - -#ifndef UPB_MINI_TABLE_INTERNAL_ENUM_H_ -#define UPB_MINI_TABLE_INTERNAL_ENUM_H_ - -#include - -// Must be last. - -struct upb_MiniTableEnum { - uint32_t UPB_PRIVATE(mask_limit); // Highest that can be tested with mask. - uint32_t UPB_PRIVATE(value_count); // Number of values after the bitfield. - uint32_t UPB_PRIVATE(data)[]; // Bitmask + enumerated values follow. -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)( - const struct upb_MiniTableEnum* e, uint32_t val) { - if (UPB_LIKELY(val < 64)) { - const uint64_t mask = - e->UPB_PRIVATE(data)[0] | ((uint64_t)e->UPB_PRIVATE(data)[1] << 32); - const uint64_t bit = 1ULL << val; - return (mask & bit) != 0; - } - if (UPB_LIKELY(val < e->UPB_PRIVATE(mask_limit))) { - const uint32_t mask = e->UPB_PRIVATE(data)[val / 32]; - const uint32_t bit = 1ULL << (val % 32); - return (mask & bit) != 0; - } - - // OPT: binary search long lists? - const uint32_t* start = - &e->UPB_PRIVATE(data)[e->UPB_PRIVATE(mask_limit) / 32]; - const uint32_t* limit = &e->UPB_PRIVATE( - data)[e->UPB_PRIVATE(mask_limit) / 32 + e->UPB_PRIVATE(value_count)]; - for (const uint32_t* p = start; p < limit; p++) { - if (*p == val) return true; - } - return false; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_ENUM_H_ */ - -// Must be last - -typedef struct upb_MiniTableEnum upb_MiniTableEnum; - -#ifdef __cplusplus -extern "C" { -#endif - -// Validates enum value against range defined by enum mini table. -UPB_INLINE bool upb_MiniTableEnum_CheckValue(const upb_MiniTableEnum* e, - uint32_t val) { - return UPB_PRIVATE(_upb_MiniTableEnum_CheckValue)(e, val); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_ENUM_H_ */ - -#ifndef UPB_MINI_TABLE_FIELD_H_ -#define UPB_MINI_TABLE_FIELD_H_ - -#include - - -// Must be last. - -typedef struct upb_MiniTableField upb_MiniTableField; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE upb_CType upb_MiniTableField_CType(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_CType)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_HasPresence( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_HasPresence)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsArray(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsArray)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsClosedEnum)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsExtension( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsExtension)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsInOneof(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsInOneof)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsMap(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsMap)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsPacked(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsPacked)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsScalar(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsScalar)(f); -} - -UPB_API_INLINE bool upb_MiniTableField_IsSubMessage( - const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_IsSubMessage)(f); -} - -UPB_API_INLINE uint32_t upb_MiniTableField_Number(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Number)(f); -} - -UPB_API_INLINE upb_FieldType -upb_MiniTableField_Type(const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Type)(f); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_FIELD_H_ */ - -#ifndef UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ -#define UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ - - -// Must be last. - -struct upb_Decoder; -typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, - upb_Message* msg, intptr_t table, - uint64_t hasbits, uint64_t data); -typedef struct { - uint64_t field_data; - _upb_FieldParser* field_parser; -} _upb_FastTable_Entry; - -typedef enum { - kUpb_ExtMode_NonExtendable = 0, // Non-extendable message. - kUpb_ExtMode_Extendable = 1, // Normal extendable message. - kUpb_ExtMode_IsMessageSet = 2, // MessageSet message. - kUpb_ExtMode_IsMessageSet_ITEM = - 3, // MessageSet item (temporary only, see decode.c) - - // During table building we steal a bit to indicate that the message is a map - // entry. *Only* used during table building! - kUpb_ExtMode_IsMapEntry = 4, -} upb_ExtMode; - -// upb_MiniTable represents the memory layout of a given upb_MessageDef. -// The members are public so generated code can initialize them, -// but users MUST NOT directly read or write any of its members. -// LINT.IfChange(minitable_struct_definition) -struct upb_MiniTable { - const union upb_MiniTableSub* UPB_PRIVATE(subs); - const struct upb_MiniTableField* UPB_ONLYBITS(fields); - - // Must be aligned to sizeof(void*). Doesn't include internal members like - // unknown fields, extension dict, pointer to msglayout, etc. - uint16_t UPB_PRIVATE(size); - - uint16_t UPB_ONLYBITS(field_count); - - uint8_t UPB_PRIVATE(ext); // upb_ExtMode, uint8_t here so sizeof(ext) == 1 - uint8_t UPB_PRIVATE(dense_below); - uint8_t UPB_PRIVATE(table_mask); - uint8_t UPB_PRIVATE(required_count); // Required fields have the low hasbits. - - // To statically initialize the tables of variable length, we need a flexible - // array member, and we need to compile in gnu99 mode (constant initialization - // of flexible array members is a GNU extension, not in C99 unfortunately. - _upb_FastTable_Entry UPB_PRIVATE(fasttable)[]; -}; -// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table.ts) - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTable_Empty)(void) { - extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); - - return &UPB_PRIVATE(_kUpb_MiniTable_Empty); -} - -UPB_INLINE int UPB_PRIVATE(_upb_MiniTable_FieldCount)( - const struct upb_MiniTable* m) { - return m->UPB_ONLYBITS(field_count); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_IsEmpty)( - const struct upb_MiniTable* m) { - extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); - - return m == &UPB_PRIVATE(_kUpb_MiniTable_Empty); -} - -UPB_INLINE const struct upb_MiniTableField* UPB_PRIVATE( - _upb_MiniTable_GetFieldByIndex)(const struct upb_MiniTable* m, uint32_t i) { - return &m->UPB_ONLYBITS(fields)[i]; -} - -UPB_INLINE const union upb_MiniTableSub* UPB_PRIVATE( - _upb_MiniTable_GetSubByIndex)(const struct upb_MiniTable* m, uint32_t i) { - return &m->UPB_PRIVATE(subs)[i]; -} - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( - _upb_MiniTable_GetSubMessageTable)(const struct upb_MiniTable* m, - const struct upb_MiniTableField* f) { - UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Message); - const struct upb_MiniTable* ret = UPB_PRIVATE(_upb_MiniTableSub_Message)( - m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); - UPB_ASSUME(ret); - return UPB_PRIVATE(_upb_MiniTable_IsEmpty)(ret) ? NULL : ret; -} - -UPB_INLINE const struct upb_MiniTableEnum* UPB_PRIVATE( - _upb_MiniTable_GetSubEnumTable)(const struct upb_MiniTable* m, - const struct upb_MiniTableField* f) { - UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_CType)(f) == kUpb_CType_Enum); - return UPB_PRIVATE(_upb_MiniTableSub_Enum)( - m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f) != NULL; -} - -// Computes a bitmask in which the |m->required_count| lowest bits are set, -// except that we skip the lowest bit (because upb never uses hasbit 0). -// -// Sample output: -// RequiredMask(1) => 0b10 (0x2) -// RequiredMask(5) => 0b111110 (0x3e) -UPB_INLINE uint64_t -UPB_PRIVATE(_upb_MiniTable_RequiredMask)(const struct upb_MiniTable* m) { - int n = m->UPB_PRIVATE(required_count); - UPB_ASSERT(0 < n && n <= 63); - return ((1ULL << n) - 1) << 1; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ */ - -// Must be last. - -typedef struct upb_MiniTable upb_MiniTable; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( - const upb_MiniTable* m, uint32_t number); - -UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_GetFieldByIndex( - const upb_MiniTable* m, uint32_t index) { - return UPB_PRIVATE(_upb_MiniTable_GetFieldByIndex)(m, index); -} - -UPB_API_INLINE int upb_MiniTable_FieldCount(const upb_MiniTable* m) { - return UPB_PRIVATE(_upb_MiniTable_FieldCount)(m); -} - -// Returns the MiniTable for a message field, NULL if the field is unlinked. -UPB_API_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable( - const upb_MiniTable* m, const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_GetSubMessageTable)(m, f); -} - -// Returns the MiniTableEnum for a message field, NULL if the field is unlinked. -UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable( - const upb_MiniTable* m, const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_GetSubEnumTable)(m, f); -} - -// Returns true if this MiniTable field is linked to a MiniTable for the -// sub-message. -UPB_API_INLINE bool upb_MiniTable_MessageFieldIsLinked( - const upb_MiniTable* m, const upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTable_MessageFieldIsLinked)(m, f); -} - -// TODO: Implement convenience getters for map entries: -// -// upb_MiniTable_GetMapKey() -// upb_MiniTable_GetMapValue() -// These could also assert that this is indeed a map entry (well, as best we -// can. We can assert that there are two fields with field numbers 1 and 2). - -// If this field is in a oneof, returns the first field in the oneof. -// -// Otherwise returns NULL. -// -// Usage: -// const upb_MiniTableField* field = upb_MiniTable_GetOneof(m, f); -// do { -// .. -// } while (upb_MiniTable_NextOneofField(m, &field); -// -const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, - const upb_MiniTableField* f); - -// Iterates to the next field in the oneof. If this is the last field in the -// oneof, returns false. The ordering of fields in the oneof is not -// guaranteed. -// REQUIRES: |f| is the field initialized by upb_MiniTable_GetOneof and updated -// by prior upb_MiniTable_NextOneofField calls. -bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, - const upb_MiniTableField** f); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_MESSAGE_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -extern const float kUpb_FltInfinity; -extern const double kUpb_Infinity; -extern const double kUpb_NaN; - -/* Internal members of a upb_Message that track unknown fields and/or - * extensions. We can change this without breaking binary compatibility. We put - * these before the user's data. The user's upb_Message* points after the - * upb_Message_Internal. */ +/* Internal members of a upb_Message that track unknown fields and/or + * extensions. We can change this without breaking binary compatibility. We put + * these before the user's data. The user's upb_Message* points after the + * upb_Message_Internal. */ struct upb_Message_InternalData { /* Total size of this structure, including the data that follows. @@ -2347,8 +2381,9 @@ UPB_INLINE size_t upb_msg_sizeof(const upb_MiniTable* m) { return m->UPB_PRIVATE(size) + sizeof(upb_Message_Internal); } -UPB_INLINE upb_Message* UPB_PRIVATE(_upb_Message_New)( - const upb_MiniTable* mini_table, upb_Arena* arena) { +// Inline version upb_Message_New(), for internal use. +UPB_INLINE upb_Message* _upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena) { size_t size = upb_msg_sizeof(mini_table); void* mem = upb_Arena_Malloc(arena, size + sizeof(upb_Message_Internal)); if (UPB_UNLIKELY(!mem)) return NULL; @@ -2366,58 +2401,20 @@ UPB_INLINE upb_Message_Internal* upb_Message_Getinternal( // Discards the unknown fields for this message only. void _upb_Message_DiscardUnknown_shallow(upb_Message* msg); -bool UPB_PRIVATE(_upb_Message_Realloc)(upb_Message* msg, size_t need, - upb_Arena* arena); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_H_ */ - -// Public APIs for message operations that do not depend on the schema. -// -// MiniTable-based accessors live in accessors.h. - -#ifndef UPB_MESSAGE_MESSAGE_H_ -#define UPB_MESSAGE_MESSAGE_H_ - -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Creates a new message with the given mini_table on the given arena. -UPB_API_INLINE upb_Message* upb_Message_New(const upb_MiniTable* mini_table, - upb_Arena* arena) { - return UPB_PRIVATE(_upb_Message_New)(mini_table, arena); -} - // Adds unknown data (serialized protobuf data) to the given message. // The data is copied into the message instance. -bool upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, - upb_Arena* arena); +bool _upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, + upb_Arena* arena); -// Returns a reference to the message's unknown data. -const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len); - -// Removes partial unknown data from message. -void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len); - -// Returns the number of extensions present in this message. -size_t upb_Message_ExtensionCount(const upb_Message* msg); +bool UPB_PRIVATE(_upb_Message_Realloc)(upb_Message* msg, size_t need, + upb_Arena* arena); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* UPB_MESSAGE_MESSAGE_H_ */ +#endif /* UPB_MESSAGE_INTERNAL_H_ */ // Must be last. @@ -3237,7 +3234,7 @@ UPB_API_INLINE upb_Message* upb_Message_GetOrCreateMutableMessage( const upb_MiniTable* sub_mini_table = upb_MiniTableSub_Message( mini_table->UPB_PRIVATE(subs)[field->UPB_PRIVATE(submsg_index)]); UPB_ASSERT(sub_mini_table); - sub_message = upb_Message_New(sub_mini_table, arena); + sub_message = _upb_Message_New(sub_mini_table, arena); *UPB_PTR_AT(msg, field->offset, upb_Message*) = sub_message; UPB_PRIVATE(_upb_Message_SetPresence)(msg, field); } @@ -4881,7 +4878,7 @@ typedef enum { /* google.protobuf.FileDescriptorSet */ UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorSet*)upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); + return (google_protobuf_FileDescriptorSet*)_upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); } UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); @@ -4972,7 +4969,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); + struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4981,7 +4978,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr /* google.protobuf.FileDescriptorProto */ UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorProto*)upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); + return (google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); @@ -5416,7 +5413,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescripto if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5442,7 +5439,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescr if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5468,7 +5465,7 @@ UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDe if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); + struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5494,7 +5491,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5506,7 +5503,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FileOptions*)upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); + sub = (struct google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); if (sub) google_protobuf_FileDescriptorProto_set_options(msg, sub); } return sub; @@ -5518,7 +5515,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_ UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { - sub = (struct google_protobuf_SourceCodeInfo*)upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); + sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); if (sub) google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); } return sub; @@ -5583,7 +5580,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_ /* google.protobuf.DescriptorProto */ UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + return (google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); @@ -5967,7 +5964,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5993,7 +5990,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorPro if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6019,7 +6016,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_Descripto if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6045,7 +6042,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobu if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); + struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6071,7 +6068,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6083,7 +6080,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_Desc UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MessageOptions*)upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); + sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); if (sub) google_protobuf_DescriptorProto_set_options(msg, sub); } return sub; @@ -6109,7 +6106,7 @@ UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); + struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6135,7 +6132,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); + struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6168,7 +6165,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobu /* google.protobuf.DescriptorProto.ExtensionRange */ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ExtensionRange*)upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); + return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); @@ -6261,7 +6258,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(googl UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ExtensionRangeOptions*)upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); + sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); if (sub) google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); } return sub; @@ -6270,7 +6267,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip /* google.protobuf.DescriptorProto.ReservedRange */ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ReservedRange*)upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); + return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); @@ -6345,7 +6342,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro /* google.protobuf.ExtensionRangeOptions */ UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions*)upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); + return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); @@ -6503,7 +6500,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions_Declaration* google_prot if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); + struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6519,7 +6516,7 @@ UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_features(google_protob UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ExtensionRangeOptions_mutable_features(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ExtensionRangeOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_ExtensionRangeOptions_set_features(msg, sub); } return sub; @@ -6545,7 +6542,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6554,7 +6551,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension /* google.protobuf.ExtensionRangeOptions.Declaration */ UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions_Declaration*)upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); + return (google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ExtensionRangeOptions_Declaration* ret = google_protobuf_ExtensionRangeOptions_Declaration_new(arena); @@ -6686,7 +6683,7 @@ UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_repeated(g /* google.protobuf.FieldDescriptorProto */ UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); @@ -6919,7 +6916,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions*)upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); + sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); if (sub) google_protobuf_FieldDescriptorProto_set_options(msg, sub); } return sub; @@ -6940,7 +6937,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_ /* google.protobuf.OneofDescriptorProto */ UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_OneofDescriptorProto*)upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); + return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); @@ -7014,7 +7011,7 @@ UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_OneofOptions*)upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); + sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); if (sub) google_protobuf_OneofDescriptorProto_set_options(msg, sub); } return sub; @@ -7023,7 +7020,7 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP /* google.protobuf.EnumDescriptorProto */ UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); @@ -7222,7 +7219,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); + struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -7234,7 +7231,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumOptions*)upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); + sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); if (sub) google_protobuf_EnumDescriptorProto_set_options(msg, sub); } return sub; @@ -7260,7 +7257,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); + struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -7293,7 +7290,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_pro /* google.protobuf.EnumDescriptorProto.EnumReservedRange */ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); @@ -7368,7 +7365,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go /* google.protobuf.EnumValueDescriptorProto */ UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumValueDescriptorProto*)upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); + return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); @@ -7461,7 +7458,7 @@ UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_prot UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumValueOptions*)upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); + sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); if (sub) google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); } return sub; @@ -7470,7 +7467,7 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes /* google.protobuf.ServiceDescriptorProto */ UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_ServiceDescriptorProto*)upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); + return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); @@ -7595,7 +7592,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); + struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -7607,7 +7604,7 @@ UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protob UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ServiceOptions*)upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); + sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); if (sub) google_protobuf_ServiceDescriptorProto_set_options(msg, sub); } return sub; @@ -7616,7 +7613,7 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip /* google.protobuf.MethodDescriptorProto */ UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_MethodDescriptorProto*)upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); + return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); @@ -7758,7 +7755,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobu UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MethodOptions*)upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); + sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); if (sub) google_protobuf_MethodDescriptorProto_set_options(msg, sub); } return sub; @@ -7775,7 +7772,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl /* google.protobuf.FileOptions */ UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) { - return (google_protobuf_FileOptions*)upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); + return (google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); } UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); @@ -8247,7 +8244,7 @@ UPB_INLINE void google_protobuf_FileOptions_set_features(google_protobuf_FileOpt UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FileOptions_mutable_features(google_protobuf_FileOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FileOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FileOptions_set_features(msg, sub); } return sub; @@ -8273,7 +8270,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8282,7 +8279,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio /* google.protobuf.MessageOptions */ UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) { - return (google_protobuf_MessageOptions*)upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); + return (google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); } UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); @@ -8469,7 +8466,7 @@ UPB_INLINE void google_protobuf_MessageOptions_set_features(google_protobuf_Mess UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MessageOptions_mutable_features(google_protobuf_MessageOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MessageOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_MessageOptions_set_features(msg, sub); } return sub; @@ -8495,7 +8492,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8504,7 +8501,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp /* google.protobuf.FieldOptions */ UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions*)upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); + return (google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); } UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); @@ -8879,7 +8876,7 @@ UPB_INLINE struct google_protobuf_FieldOptions_EditionDefault* google_protobuf_F if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); + struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8891,7 +8888,7 @@ UPB_INLINE void google_protobuf_FieldOptions_set_features(google_protobuf_FieldO UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FieldOptions_mutable_features(google_protobuf_FieldOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FieldOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FieldOptions_set_features(msg, sub); } return sub; @@ -8917,7 +8914,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -8926,7 +8923,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti /* google.protobuf.FieldOptions.EditionDefault */ UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions_EditionDefault*)upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); + return (google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); } UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldOptions_EditionDefault* ret = google_protobuf_FieldOptions_EditionDefault_new(arena); @@ -9001,7 +8998,7 @@ UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_set_edition(google_p /* google.protobuf.OneofOptions */ UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) { - return (google_protobuf_OneofOptions*)upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); + return (google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); } UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); @@ -9093,7 +9090,7 @@ UPB_INLINE void google_protobuf_OneofOptions_set_features(google_protobuf_OneofO UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_OneofOptions_mutable_features(google_protobuf_OneofOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_OneofOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_OneofOptions_set_features(msg, sub); } return sub; @@ -9119,7 +9116,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9128,7 +9125,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti /* google.protobuf.EnumOptions */ UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumOptions*)upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); + return (google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); } UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); @@ -9277,7 +9274,7 @@ UPB_INLINE void google_protobuf_EnumOptions_set_features(google_protobuf_EnumOpt UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumOptions_mutable_features(google_protobuf_EnumOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_EnumOptions_set_features(msg, sub); } return sub; @@ -9303,7 +9300,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9312,7 +9309,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio /* google.protobuf.EnumValueOptions */ UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumValueOptions*)upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); + return (google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); } UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); @@ -9438,7 +9435,7 @@ UPB_INLINE void google_protobuf_EnumValueOptions_set_features(google_protobuf_En UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumValueOptions_mutable_features(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumValueOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_EnumValueOptions_set_features(msg, sub); } return sub; @@ -9468,7 +9465,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9477,7 +9474,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue /* google.protobuf.ServiceOptions */ UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) { - return (google_protobuf_ServiceOptions*)upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); + return (google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); } UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); @@ -9588,7 +9585,7 @@ UPB_INLINE void google_protobuf_ServiceOptions_set_features(google_protobuf_Serv UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ServiceOptions_mutable_features(google_protobuf_ServiceOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ServiceOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_ServiceOptions_set_features(msg, sub); } return sub; @@ -9614,7 +9611,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9623,7 +9620,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp /* google.protobuf.MethodOptions */ UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) { - return (google_protobuf_MethodOptions*)upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); + return (google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); } UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); @@ -9753,7 +9750,7 @@ UPB_INLINE void google_protobuf_MethodOptions_set_features(google_protobuf_Metho UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MethodOptions_mutable_features(google_protobuf_MethodOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MethodOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_MethodOptions_set_features(msg, sub); } return sub; @@ -9779,7 +9776,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -9788,7 +9785,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt /* google.protobuf.UninterpretedOption */ UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + return (google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); } UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); @@ -9969,7 +9966,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); + struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -10002,7 +9999,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_p /* google.protobuf.UninterpretedOption.NamePart */ UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption_NamePart*)upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); + return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); @@ -10077,7 +10074,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go /* google.protobuf.FeatureSet */ UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_new(upb_Arena* arena) { - return (google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + return (google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSet* ret = google_protobuf_FeatureSet_new(arena); @@ -10228,7 +10225,7 @@ UPB_INLINE void google_protobuf_FeatureSet_set_json_format(google_protobuf_Featu /* google.protobuf.FeatureSetDefaults */ UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults*)upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); + return (google_protobuf_FeatureSetDefaults*)_upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSetDefaults* ret = google_protobuf_FeatureSetDefaults_new(arena); @@ -10349,7 +10346,7 @@ UPB_INLINE struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* g if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); + struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -10366,7 +10363,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_set_maximum_edition(google_pr /* google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault */ UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); + return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* ret = google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(arena); @@ -10436,7 +10433,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_ UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_mutable_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_features(msg, sub); } return sub; @@ -10449,7 +10446,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_ /* google.protobuf.SourceCodeInfo */ UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo*)upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); + return (google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); } UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); @@ -10540,7 +10537,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); + struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -10549,7 +10546,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc /* google.protobuf.SourceCodeInfo.Location */ UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo_Location*)upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); + return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); } UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); @@ -10807,7 +10804,7 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_com /* google.protobuf.GeneratedCodeInfo */ UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo*)upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); + return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); @@ -10898,7 +10895,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); + struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -10907,7 +10904,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ /* google.protobuf.GeneratedCodeInfo.Annotation */ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation*)upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); @@ -13350,8 +13347,8 @@ UPB_INLINE const char* _upb_Decoder_BufferFlipCallback( if (!old_end) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); if (d->unknown) { - if (!upb_Message_AddUnknown(d->unknown_msg, d->unknown, - old_end - d->unknown, &d->arena)) { + if (!_upb_Message_AddUnknown(d->unknown_msg, d->unknown, + old_end - d->unknown, &d->arena)) { _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } d->unknown = new_start; diff --git a/upb/cmake/google/protobuf/descriptor.upb.h b/upb/cmake/google/protobuf/descriptor.upb.h index 173e661ae49f..ecbab6561aeb 100644 --- a/upb/cmake/google/protobuf/descriptor.upb.h +++ b/upb/cmake/google/protobuf/descriptor.upb.h @@ -188,7 +188,7 @@ typedef enum { /* google.protobuf.FileDescriptorSet */ UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorSet*)upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); + return (google_protobuf_FileDescriptorSet*)_upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); } UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); @@ -279,7 +279,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); + struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -288,7 +288,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr /* google.protobuf.FileDescriptorProto */ UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorProto*)upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); + return (google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); @@ -723,7 +723,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescripto if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -749,7 +749,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescr if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -775,7 +775,7 @@ UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDe if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); + struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -801,7 +801,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -813,7 +813,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FileOptions*)upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); + sub = (struct google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); if (sub) google_protobuf_FileDescriptorProto_set_options(msg, sub); } return sub; @@ -825,7 +825,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_ UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { - sub = (struct google_protobuf_SourceCodeInfo*)upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); + sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); if (sub) google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); } return sub; @@ -890,7 +890,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_ /* google.protobuf.DescriptorProto */ UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + return (google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); @@ -1274,7 +1274,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1300,7 +1300,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorPro if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1326,7 +1326,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_Descripto if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1352,7 +1352,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobu if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); + struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1378,7 +1378,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1390,7 +1390,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_Desc UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MessageOptions*)upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); + sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); if (sub) google_protobuf_DescriptorProto_set_options(msg, sub); } return sub; @@ -1416,7 +1416,7 @@ UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_Descript if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); + struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1442,7 +1442,7 @@ UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); + struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1475,7 +1475,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobu /* google.protobuf.DescriptorProto.ExtensionRange */ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ExtensionRange*)upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); + return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); @@ -1568,7 +1568,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(googl UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ExtensionRangeOptions*)upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); + sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); if (sub) google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); } return sub; @@ -1577,7 +1577,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip /* google.protobuf.DescriptorProto.ReservedRange */ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ReservedRange*)upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); + return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); @@ -1652,7 +1652,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro /* google.protobuf.ExtensionRangeOptions */ UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions*)upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); + return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); @@ -1810,7 +1810,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions_Declaration* google_prot if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); + struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1826,7 +1826,7 @@ UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_features(google_protob UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ExtensionRangeOptions_mutable_features(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ExtensionRangeOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_ExtensionRangeOptions_set_features(msg, sub); } return sub; @@ -1852,7 +1852,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -1861,7 +1861,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension /* google.protobuf.ExtensionRangeOptions.Declaration */ UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions_Declaration*)upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); + return (google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ExtensionRangeOptions_Declaration* ret = google_protobuf_ExtensionRangeOptions_Declaration_new(arena); @@ -1993,7 +1993,7 @@ UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_repeated(g /* google.protobuf.FieldDescriptorProto */ UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto*)upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); + return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); @@ -2226,7 +2226,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions*)upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); + sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); if (sub) google_protobuf_FieldDescriptorProto_set_options(msg, sub); } return sub; @@ -2247,7 +2247,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_ /* google.protobuf.OneofDescriptorProto */ UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_OneofDescriptorProto*)upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); + return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); @@ -2321,7 +2321,7 @@ UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_OneofOptions*)upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); + sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); if (sub) google_protobuf_OneofDescriptorProto_set_options(msg, sub); } return sub; @@ -2330,7 +2330,7 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP /* google.protobuf.EnumDescriptorProto */ UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto*)upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); + return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); @@ -2529,7 +2529,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); + struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -2541,7 +2541,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumOptions*)upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); + sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); if (sub) google_protobuf_EnumDescriptorProto_set_options(msg, sub); } return sub; @@ -2567,7 +2567,7 @@ UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); + struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -2600,7 +2600,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_pro /* google.protobuf.EnumDescriptorProto.EnumReservedRange */ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); @@ -2675,7 +2675,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go /* google.protobuf.EnumValueDescriptorProto */ UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumValueDescriptorProto*)upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); + return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); @@ -2768,7 +2768,7 @@ UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_prot UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumValueOptions*)upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); + sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); if (sub) google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); } return sub; @@ -2777,7 +2777,7 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes /* google.protobuf.ServiceDescriptorProto */ UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_ServiceDescriptorProto*)upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); + return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); @@ -2902,7 +2902,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); + struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -2914,7 +2914,7 @@ UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protob UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ServiceOptions*)upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); + sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); if (sub) google_protobuf_ServiceDescriptorProto_set_options(msg, sub); } return sub; @@ -2923,7 +2923,7 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip /* google.protobuf.MethodDescriptorProto */ UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_MethodDescriptorProto*)upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); + return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); } UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); @@ -3065,7 +3065,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobu UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MethodOptions*)upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); + sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); if (sub) google_protobuf_MethodDescriptorProto_set_options(msg, sub); } return sub; @@ -3082,7 +3082,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl /* google.protobuf.FileOptions */ UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) { - return (google_protobuf_FileOptions*)upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); + return (google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); } UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); @@ -3554,7 +3554,7 @@ UPB_INLINE void google_protobuf_FileOptions_set_features(google_protobuf_FileOpt UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FileOptions_mutable_features(google_protobuf_FileOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FileOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FileOptions_set_features(msg, sub); } return sub; @@ -3580,7 +3580,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -3589,7 +3589,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio /* google.protobuf.MessageOptions */ UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) { - return (google_protobuf_MessageOptions*)upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); + return (google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); } UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); @@ -3776,7 +3776,7 @@ UPB_INLINE void google_protobuf_MessageOptions_set_features(google_protobuf_Mess UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MessageOptions_mutable_features(google_protobuf_MessageOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MessageOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_MessageOptions_set_features(msg, sub); } return sub; @@ -3802,7 +3802,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -3811,7 +3811,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp /* google.protobuf.FieldOptions */ UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions*)upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); + return (google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); } UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); @@ -4186,7 +4186,7 @@ UPB_INLINE struct google_protobuf_FieldOptions_EditionDefault* google_protobuf_F if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); + struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4198,7 +4198,7 @@ UPB_INLINE void google_protobuf_FieldOptions_set_features(google_protobuf_FieldO UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FieldOptions_mutable_features(google_protobuf_FieldOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FieldOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FieldOptions_set_features(msg, sub); } return sub; @@ -4224,7 +4224,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4233,7 +4233,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti /* google.protobuf.FieldOptions.EditionDefault */ UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions_EditionDefault*)upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); + return (google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); } UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FieldOptions_EditionDefault* ret = google_protobuf_FieldOptions_EditionDefault_new(arena); @@ -4308,7 +4308,7 @@ UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_set_edition(google_p /* google.protobuf.OneofOptions */ UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) { - return (google_protobuf_OneofOptions*)upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); + return (google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); } UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); @@ -4400,7 +4400,7 @@ UPB_INLINE void google_protobuf_OneofOptions_set_features(google_protobuf_OneofO UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_OneofOptions_mutable_features(google_protobuf_OneofOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_OneofOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_OneofOptions_set_features(msg, sub); } return sub; @@ -4426,7 +4426,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4435,7 +4435,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti /* google.protobuf.EnumOptions */ UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumOptions*)upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); + return (google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); } UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); @@ -4584,7 +4584,7 @@ UPB_INLINE void google_protobuf_EnumOptions_set_features(google_protobuf_EnumOpt UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumOptions_mutable_features(google_protobuf_EnumOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_EnumOptions_set_features(msg, sub); } return sub; @@ -4610,7 +4610,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4619,7 +4619,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio /* google.protobuf.EnumValueOptions */ UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumValueOptions*)upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); + return (google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); } UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); @@ -4745,7 +4745,7 @@ UPB_INLINE void google_protobuf_EnumValueOptions_set_features(google_protobuf_En UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumValueOptions_mutable_features(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumValueOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_EnumValueOptions_set_features(msg, sub); } return sub; @@ -4775,7 +4775,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4784,7 +4784,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue /* google.protobuf.ServiceOptions */ UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) { - return (google_protobuf_ServiceOptions*)upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); + return (google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); } UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); @@ -4895,7 +4895,7 @@ UPB_INLINE void google_protobuf_ServiceOptions_set_features(google_protobuf_Serv UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ServiceOptions_mutable_features(google_protobuf_ServiceOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ServiceOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_ServiceOptions_set_features(msg, sub); } return sub; @@ -4921,7 +4921,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -4930,7 +4930,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp /* google.protobuf.MethodOptions */ UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) { - return (google_protobuf_MethodOptions*)upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); + return (google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); } UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); @@ -5060,7 +5060,7 @@ UPB_INLINE void google_protobuf_MethodOptions_set_features(google_protobuf_Metho UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MethodOptions_mutable_features(google_protobuf_MethodOptions* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MethodOptions_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_MethodOptions_set_features(msg, sub); } return sub; @@ -5086,7 +5086,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5095,7 +5095,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt /* google.protobuf.UninterpretedOption */ UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption*)upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); + return (google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); } UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); @@ -5276,7 +5276,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); + struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5309,7 +5309,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_p /* google.protobuf.UninterpretedOption.NamePart */ UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption_NamePart*)upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); + return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); @@ -5384,7 +5384,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go /* google.protobuf.FeatureSet */ UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_new(upb_Arena* arena) { - return (google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + return (google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSet* ret = google_protobuf_FeatureSet_new(arena); @@ -5535,7 +5535,7 @@ UPB_INLINE void google_protobuf_FeatureSet_set_json_format(google_protobuf_Featu /* google.protobuf.FeatureSetDefaults */ UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults*)upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); + return (google_protobuf_FeatureSetDefaults*)_upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSetDefaults* ret = google_protobuf_FeatureSetDefaults_new(arena); @@ -5656,7 +5656,7 @@ UPB_INLINE struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* g if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); + struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5673,7 +5673,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_set_maximum_edition(google_pr /* google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault */ UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); + return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); } UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* ret = google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(arena); @@ -5743,7 +5743,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_ UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_mutable_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, upb_Arena* arena) { struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_features(msg); if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); + sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); if (sub) google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_features(msg, sub); } return sub; @@ -5756,7 +5756,7 @@ UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_ /* google.protobuf.SourceCodeInfo */ UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo*)upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); + return (google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); } UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); @@ -5847,7 +5847,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); + struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -5856,7 +5856,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc /* google.protobuf.SourceCodeInfo.Location */ UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo_Location*)upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); + return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); } UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); @@ -6114,7 +6114,7 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_com /* google.protobuf.GeneratedCodeInfo */ UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo*)upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); + return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); @@ -6205,7 +6205,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) { return NULL; } - struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); + struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set)(arr, arr->size - 1, &sub, sizeof(sub)); return sub; @@ -6214,7 +6214,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ /* google.protobuf.GeneratedCodeInfo.Annotation */ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation*)upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) { google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);