Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691173359
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Oct 29, 2024
1 parent 1e8e356 commit 9a13553
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/google/protobuf/extension_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <string>
#include <type_traits>
#include <utility>
#include <variant>
#include <vector>

#include "google/protobuf/stubs/common.h"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -645,6 +651,9 @@ class PROTOBUF_EXPORT ExtensionSet {
virtual size_t ByteSizeLong() const = 0;
virtual size_t SpaceUsedLong() const = 0;

virtual std::variant<size_t, const MessageLite*> UnparsedSizeOrMessage()
const = 0;

virtual void MergeFrom(const MessageLite* prototype,
const LazyMessageExtension& other, Arena* arena,
Arena* other_arena) = 0;
Expand Down
1 change: 1 addition & 0 deletions src/google/protobuf/extension_set_heavy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <variant>
#include <vector>

#include "absl/base/attributes.h"
Expand Down

0 comments on commit 9a13553

Please sign in to comment.