diff options
author | csharptest <roger@csharptest.net> | 2011-07-14 13:20:11 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2011-07-14 13:20:11 -0500 |
commit | ed701ad2a5c8d3fabfaaacba58f2dfa7d78e6c2c (patch) | |
tree | 3b9434bd89b0f843490d559ce5b652efac1fa003 /src/ProtocolBuffers | |
parent | 398a7f526c9b1e69531ab1169d0e62fa4c2eadf0 (diff) | |
download | protobuf-ed701ad2a5c8d3fabfaaacba58f2dfa7d78e6c2c.tar.gz protobuf-ed701ad2a5c8d3fabfaaacba58f2dfa7d78e6c2c.tar.bz2 protobuf-ed701ad2a5c8d3fabfaaacba58f2dfa7d78e6c2c.zip |
renamed ByteString.WriteTo(CodedOutputStream) to WriteRawBytesTo
Diffstat (limited to 'src/ProtocolBuffers')
-rw-r--r-- | src/ProtocolBuffers/ByteString.cs | 5 | ||||
-rw-r--r-- | src/ProtocolBuffers/CodedOutputStream.cs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ProtocolBuffers/ByteString.cs b/src/ProtocolBuffers/ByteString.cs index 545bf556..ea17ca1e 100644 --- a/src/ProtocolBuffers/ByteString.cs +++ b/src/ProtocolBuffers/ByteString.cs @@ -252,7 +252,10 @@ namespace Google.ProtocolBuffers }
}
- internal void WriteTo(CodedOutputStream outputStream)
+ /// <summary>
+ /// Used internally by CodedOutputStream to avoid creating a copy for the write
+ /// </summary>
+ internal void WriteRawBytesTo(CodedOutputStream outputStream)
{
outputStream.WriteRawBytes(bytes, 0, bytes.Length);
}
diff --git a/src/ProtocolBuffers/CodedOutputStream.cs b/src/ProtocolBuffers/CodedOutputStream.cs index 59490df3..088db8ae 100644 --- a/src/ProtocolBuffers/CodedOutputStream.cs +++ b/src/ProtocolBuffers/CodedOutputStream.cs @@ -360,7 +360,7 @@ namespace Google.ProtocolBuffers {
WriteTag(fieldNumber, WireFormat.WireType.LengthDelimited);
WriteRawVarint32((uint) value.Length);
- value.WriteTo(this);
+ value.WriteRawBytesTo(this);
}
[CLSCompliant(false)]
@@ -637,7 +637,7 @@ namespace Google.ProtocolBuffers public void WriteBytesNoTag(ByteString value)
{
WriteRawVarint32((uint) value.Length);
- value.WriteTo(this);
+ value.WriteRawBytesTo(this);
}
[CLSCompliant(false)]
|