aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/CodedInputStream.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-06-02 10:52:37 -0500
committerrogerk <devnull@localhost>2011-06-02 10:52:37 -0500
commit45a93fad4d7123887d14135ee15ee3e9b0d4ca58 (patch)
treec62c6a5b4159619de112d4d60bb876d834ca4e94 /src/ProtocolBuffers/CodedInputStream.cs
parentefed509b55a1ab6d18b8ef960d799973e7e74544 (diff)
downloadprotobuf-45a93fad4d7123887d14135ee15ee3e9b0d4ca58.tar.gz
protobuf-45a93fad4d7123887d14135ee15ee3e9b0d4ca58.tar.bz2
protobuf-45a93fad4d7123887d14135ee15ee3e9b0d4ca58.zip
Optimized access to ByteString from coded io.
Diffstat (limited to 'src/ProtocolBuffers/CodedInputStream.cs')
-rw-r--r--src/ProtocolBuffers/CodedInputStream.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ProtocolBuffers/CodedInputStream.cs b/src/ProtocolBuffers/CodedInputStream.cs
index 225cf4da..a9afbe60 100644
--- a/src/ProtocolBuffers/CodedInputStream.cs
+++ b/src/ProtocolBuffers/CodedInputStream.cs
@@ -58,7 +58,7 @@ namespace Google.ProtocolBuffers
/// TODO(jonskeet): Consider whether recursion and size limits shouldn't be readonly,
/// set at construction time.
/// </remarks>
- public sealed class CodedInputStream
+ public sealed partial class CodedInputStream
{
private readonly byte[] buffer;
private int bufferSize;
@@ -353,7 +353,7 @@ namespace Google.ProtocolBuffers
else
{
// Slow path: Build a byte array first then copy it.
- return ByteString.CopyFrom(ReadRawBytes(size));
+ return ByteString.AttachBytes(ReadRawBytes(size));
}
}