From c12c96e1942d4b32bb2ef42a7fd010c45acca4fd Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 16 Jan 2024 07:41:08 +0000 Subject: [PATCH] Auto-generate files after cl/598741329 --- php/ext/google/protobuf/php-upb.h | 39 +++++++++++++-------------- ruby/ext/google/protobuf_c/ruby-upb.h | 39 +++++++++++++-------------- 2 files changed, 36 insertions(+), 42 deletions(-) diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index aee5889424..eb9dfea822 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -1113,22 +1113,6 @@ UPB_INLINE uint64_t upb_BigEndian64(uint64_t val) { #include -#ifndef UPB_MINI_TABLE_INTERNAL_TYPES_H_ -#define UPB_MINI_TABLE_INTERNAL_TYPES_H_ - -// This definition exists here (instead of in upb/message/) as an optimization -// so that minitable code can cleanly know the size of a upb_Message - which is -// also the minimum size of a minitable. - -struct upb_Message { - union { - struct upb_Message_Internal* internal; - double d; // Forces same size for 32-bit/64-bit builds - }; -}; - -#endif /* UPB_MINI_TABLE_INTERNAL_TYPES_H_ */ - #ifndef UPB_MINI_TABLE_MESSAGE_H_ #define UPB_MINI_TABLE_MESSAGE_H_ @@ -1617,6 +1601,7 @@ UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTableSub_Message)( // Must be last. struct upb_Decoder; +struct upb_Message; typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, struct upb_Message* msg, intptr_t table, uint64_t hasbits, uint64_t data); @@ -1867,8 +1852,8 @@ typedef struct upb_Message_Internal { * extensions data: data[(ext_begin - overhead) .. (size - overhead)] */ uint32_t unknown_end; uint32_t ext_begin; - /* Data follows, as if there were an array: - * char data[size - sizeof(upb_Message_Internal)]; */ + // Data follows, as if there were an array: + // char data[size - sizeof(upb_Message_Internal)]; } upb_Message_Internal; // Inline version upb_Message_New(), for internal use. @@ -2528,6 +2513,18 @@ UPB_INLINE struct upb_Message* UPB_PRIVATE( #endif /* UPB_MINI_TABLE_INTERNAL_TAGGED_PTR_H_ */ +#ifndef UPB_MESSAGE_INTERNAL_TYPES_H_ +#define UPB_MESSAGE_INTERNAL_TYPES_H_ + +struct upb_Message { + union { + struct upb_Message_Internal* internal; + double d; // Forces same size for 32-bit/64-bit builds + }; +}; + +#endif /* UPB_MESSAGE_INTERNAL_TYPES_H_ */ + // Must be last. #if defined(__GNUC__) && !defined(__clang__) @@ -12541,8 +12538,8 @@ const upb_Extension* upb_Message_FindExtensionByNumber(const upb_Message* msg, #include -#ifndef UPB_MINI_TABLE_INTERNAL_MAP_ENTRY_H_ -#define UPB_MINI_TABLE_INTERNAL_MAP_ENTRY_H_ +#ifndef UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ +#define UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ #include @@ -12571,7 +12568,7 @@ typedef struct { } v; } upb_MapEntry; -#endif // UPB_MINI_TABLE_INTERNAL_MAP_ENTRY_H_ +#endif // UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ // Must be last. diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 398ae0a155..57ae55e492 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -1115,22 +1115,6 @@ UPB_INLINE uint64_t upb_BigEndian64(uint64_t val) { #include -#ifndef UPB_MINI_TABLE_INTERNAL_TYPES_H_ -#define UPB_MINI_TABLE_INTERNAL_TYPES_H_ - -// This definition exists here (instead of in upb/message/) as an optimization -// so that minitable code can cleanly know the size of a upb_Message - which is -// also the minimum size of a minitable. - -struct upb_Message { - union { - struct upb_Message_Internal* internal; - double d; // Forces same size for 32-bit/64-bit builds - }; -}; - -#endif /* UPB_MINI_TABLE_INTERNAL_TYPES_H_ */ - #ifndef UPB_MINI_TABLE_MESSAGE_H_ #define UPB_MINI_TABLE_MESSAGE_H_ @@ -1619,6 +1603,7 @@ UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTableSub_Message)( // Must be last. struct upb_Decoder; +struct upb_Message; typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, struct upb_Message* msg, intptr_t table, uint64_t hasbits, uint64_t data); @@ -1869,8 +1854,8 @@ typedef struct upb_Message_Internal { * extensions data: data[(ext_begin - overhead) .. (size - overhead)] */ uint32_t unknown_end; uint32_t ext_begin; - /* Data follows, as if there were an array: - * char data[size - sizeof(upb_Message_Internal)]; */ + // Data follows, as if there were an array: + // char data[size - sizeof(upb_Message_Internal)]; } upb_Message_Internal; // Inline version upb_Message_New(), for internal use. @@ -2530,6 +2515,18 @@ UPB_INLINE struct upb_Message* UPB_PRIVATE( #endif /* UPB_MINI_TABLE_INTERNAL_TAGGED_PTR_H_ */ +#ifndef UPB_MESSAGE_INTERNAL_TYPES_H_ +#define UPB_MESSAGE_INTERNAL_TYPES_H_ + +struct upb_Message { + union { + struct upb_Message_Internal* internal; + double d; // Forces same size for 32-bit/64-bit builds + }; +}; + +#endif /* UPB_MESSAGE_INTERNAL_TYPES_H_ */ + // Must be last. #if defined(__GNUC__) && !defined(__clang__) @@ -12313,8 +12310,8 @@ const upb_Extension* upb_Message_FindExtensionByNumber(const upb_Message* msg, #include -#ifndef UPB_MINI_TABLE_INTERNAL_MAP_ENTRY_H_ -#define UPB_MINI_TABLE_INTERNAL_MAP_ENTRY_H_ +#ifndef UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ +#define UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ #include @@ -12343,7 +12340,7 @@ typedef struct { } v; } upb_MapEntry; -#endif // UPB_MINI_TABLE_INTERNAL_MAP_ENTRY_H_ +#endif // UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ // Must be last.