diff options
Diffstat (limited to 'src/google/protobuf/text_format.cc')
-rw-r--r-- | src/google/protobuf/text_format.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc index 778b878e..04c887e0 100644 --- a/src/google/protobuf/text_format.cc +++ b/src/google/protobuf/text_format.cc @@ -74,18 +74,6 @@ inline bool IsOctNumber(const string& str) { (str[1] >= '0' && str[1] < '8')); } -inline bool GetAnyFieldDescriptors(const Message& message, - const FieldDescriptor** type_url_field, - const FieldDescriptor** value_field) { - const Descriptor* descriptor = message.GetDescriptor(); - *type_url_field = descriptor->FindFieldByNumber(1); - *value_field = descriptor->FindFieldByNumber(2); - return (*type_url_field != NULL && - (*type_url_field)->type() == FieldDescriptor::TYPE_STRING && - *value_field != NULL && - (*value_field)->type() == FieldDescriptor::TYPE_BYTES); -} - } // namespace string Message::DebugString() const { @@ -1322,6 +1310,7 @@ bool TextFormat::Parser::ParseFromString(const string& input, return Parse(&input_stream, output); } + bool TextFormat::Parser::Merge(io::ZeroCopyInputStream* input, Message* output) { ParserImpl parser(output->GetDescriptor(), input, error_collector_, @@ -1339,6 +1328,7 @@ bool TextFormat::Parser::MergeFromString(const string& input, return Merge(&input_stream, output); } + bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* /* input */, Message* output, ParserImpl* parser_impl) { @@ -1387,6 +1377,7 @@ bool TextFormat::Parser::ParseFieldValueFromString( return Parser().MergeFromString(input, output); } + // =========================================================================== // The default implementation for FieldValuePrinter. The base class just |