Skip to content

Commit

Permalink
Breaking change: remove const GetArena method on RepeatedPtrField
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 597349773
  • Loading branch information
mkruskal-google authored and Copybara-Service committed Jan 10, 2024
1 parent 1610bf1 commit 748ab16
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions src/google/protobuf/port_def.inc
Expand Up @@ -163,10 +163,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
// Owner: shaod@, gberg@
#define PROTOBUF_FUTURE_DESCRIPTOR_EXTENSION_DECL 1

// Used to remove `RepeatedPtrField::GetArena() const`.
// Owner: ezb@
#define PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API 1

#endif

// Defines the Protobuf C++ Version for checking version compatibility at
Expand Down
12 changes: 0 additions & 12 deletions src/google/protobuf/repeated_ptr_field.h
Expand Up @@ -1175,11 +1175,6 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
// Gets the arena on which this RepeatedPtrField stores its elements.
inline Arena* GetArena();

#ifndef PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API
ABSL_DEPRECATED("This will be removed in a future release")
inline Arena* GetArena() const;
#endif // !PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API

// For internal use only.
//
// This is public due to it being called by generated code.
Expand Down Expand Up @@ -1512,13 +1507,6 @@ inline Arena* RepeatedPtrField<Element>::GetArena() {
return RepeatedPtrFieldBase::GetArena();
}

#ifndef PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API
template <typename Element>
inline Arena* RepeatedPtrField<Element>::GetArena() const {
return RepeatedPtrFieldBase::GetArena();
}
#endif // !PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API

template <typename Element>
inline size_t RepeatedPtrField<Element>::SpaceUsedExcludingSelfLong() const {
// `google::protobuf::Message` has a virtual method `SpaceUsedLong`, hence we can
Expand Down

0 comments on commit 748ab16

Please sign in to comment.