Skip to content

Commit

Permalink
Auto-generate files after cl/592392732
Browse files Browse the repository at this point in the history
  • Loading branch information
protobuf-team-bot committed Dec 20, 2023
1 parent de7f589 commit 1db9465
Show file tree
Hide file tree
Showing 4 changed files with 580 additions and 568 deletions.
45 changes: 23 additions & 22 deletions php/ext/google/protobuf/php-upb.c
Original file line number Diff line number Diff line change
Expand Up @@ -6196,9 +6196,9 @@ static upb_Map* upb_Message_Map_DeepClone(const upb_Map* map,

upb_Array* upb_Array_DeepClone(const upb_Array* array, upb_CType value_type,
const upb_MiniTable* sub, upb_Arena* arena) {
size_t size = array->UPB_PRIVATE(size);
upb_Array* cloned_array =
UPB_PRIVATE(_upb_Array_New)(arena, size, upb_CType_SizeLg2(value_type));
const size_t size = array->UPB_PRIVATE(size);
const int lg2 = UPB_PRIVATE(_upb_CType_SizeLg2)(value_type);
upb_Array* cloned_array = UPB_PRIVATE(_upb_Array_New)(arena, size, lg2);
if (!cloned_array) {
return NULL;
}
Expand Down Expand Up @@ -6386,7 +6386,8 @@ upb_Message* upb_Message_ShallowClone(const upb_Message* msg,
// Must be last.

upb_Array* upb_Array_New(upb_Arena* a, upb_CType type) {
return UPB_PRIVATE(_upb_Array_New)(a, 4, upb_CType_SizeLg2(type));
const int lg2 = UPB_PRIVATE(_upb_CType_SizeLg2)(type);
return UPB_PRIVATE(_upb_Array_New)(a, 4, lg2);
}

const void* upb_Array_DataPtr(const upb_Array* arr) {
Expand Down Expand Up @@ -8415,6 +8416,23 @@ const upb_MiniTableExtension* upb_ExtensionRegistry_Lookup(
}


#include <stddef.h>

// Must be last.

// A MiniTable for an empty message, used for unlinked sub-messages.
const upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty) = {
.UPB_PRIVATE(subs) = NULL,
.UPB_PRIVATE(fields) = NULL,
.UPB_PRIVATE(size) = 0,
.UPB_PRIVATE(field_count) = 0,
.UPB_PRIVATE(ext) = kUpb_ExtMode_NonExtendable,
.UPB_PRIVATE(dense_below) = 0,
.UPB_PRIVATE(table_mask) = -1,
.UPB_PRIVATE(required_count) = 0,
};


#include <inttypes.h>
#include <stddef.h>
#include <stdint.h>
Expand Down Expand Up @@ -8482,23 +8500,6 @@ bool upb_MiniTable_NextOneofField(const upb_MiniTable* m,
}


#include <stddef.h>

// Must be last.

// A MiniTable for an empty message, used for unlinked sub-messages.
const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty) = {
.UPB_PRIVATE(subs) = NULL,
.UPB_PRIVATE(fields) = NULL,
.UPB_PRIVATE(size) = 0,
.UPB_PRIVATE(field_count) = 0,
.UPB_PRIVATE(ext) = kUpb_ExtMode_NonExtendable,
.UPB_PRIVATE(dense_below) = 0,
.UPB_PRIVATE(table_mask) = -1,
.UPB_PRIVATE(required_count) = 0,
};



// Must be last.

Expand Down Expand Up @@ -13258,7 +13259,7 @@ static const char* _upb_Decoder_DecodeEnumPacked(
upb_Array* _upb_Decoder_CreateArray(upb_Decoder* d,
const upb_MiniTableField* field) {
const upb_FieldType field_type = field->UPB_PRIVATE(descriptortype);
const size_t lg2 = upb_FieldType_SizeLg2(field_type);
const size_t lg2 = UPB_PRIVATE(_upb_FieldType_SizeLg2)(field_type);
upb_Array* ret = UPB_PRIVATE(_upb_Array_New)(&d->arena, 4, lg2);
if (!ret) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
return ret;
Expand Down
Loading

0 comments on commit 1db9465

Please sign in to comment.