From 52618472bc518b8b3e5f958b7b7186718d8e0777 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 6 Nov 2020 11:55:26 +1300 Subject: [PATCH] Remove GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY --- csharp/src/Google.Protobuf/ByteString.cs | 4 ---- csharp/src/Google.Protobuf/Google.Protobuf.csproj | 1 - csharp/src/Google.Protobuf/IBufferMessage.cs | 2 -- 3 files changed, 7 deletions(-) diff --git a/csharp/src/Google.Protobuf/ByteString.cs b/csharp/src/Google.Protobuf/ByteString.cs index d893602095fb..45b3885a5cbe 100644 --- a/csharp/src/Google.Protobuf/ByteString.cs +++ b/csharp/src/Google.Protobuf/ByteString.cs @@ -111,7 +111,6 @@ public bool IsEmpty get { return Length == 0; } } -#if GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY /// /// Provides read-only access to the data of this . /// No data is copied so this is the most efficient way of accessing. @@ -137,7 +136,6 @@ public ReadOnlyMemory Memory return new ReadOnlyMemory(bytes); } } -#endif /// /// Converts this into a byte array. @@ -239,7 +237,6 @@ public static ByteString CopyFrom(byte[] bytes, int offset, int count) return new ByteString(portion); } -#if GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY /// /// Constructs a from a read only span. The contents /// are copied, so further modifications to the span will not @@ -250,7 +247,6 @@ public static ByteString CopyFrom(ReadOnlySpan bytes) { return new ByteString(bytes.ToArray()); } -#endif /// /// Creates a new by encoding the specified text with diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj index 706d836a3d08..bd3d2fc0c593 100644 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj +++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj @@ -19,7 +19,6 @@ https://github.com/protocolbuffers/protobuf/blob/master/LICENSE git https://github.com/protocolbuffers/protobuf.git - $(DefineConstants);GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY True $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb diff --git a/csharp/src/Google.Protobuf/IBufferMessage.cs b/csharp/src/Google.Protobuf/IBufferMessage.cs index c99a7d79fc02..05c15db4c62a 100644 --- a/csharp/src/Google.Protobuf/IBufferMessage.cs +++ b/csharp/src/Google.Protobuf/IBufferMessage.cs @@ -32,7 +32,6 @@ namespace Google.Protobuf { -#if GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY /// /// Interface for a Protocol Buffers message, supporting /// parsing from and writing to . @@ -51,5 +50,4 @@ public interface IBufferMessage : IMessage /// void InternalWriteTo(ref WriteContext ctx); } -#endif }