From fe6a601598282bf2144a3eac84aa40578b1758cd Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Thu, 18 Jan 2024 00:05:28 +0000 Subject: [PATCH] Auto-generate files after cl/599313198 --- php/ext/google/protobuf/php-upb.c | 12 ++++++------ php/ext/google/protobuf/php-upb.h | 12 ++++++------ ruby/ext/google/protobuf_c/ruby-upb.c | 12 ++++++------ ruby/ext/google/protobuf_c/ruby-upb.h | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index d4416b2b1c..82f5d4a95b 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c @@ -7855,7 +7855,7 @@ static void upb_Decoder_AddKnownMessageSetItem( _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } upb_Message* submsg = _upb_Decoder_NewSubMessage( - d, &ext->ext->UPB_PRIVATE(sub), upb_MiniTableExtension_AsField(ext->ext), + d, &ext->ext->UPB_PRIVATE(sub), &ext->ext->UPB_PRIVATE(field), (upb_TaggedMessagePtr*)&ext->data); upb_DecodeStatus status = upb_Decode( data, size, submsg, upb_MiniTableExtension_GetSubMessage(item_mt), @@ -7965,13 +7965,13 @@ static const upb_MiniTableField* _upb_Decoder_FindField(upb_Decoder* d, size_t idx = ((size_t)field_number) - 1; // 0 wraps to SIZE_MAX if (idx < t->UPB_PRIVATE(dense_below)) { - /* Fastest case: index into dense fields. */ + // Fastest case: index into dense fields. goto found; } if (t->UPB_PRIVATE(dense_below) < t->UPB_PRIVATE(field_count)) { - /* Linear search non-dense fields. Resume scanning from last_field_index - * since fields are usually in order. */ + // Linear search non-dense fields. Resume scanning from last_field_index + // since fields are usually in order. size_t last = *last_field_index; for (idx = last; idx < t->UPB_PRIVATE(field_count); idx++) { if (t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number) == field_number) { @@ -7991,7 +7991,7 @@ static const upb_MiniTableField* _upb_Decoder_FindField(upb_Decoder* d, case kUpb_ExtMode_Extendable: { const upb_MiniTableExtension* ext = upb_ExtensionRegistry_Lookup(d->extreg, t, field_number); - if (ext) return upb_MiniTableExtension_AsField(ext); + if (ext) return &ext->UPB_PRIVATE(field); break; } case kUpb_ExtMode_IsMessageSet: @@ -8004,7 +8004,7 @@ static const upb_MiniTableField* _upb_Decoder_FindField(upb_Decoder* d, } } - return &none; /* Unknown field. */ + return &none; // Unknown field. found: UPB_ASSERT(t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number) == field_number); diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index eb9dfea822..267919ed01 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -1911,9 +1911,9 @@ struct upb_MiniTableExtension { 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 upb_CType UPB_PRIVATE(_upb_MiniTableExtension_CType)( + const struct upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableField_CType)(&e->UPB_PRIVATE(field)); } UPB_INLINE uint32_t UPB_PRIVATE(_upb_MiniTableExtension_Number)( @@ -1947,9 +1947,9 @@ typedef struct upb_MiniTableExtension upb_MiniTableExtension; extern "C" { #endif -UPB_API_INLINE const upb_MiniTableField* upb_MiniTableExtension_AsField( - const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_AsField)(e); +UPB_API_INLINE upb_CType +upb_MiniTableExtension_CType(const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_CType)(e); } UPB_API_INLINE uint32_t diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index c8c7dd49bd..ac276c516c 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c @@ -7370,7 +7370,7 @@ static void upb_Decoder_AddKnownMessageSetItem( _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); } upb_Message* submsg = _upb_Decoder_NewSubMessage( - d, &ext->ext->UPB_PRIVATE(sub), upb_MiniTableExtension_AsField(ext->ext), + d, &ext->ext->UPB_PRIVATE(sub), &ext->ext->UPB_PRIVATE(field), (upb_TaggedMessagePtr*)&ext->data); upb_DecodeStatus status = upb_Decode( data, size, submsg, upb_MiniTableExtension_GetSubMessage(item_mt), @@ -7480,13 +7480,13 @@ static const upb_MiniTableField* _upb_Decoder_FindField(upb_Decoder* d, size_t idx = ((size_t)field_number) - 1; // 0 wraps to SIZE_MAX if (idx < t->UPB_PRIVATE(dense_below)) { - /* Fastest case: index into dense fields. */ + // Fastest case: index into dense fields. goto found; } if (t->UPB_PRIVATE(dense_below) < t->UPB_PRIVATE(field_count)) { - /* Linear search non-dense fields. Resume scanning from last_field_index - * since fields are usually in order. */ + // Linear search non-dense fields. Resume scanning from last_field_index + // since fields are usually in order. size_t last = *last_field_index; for (idx = last; idx < t->UPB_PRIVATE(field_count); idx++) { if (t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number) == field_number) { @@ -7506,7 +7506,7 @@ static const upb_MiniTableField* _upb_Decoder_FindField(upb_Decoder* d, case kUpb_ExtMode_Extendable: { const upb_MiniTableExtension* ext = upb_ExtensionRegistry_Lookup(d->extreg, t, field_number); - if (ext) return upb_MiniTableExtension_AsField(ext); + if (ext) return &ext->UPB_PRIVATE(field); break; } case kUpb_ExtMode_IsMessageSet: @@ -7519,7 +7519,7 @@ static const upb_MiniTableField* _upb_Decoder_FindField(upb_Decoder* d, } } - return &none; /* Unknown field. */ + return &none; // Unknown field. found: UPB_ASSERT(t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number) == field_number); diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 57ae55e492..dda8b34484 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -1913,9 +1913,9 @@ struct upb_MiniTableExtension { 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 upb_CType UPB_PRIVATE(_upb_MiniTableExtension_CType)( + const struct upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableField_CType)(&e->UPB_PRIVATE(field)); } UPB_INLINE uint32_t UPB_PRIVATE(_upb_MiniTableExtension_Number)( @@ -1949,9 +1949,9 @@ typedef struct upb_MiniTableExtension upb_MiniTableExtension; extern "C" { #endif -UPB_API_INLINE const upb_MiniTableField* upb_MiniTableExtension_AsField( - const upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableExtension_AsField)(e); +UPB_API_INLINE upb_CType +upb_MiniTableExtension_CType(const upb_MiniTableExtension* e) { + return UPB_PRIVATE(_upb_MiniTableExtension_CType)(e); } UPB_API_INLINE uint32_t