Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY #8011

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
}