| Index: third_party/protobuf/src/google/protobuf/generated_message_util.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/generated_message_util.h b/third_party/protobuf/src/google/protobuf/generated_message_util.h
|
| index ae8196b1f63a84c1872e5981d56ba7f75c70e3d3..6e4669c271a858c3a0028f7e2447cbf6c90889b7 100644
|
| --- a/third_party/protobuf/src/google/protobuf/generated_message_util.h
|
| +++ b/third_party/protobuf/src/google/protobuf/generated_message_util.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
|
| @@ -38,22 +38,14 @@
|
| #ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__
|
| #define GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__
|
|
|
| -#include <assert.h>
|
| #include <string>
|
|
|
| -#include <google/protobuf/stubs/once.h>
|
| -
|
| #include <google/protobuf/stubs/common.h>
|
| +#include <google/protobuf/stubs/once.h>
|
| namespace google {
|
| -
|
| namespace protobuf {
|
| -
|
| -class Arena;
|
| -namespace io { class CodedInputStream; }
|
| -
|
| namespace internal {
|
|
|
| -
|
| // Annotation for the compiler to emit a deprecation message if a field marked
|
| // with option 'deprecated=true' is used in the code, or for other things in
|
| // generated code which are deprecated.
|
| @@ -68,22 +60,13 @@ namespace internal {
|
| LIBPROTOBUF_EXPORT double Infinity();
|
| LIBPROTOBUF_EXPORT double NaN();
|
|
|
| -// TODO(jieluo): Change to template. We have tried to use template,
|
| -// but it causes net/rpc/python:rpcutil_test fail (the empty string will
|
| -// init twice). It may related to swig. Change to template after we
|
| -// found the solution.
|
| -
|
| // Default empty string object. Don't use the pointer directly. Instead, call
|
| // GetEmptyString() to get the reference.
|
| LIBPROTOBUF_EXPORT extern const ::std::string* empty_string_;
|
| LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_;
|
| -LIBPROTOBUF_EXPORT void InitEmptyString();
|
|
|
| +LIBPROTOBUF_EXPORT void InitEmptyString();
|
|
|
| -LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyStringAlreadyInited() {
|
| - assert(empty_string_ != NULL);
|
| - return *empty_string_;
|
| -}
|
| LIBPROTOBUF_EXPORT const ::std::string& GetEmptyString();
|
|
|
| // Defined in generated_message_reflection.cc -- not actually part of the lite
|
| @@ -94,28 +77,6 @@ LIBPROTOBUF_EXPORT const ::std::string& GetEmptyString();
|
| // get the declaration from this file.
|
| LIBPROTOBUF_EXPORT int StringSpaceUsedExcludingSelf(const string& str);
|
|
|
| -
|
| -// True if IsInitialized() is true for all elements of t. Type is expected
|
| -// to be a RepeatedPtrField<some message type>. It's useful to have this
|
| -// helper here to keep the protobuf compiler from ever having to emit loops in
|
| -// IsInitialized() methods. We want the C++ compiler to inline this or not
|
| -// as it sees fit.
|
| -template <class Type> bool AllAreInitialized(const Type& t) {
|
| - for (int i = t.size(); --i >= 0; ) {
|
| - if (!t.Get(i).IsInitialized()) return false;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| -class ArenaString;
|
| -
|
| -// Read a length (varint32), followed by a string, from *input. Return a
|
| -// pointer to a copy of the string that resides in *arena. Requires both
|
| -// args to be non-NULL. If something goes wrong while reading the data
|
| -// then NULL is returned (e.g., input does not start with a valid varint).
|
| -ArenaString* ReadArenaString(::google::protobuf::io::CodedInputStream* input,
|
| - ::google::protobuf::Arena* arena);
|
| -
|
| } // namespace internal
|
| } // namespace protobuf
|
|
|
|
|