Auto-generate files after cl/600653849

pull/15523/head
Protobuf Team Bot 10 months ago
parent 07f784a2f3
commit 9ffbe84cba
  1. 12
      php/ext/google/protobuf/php-upb.c
  2. 5
      php/ext/google/protobuf/php-upb.h
  3. 12
      ruby/ext/google/protobuf_c/ruby-upb.c
  4. 5
      ruby/ext/google/protobuf_c/ruby-upb.h

@ -5663,8 +5663,8 @@ upb_Message* _upb_Message_Copy(upb_Message* dst, const upb_Message* src,
for (size_t i = 0; i < ext_count; ++i) {
const upb_Extension* msg_ext = &ext[i];
const upb_MiniTableField* field = &msg_ext->ext->UPB_PRIVATE(field);
upb_Extension* dst_ext =
_upb_Message_GetOrCreateExtension(dst, msg_ext->ext, arena);
upb_Extension* dst_ext = UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
dst, msg_ext->ext, arena);
if (!dst_ext) return NULL;
if (upb_MiniTableField_IsScalar(field)) {
if (!upb_Clone_ExtensionValue(msg_ext->ext, msg_ext, dst_ext, arena)) {
@ -7851,7 +7851,7 @@ static void upb_Decoder_AddKnownMessageSetItem(
upb_Decoder* d, upb_Message* msg, const upb_MiniTableExtension* item_mt,
const char* data, uint32_t size) {
upb_Extension* ext =
_upb_Message_GetOrCreateExtension(msg, item_mt, &d->arena);
UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(msg, item_mt, &d->arena);
if (UPB_UNLIKELY(!ext)) {
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
}
@ -8205,8 +8205,8 @@ static const char* _upb_Decoder_DecodeKnownField(
if (UPB_UNLIKELY(mode & kUpb_LabelFlags_IsExtension)) {
const upb_MiniTableExtension* ext_layout =
(const upb_MiniTableExtension*)field;
upb_Extension* ext =
_upb_Message_GetOrCreateExtension(msg, ext_layout, &d->arena);
upb_Extension* ext = UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
msg, ext_layout, &d->arena);
if (UPB_UNLIKELY(!ext)) {
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
}
@ -11120,7 +11120,7 @@ const struct upb_Extension* UPB_PRIVATE(_upb_Message_Getexts)(
}
}
struct upb_Extension* _upb_Message_GetOrCreateExtension(
struct upb_Extension* UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
struct upb_Message* msg, const upb_MiniTableExtension* e, upb_Arena* a) {
struct upb_Extension* ext =
(struct upb_Extension*)UPB_PRIVATE(_upb_Message_Getext)(msg, e);

@ -2000,7 +2000,7 @@ extern "C" {
// Adds the given extension data to the given message.
// |ext| is copied into the message instance.
// This logically replaces any previously-added extension with this number.
struct upb_Extension* _upb_Message_GetOrCreateExtension(
struct upb_Extension* UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
struct upb_Message* msg, const upb_MiniTableExtension* ext,
upb_Arena* arena);
@ -2783,7 +2783,8 @@ UPB_INLINE bool _upb_Message_SetExtensionField(
struct upb_Message* msg, const upb_MiniTableExtension* mt_ext,
const void* val, upb_Arena* a) {
UPB_ASSERT(a);
struct upb_Extension* ext = _upb_Message_GetOrCreateExtension(msg, mt_ext, a);
struct upb_Extension* ext =
UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(msg, mt_ext, a);
if (!ext) return false;
UPB_PRIVATE(_upb_MiniTableField_DataCopy)
(&mt_ext->UPB_PRIVATE(field), &ext->data, val);

@ -5177,8 +5177,8 @@ upb_Message* _upb_Message_Copy(upb_Message* dst, const upb_Message* src,
for (size_t i = 0; i < ext_count; ++i) {
const upb_Extension* msg_ext = &ext[i];
const upb_MiniTableField* field = &msg_ext->ext->UPB_PRIVATE(field);
upb_Extension* dst_ext =
_upb_Message_GetOrCreateExtension(dst, msg_ext->ext, arena);
upb_Extension* dst_ext = UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
dst, msg_ext->ext, arena);
if (!dst_ext) return NULL;
if (upb_MiniTableField_IsScalar(field)) {
if (!upb_Clone_ExtensionValue(msg_ext->ext, msg_ext, dst_ext, arena)) {
@ -7365,7 +7365,7 @@ static void upb_Decoder_AddKnownMessageSetItem(
upb_Decoder* d, upb_Message* msg, const upb_MiniTableExtension* item_mt,
const char* data, uint32_t size) {
upb_Extension* ext =
_upb_Message_GetOrCreateExtension(msg, item_mt, &d->arena);
UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(msg, item_mt, &d->arena);
if (UPB_UNLIKELY(!ext)) {
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
}
@ -7719,8 +7719,8 @@ static const char* _upb_Decoder_DecodeKnownField(
if (UPB_UNLIKELY(mode & kUpb_LabelFlags_IsExtension)) {
const upb_MiniTableExtension* ext_layout =
(const upb_MiniTableExtension*)field;
upb_Extension* ext =
_upb_Message_GetOrCreateExtension(msg, ext_layout, &d->arena);
upb_Extension* ext = UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
msg, ext_layout, &d->arena);
if (UPB_UNLIKELY(!ext)) {
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
}
@ -10634,7 +10634,7 @@ const struct upb_Extension* UPB_PRIVATE(_upb_Message_Getexts)(
}
}
struct upb_Extension* _upb_Message_GetOrCreateExtension(
struct upb_Extension* UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
struct upb_Message* msg, const upb_MiniTableExtension* e, upb_Arena* a) {
struct upb_Extension* ext =
(struct upb_Extension*)UPB_PRIVATE(_upb_Message_Getext)(msg, e);

@ -2002,7 +2002,7 @@ extern "C" {
// Adds the given extension data to the given message.
// |ext| is copied into the message instance.
// This logically replaces any previously-added extension with this number.
struct upb_Extension* _upb_Message_GetOrCreateExtension(
struct upb_Extension* UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(
struct upb_Message* msg, const upb_MiniTableExtension* ext,
upb_Arena* arena);
@ -2785,7 +2785,8 @@ UPB_INLINE bool _upb_Message_SetExtensionField(
struct upb_Message* msg, const upb_MiniTableExtension* mt_ext,
const void* val, upb_Arena* a) {
UPB_ASSERT(a);
struct upb_Extension* ext = _upb_Message_GetOrCreateExtension(msg, mt_ext, a);
struct upb_Extension* ext =
UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(msg, mt_ext, a);
if (!ext) return false;
UPB_PRIVATE(_upb_MiniTableField_DataCopy)
(&mt_ext->UPB_PRIVATE(field), &ext->data, val);

Loading…
Cancel
Save