From bc80135f10ca2ad6f307d4a2165cdaa112d68555 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 10 May 2024 00:30:13 +0000 Subject: [PATCH] Auto-generate files after cl/632314763 --- php/ext/google/protobuf/php-upb.c | 6 +++--- ruby/ext/google/protobuf_c/ruby-upb.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index d9d7d4147220..03a329887800 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c @@ -7305,12 +7305,12 @@ bool upb_MiniTable_SetSubMessage(upb_MiniTable* table, return false; } - upb_MiniTableSub* table_sub = - (void*)&table->UPB_PRIVATE(subs)[field->UPB_PRIVATE(submsg_index)]; + int idx = field->UPB_PRIVATE(submsg_index); + upb_MiniTableSub* table_subs = (void*)table->UPB_PRIVATE(subs); // TODO: Add this assert back once YouTube is updated to not call // this function repeatedly. // UPB_ASSERT(UPB_PRIVATE(_upb_MiniTable_IsEmpty)(table_sub->submsg)); - *table_sub = upb_MiniTableSub_FromMessage(sub); + table_subs[idx] = upb_MiniTableSub_FromMessage(sub); return true; } diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index faa638b8a780..c4cfa69ca9d7 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c @@ -6797,12 +6797,12 @@ bool upb_MiniTable_SetSubMessage(upb_MiniTable* table, return false; } - upb_MiniTableSub* table_sub = - (void*)&table->UPB_PRIVATE(subs)[field->UPB_PRIVATE(submsg_index)]; + int idx = field->UPB_PRIVATE(submsg_index); + upb_MiniTableSub* table_subs = (void*)table->UPB_PRIVATE(subs); // TODO: Add this assert back once YouTube is updated to not call // this function repeatedly. // UPB_ASSERT(UPB_PRIVATE(_upb_MiniTable_IsEmpty)(table_sub->submsg)); - *table_sub = upb_MiniTableSub_FromMessage(sub); + table_subs[idx] = upb_MiniTableSub_FromMessage(sub); return true; }