diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-08-08 11:51:40 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-08-08 11:51:40 -0700 |
commit | 59806299336e341cd24808cb5ad3e4c571097c13 (patch) | |
tree | 7fcbb045557e3e4109caac39f0f5e2a83ad80e93 /src | |
parent | e58cdbd2146bc8e2e2f5bf4bc8a7576f82535ae6 (diff) | |
parent | 93bdf36f8b0ce94ebde3fb12e4b8dcaead6b8164 (diff) |
Merge pull request #700 from jskeet/remove-packed-hack
Remove our own version of MakeTag now that the main one is fixed.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_field_base.cc | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_helpers.cc | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/src/google/protobuf/compiler/csharp/csharp_field_base.cc index 7e3bbeef..cd29bcf9 100644 --- a/src/google/protobuf/compiler/csharp/csharp_field_base.cc +++ b/src/google/protobuf/compiler/csharp/csharp_field_base.cc @@ -59,7 +59,7 @@ void FieldGeneratorBase::SetCommonFieldVariables( // repeated fields varies by wire format. The wire format is encoded in the bottom 3 bits, which // never effects the tag size. int tag_size = internal::WireFormat::TagSize(descriptor_->number(), descriptor_->type()); - uint tag = FixedMakeTag(descriptor_); + uint tag = internal::WireFormat::MakeTag(descriptor_); uint8 tag_array[5]; io::CodedOutputStream::WriteTagToArray(tag, tag_array); string tag_bytes = SimpleItoa(tag_array[0]); diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.cc b/src/google/protobuf/compiler/csharp/csharp_helpers.cc index 46f4fc33..d25dcba9 100644 --- a/src/google/protobuf/compiler/csharp/csharp_helpers.cc +++ b/src/google/protobuf/compiler/csharp/csharp_helpers.cc @@ -338,17 +338,6 @@ std::string FileDescriptorToBase64(const FileDescriptor* descriptor) { return StringToBase64(fdp_bytes); } -// TODO(jonskeet): Remove this when internal::WireFormat::MakeTag works -// properly... -// Workaround for issue #493 -uint FixedMakeTag(const FieldDescriptor* field) { - internal::WireFormatLite::WireType field_type = field->is_packed() - ? internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED - : internal::WireFormat::WireTypeForFieldType(field->type()); - - return internal::WireFormatLite::MakeTag(field->number(), field_type); -} - FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor, int fieldOrdinal) { switch (descriptor->type()) { |