From 9a13553f599a479404fde300729bbb6ba4d65276 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 29 Oct 2024 14:57:55 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 691173359 --- src/google/protobuf/extension_set.h | 9 +++++++++ src/google/protobuf/extension_set_heavy.cc | 1 + 2 files changed, 10 insertions(+) diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h index 3be56c47240e..aba66c23a5ba 100644 --- a/src/google/protobuf/extension_set.h +++ b/src/google/protobuf/extension_set.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "google/protobuf/stubs/common.h" @@ -83,6 +84,10 @@ namespace internal { class InternalMetadata; +namespace v2 { +class TableDriven; +} // namespace v2 + // Used to store values of type WireFormatLite::FieldType without having to // #include wire_format_lite.h. Also, ensures that we use only one byte to // store these values, which is important to keep the layout of @@ -567,6 +572,7 @@ class PROTOBUF_EXPORT ExtensionSet { friend class google::protobuf::internal::ReflectionVisit; friend struct google::protobuf::internal::DynamicExtensionInfoHelper; friend class google::protobuf::internal::WireFormat; + friend class google::protobuf::internal::v2::TableDriven; friend void internal::InitializeLazyExtensionSet(); @@ -645,6 +651,9 @@ class PROTOBUF_EXPORT ExtensionSet { virtual size_t ByteSizeLong() const = 0; virtual size_t SpaceUsedLong() const = 0; + virtual std::variant UnparsedSizeOrMessage() + const = 0; + virtual void MergeFrom(const MessageLite* prototype, const LazyMessageExtension& other, Arena* arena, Arena* other_arena) = 0; diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc index 134d08296a1e..96d363e2ab16 100644 --- a/src/google/protobuf/extension_set_heavy.cc +++ b/src/google/protobuf/extension_set_heavy.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "absl/base/attributes.h"