Skip to content

Commit

Permalink
Merge pull request #8011 from JamesNK/jamesnk/remove-define-systemmemory
Browse files Browse the repository at this point in the history
Remove GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY
  • Loading branch information
jtattermusch committed Nov 6, 2020
2 parents ea513d7 + 5261847 commit 0bb6dd8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions csharp/src/Google.Protobuf/ByteString.cs
Expand Up @@ -111,7 +111,6 @@ public bool IsEmpty
get { return Length == 0; }
}

#if GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY
/// <summary>
/// Provides read-only access to the data of this <see cref="ByteString"/>.
/// No data is copied so this is the most efficient way of accessing.
Expand All @@ -137,7 +136,6 @@ public ReadOnlyMemory<byte> Memory
return new ReadOnlyMemory<byte>(bytes);
}
}
#endif

/// <summary>
/// Converts this <see cref="ByteString"/> into a byte array.
Expand Down Expand Up @@ -239,7 +237,6 @@ public static ByteString CopyFrom(byte[] bytes, int offset, int count)
return new ByteString(portion);
}

#if GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY
/// <summary>
/// Constructs a <see cref="ByteString" /> from a read only span. The contents
/// are copied, so further modifications to the span will not
Expand All @@ -250,7 +247,6 @@ public static ByteString CopyFrom(ReadOnlySpan<byte> bytes)
{
return new ByteString(bytes.ToArray());
}
#endif

/// <summary>
/// Creates a new <see cref="ByteString" /> by encoding the specified text with
Expand Down
1 change: 0 additions & 1 deletion csharp/src/Google.Protobuf/Google.Protobuf.csproj
Expand Up @@ -19,7 +19,6 @@
<PackageLicenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/protocolbuffers/protobuf.git</RepositoryUrl>
<DefineConstants>$(DefineConstants);GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY</DefineConstants>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
Expand Down
2 changes: 0 additions & 2 deletions csharp/src/Google.Protobuf/IBufferMessage.cs
Expand Up @@ -32,7 +32,6 @@

namespace Google.Protobuf
{
#if GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY
/// <summary>
/// Interface for a Protocol Buffers message, supporting
/// parsing from <see cref="ParseContext"/> and writing to <see cref="WriteContext"/>.
Expand All @@ -51,5 +50,4 @@ public interface IBufferMessage : IMessage
/// </summary>
void InternalWriteTo(ref WriteContext ctx);
}
#endif
}

0 comments on commit 0bb6dd8

Please sign in to comment.