From afd94185f7fed16062ec699de37887fec5c8b1ca Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 9 Jan 2024 21:11:01 +0000 Subject: [PATCH] Auto-generate files after cl/597019522 --- php/ext/google/protobuf/php-upb.h | 9 +++++---- ruby/ext/google/protobuf_c/ruby-upb.h | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index dda30b595c..6e43b83c50 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -2698,6 +2698,7 @@ UPB_INLINE struct upb_Map* _upb_Message_GetOrCreateMutableMap( #ifndef UPB_MESSAGE_INTERNAL_ARRAY_H_ #define UPB_MESSAGE_INTERNAL_ARRAY_H_ +#include #include @@ -2721,7 +2722,7 @@ struct upb_Array { // 3 maps to elem size 16 // // Bit #2 contains the frozen/immutable flag (currently unimplemented). - uintptr_t data; + uintptr_t UPB_ONLYBITS(data); size_t UPB_ONLYBITS(size); // The number of elements in the array. size_t UPB_PRIVATE(capacity); // Allocated storage. Measured in elements. @@ -2732,19 +2733,19 @@ UPB_INLINE void UPB_PRIVATE(_upb_Array_SetTaggedPtr)(struct upb_Array* array, UPB_ASSERT(lg2 != 1); UPB_ASSERT(lg2 <= 4); const size_t bits = lg2 - (lg2 != 0); - array->data = (uintptr_t)data | bits; + array->UPB_ONLYBITS(data) = (uintptr_t)data | bits; } UPB_INLINE size_t UPB_PRIVATE(_upb_Array_ElemSizeLg2)(const struct upb_Array* array) { - const size_t bits = array->data & _UPB_ARRAY_MASK_LG2; + const size_t bits = array->UPB_ONLYBITS(data) & _UPB_ARRAY_MASK_LG2; const size_t lg2 = bits + (bits != 0); return lg2; } UPB_INLINE const void* _upb_array_constptr(const struct upb_Array* array) { UPB_PRIVATE(_upb_Array_ElemSizeLg2)(array); // Check assertions. - return (void*)(array->data & ~(uintptr_t)_UPB_ARRAY_MASK_ALL); + return (void*)(array->UPB_ONLYBITS(data) & ~(uintptr_t)_UPB_ARRAY_MASK_ALL); } UPB_INLINE void* _upb_array_ptr(struct upb_Array* array) { diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 8ec4602f77..8873252159 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -2700,6 +2700,7 @@ UPB_INLINE struct upb_Map* _upb_Message_GetOrCreateMutableMap( #ifndef UPB_MESSAGE_INTERNAL_ARRAY_H_ #define UPB_MESSAGE_INTERNAL_ARRAY_H_ +#include #include @@ -2723,7 +2724,7 @@ struct upb_Array { // 3 maps to elem size 16 // // Bit #2 contains the frozen/immutable flag (currently unimplemented). - uintptr_t data; + uintptr_t UPB_ONLYBITS(data); size_t UPB_ONLYBITS(size); // The number of elements in the array. size_t UPB_PRIVATE(capacity); // Allocated storage. Measured in elements. @@ -2734,19 +2735,19 @@ UPB_INLINE void UPB_PRIVATE(_upb_Array_SetTaggedPtr)(struct upb_Array* array, UPB_ASSERT(lg2 != 1); UPB_ASSERT(lg2 <= 4); const size_t bits = lg2 - (lg2 != 0); - array->data = (uintptr_t)data | bits; + array->UPB_ONLYBITS(data) = (uintptr_t)data | bits; } UPB_INLINE size_t UPB_PRIVATE(_upb_Array_ElemSizeLg2)(const struct upb_Array* array) { - const size_t bits = array->data & _UPB_ARRAY_MASK_LG2; + const size_t bits = array->UPB_ONLYBITS(data) & _UPB_ARRAY_MASK_LG2; const size_t lg2 = bits + (bits != 0); return lg2; } UPB_INLINE const void* _upb_array_constptr(const struct upb_Array* array) { UPB_PRIVATE(_upb_Array_ElemSizeLg2)(array); // Check assertions. - return (void*)(array->data & ~(uintptr_t)_UPB_ARRAY_MASK_ALL); + return (void*)(array->UPB_ONLYBITS(data) & ~(uintptr_t)_UPB_ARRAY_MASK_ALL); } UPB_INLINE void* _upb_array_ptr(struct upb_Array* array) {