diff options
author | Bo Yang <teboring@google.com> | 2016-09-19 13:45:07 -0700 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2016-10-10 11:23:36 -0700 |
commit | cc8ca5b6a5478b40546d4206392eb1471454460d (patch) | |
tree | c0b45abfa16d7d373a6ea8f7fe50f1de00ab938e /src/google/protobuf/message.cc | |
parent | 337a028bb65ccca4dda768695950b5aba53ae2c9 (diff) |
Integrate internal changes
Diffstat (limited to 'src/google/protobuf/message.cc')
-rw-r--r-- | src/google/protobuf/message.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc index f18077dd..c8de458c 100644 --- a/src/google/protobuf/message.cc +++ b/src/google/protobuf/message.cc @@ -46,9 +46,9 @@ #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/io/zero_copy_stream_impl.h> #include <google/protobuf/descriptor.pb.h> -#include <google/protobuf/map_field.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_util.h> +#include <google/protobuf/map_field.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> #include <google/protobuf/stubs/strutil.h> @@ -146,9 +146,9 @@ void Message::SerializeWithCachedSizes( WireFormat::SerializeWithCachedSizes(*this, GetCachedSize(), output); } -int Message::ByteSize() const { - int size = WireFormat::ByteSize(*this); - SetCachedSize(size); +size_t Message::ByteSizeLong() const { + size_t size = WireFormat::ByteSize(*this); + SetCachedSize(internal::ToCachedSize(size)); return size; } @@ -299,8 +299,8 @@ class GeneratedMessageFactory : public MessageFactory { hash_map<const char*, RegistrationFunc*, hash<const char*>, streq> file_map_; - // Initialized lazily, so requires locking. Mutex mutex_; + // Initialized lazily, so requires locking. hash_map<const Descriptor*, const Message*> type_map_; }; |