Index: third_party/protobuf/src/google/protobuf/wire_format.h |
diff --git a/third_party/protobuf/src/google/protobuf/wire_format.h b/third_party/protobuf/src/google/protobuf/wire_format.h |
index 860db13ee921ea66fdd18cc4bd0bb0648bbda5ee..fc60f51bf6ded71baa09cc34a4b7a3a87e47178d 100644 |
--- a/third_party/protobuf/src/google/protobuf/wire_format.h |
+++ b/third_party/protobuf/src/google/protobuf/wire_format.h |
@@ -1,6 +1,6 @@ |
// Protocol Buffers - Google's data interchange format |
// Copyright 2008 Google Inc. All rights reserved. |
-// https://developers.google.com/protocol-buffers/ |
+// http://code.google.com/p/protobuf/ |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -57,6 +57,7 @@ namespace protobuf { |
class CodedInputStream; // coded_stream.h |
class CodedOutputStream; // coded_stream.h |
} |
+ class UnknownFieldSet; // unknown_field_set.h |
} |
namespace protobuf { |
@@ -78,7 +79,7 @@ class LIBPROTOBUF_EXPORT WireFormat { |
static inline WireFormatLite::WireType WireTypeForField( |
const FieldDescriptor* field); |
- // Given a FieldDescriptor::Type return its WireType |
+ // Given a FieldSescriptor::Type return its WireType |
static inline WireFormatLite::WireType WireTypeForFieldType( |
FieldDescriptor::Type type); |
@@ -131,7 +132,7 @@ class LIBPROTOBUF_EXPORT WireFormat { |
// of packed repeated fields. |
static uint32 MakeTag(const FieldDescriptor* field); |
- // Parse a single field. The input should start out positioned immediately |
+ // Parse a single field. The input should start out positioned immidately |
// after the tag. |
static bool ParseAndMergeField( |
uint32 tag, |
@@ -179,34 +180,14 @@ class LIBPROTOBUF_EXPORT WireFormat { |
}; |
// Verifies that a string field is valid UTF8, logging an error if not. |
- // This function will not be called by newly generated protobuf code |
- // but remains present to support existing code. |
static void VerifyUTF8String(const char* data, int size, Operation op); |
- // The NamedField variant takes a field name in order to produce an |
- // informative error message if verification fails. |
- static void VerifyUTF8StringNamedField(const char* data, |
- int size, |
- Operation op, |
- const char* field_name); |
private: |
// Verifies that a string field is valid UTF8, logging an error if not. |
static void VerifyUTF8StringFallback( |
const char* data, |
int size, |
- Operation op, |
- const char* field_name); |
- |
- // Skip a MessageSet field. |
- static bool SkipMessageSetField(io::CodedInputStream* input, |
- uint32 field_number, |
- UnknownFieldSet* unknown_fields); |
- |
- // Parse a MessageSet field. |
- static bool ParseAndMergeMessageSetField(uint32 field_number, |
- const FieldDescriptor* field, |
- Message* message, |
- io::CodedInputStream* input); |
+ Operation op); |
@@ -217,7 +198,7 @@ class LIBPROTOBUF_EXPORT WireFormat { |
inline WireFormatLite::WireType WireFormat::WireTypeForField( |
const FieldDescriptor* field) { |
- if (field->is_packed()) { |
+ if (field->options().packed()) { |
return WireFormatLite::WIRETYPE_LENGTH_DELIMITED; |
} else { |
return WireTypeForFieldType(field->type()); |
@@ -248,21 +229,13 @@ inline int WireFormat::TagSize(int field_number, FieldDescriptor::Type type) { |
inline void WireFormat::VerifyUTF8String(const char* data, int size, |
WireFormat::Operation op) { |
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED |
- WireFormat::VerifyUTF8StringFallback(data, size, op, NULL); |
+ WireFormat::VerifyUTF8StringFallback(data, size, op); |
#else |
// Avoid the compiler warning about unsued variables. |
(void)data; (void)size; (void)op; |
#endif |
} |
-inline void WireFormat::VerifyUTF8StringNamedField( |
- const char* data, int size, WireFormat::Operation op, |
- const char* field_name) { |
-#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED |
- WireFormat::VerifyUTF8StringFallback(data, size, op, field_name); |
-#endif |
-} |
- |
} // namespace internal |
} // namespace protobuf |