From 972e5499eb88aa2ad08a394cfaea4d380454c68c Mon Sep 17 00:00:00 2001 From: Chris Kennelly Date: Mon, 22 Jul 2024 12:08:24 -0700 Subject: [PATCH] Automated rollback of commit 84af72713d3d5aebfbc79d9763efa82f50692650. PiperOrigin-RevId: 654848026 --- src/google/protobuf/arena.h | 5 ++--- src/google/protobuf/port_def.inc | 4 ---- src/google/protobuf/port_undef.inc | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index 0b3208a180..a3cd7b7654 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -173,8 +173,8 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { inline ~Arena() = default; -#ifndef PROTOBUF_FUTURE_CREATE_MESSAGE - // Deprecated. Use Create instead. + // Deprecated. Use Create instead. TODO: depreate OSS version + // once internal migration to Arena::Create is done. template ABSL_DEPRECATED("Use Create") static T* CreateMessage(Arena* arena, Args&&... args) { @@ -184,7 +184,6 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { "CreateMessage can only construct types that are ArenaConstructable"); return Create(arena, std::forward(args)...); } -#endif // !PROTOBUF_FUTURE_CREATE_MESSAGE // Allocates an object type T if the arena passed in is not nullptr; // otherwise, returns a heap-allocated object. diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index a46c7b018f..52fa1b315b 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -143,10 +143,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), // Owner: shaod@, gberg@ #define PROTOBUF_FUTURE_DESCRIPTOR_EXTENSION_DECL 1 -// Removes Arena::CreateMessage, as Arena::Create is equivalent -// Owner: ckennelly@, mkruskal@ -#define PROTOBUF_FUTURE_CREATE_MESSAGE 1 - #endif #ifdef PROTOBUF_FUTURE_STRING_VIEW_RETURN_TYPE diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc index 1434617257..0855b44c7f 100644 --- a/src/google/protobuf/port_undef.inc +++ b/src/google/protobuf/port_undef.inc @@ -84,7 +84,6 @@ #undef PROTOBUF_FUTURE_BREAKING_CHANGES #undef PROTOBUF_FUTURE_DESCRIPTOR_EXTENSION_DECL #undef PROTOBUF_FUTURE_STRING_VIEW_RETURN_TYPE -#undef PROTOBUF_FUTURE_CREATE_MESSAGE #endif // Restore macros that may have been #undef'd in port_def.inc.