diff --git a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs b/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs deleted file mode 100644 index 208ce1fcb6..0000000000 --- a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region Copyright notice and license -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd -#endregion - -namespace Google.Protobuf.Reflection; - -internal sealed partial class FeatureSetDescriptor -{ - // Canonical serialized form of the edition defaults, generated by embed_edition_defaults. - private const string DefaultsBase64 = - "ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; -} diff --git a/upb/mem/arena.c b/upb/mem/arena.c index 975520b7c7..e313d605be 100644 --- a/upb/mem/arena.c +++ b/upb/mem/arena.c @@ -565,6 +565,11 @@ void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner) { upb_Arena_Free((upb_Arena*)a); } +upb_alloc* upb_Arena_GetUpbAlloc(upb_Arena* a) { + upb_ArenaInternal* ai = upb_Arena_Internal(a); + return _upb_ArenaInternal_BlockAlloc(ai); +} + void UPB_PRIVATE(_upb_Arena_SwapIn)(upb_Arena* des, const upb_Arena* src) { upb_ArenaInternal* desi = upb_Arena_Internal(des); upb_ArenaInternal* srci = upb_Arena_Internal(src); diff --git a/upb/mem/arena.h b/upb/mem/arena.h index 63fad6d3ff..f0d9d2d6f0 100644 --- a/upb/mem/arena.h +++ b/upb/mem/arena.h @@ -44,6 +44,9 @@ UPB_API void upb_Arena_Free(upb_Arena* a); UPB_API bool upb_Arena_Fuse(const upb_Arena* a, const upb_Arena* b); UPB_API bool upb_Arena_IsFused(const upb_Arena* a, const upb_Arena* b); +// Returns the upb_alloc used by the arena. +UPB_API upb_alloc* upb_Arena_GetUpbAlloc(upb_Arena* a); + bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner); void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner);