aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/message.h
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2017-07-18 15:38:30 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2017-07-18 15:38:30 -0700
commit09354db1434859a31a3c81abebcc4018d42f2715 (patch)
treeb87c7cdc2255e6c8062ab92b4082665cd698d753 /src/google/protobuf/message.h
parent9053033a5076f82cf18b823c31f352e95e5bfd8d (diff)
Merge from Google internal for 3.4 release
Diffstat (limited to 'src/google/protobuf/message.h')
-rw-r--r--src/google/protobuf/message.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h
index 68acb5b1..c65ff625 100644
--- a/src/google/protobuf/message.h
+++ b/src/google/protobuf/message.h
@@ -254,6 +254,7 @@ class LIBPROTOBUF_EXPORT Message : public MessageLite {
// fields defined for the proto.
virtual size_t SpaceUsedLong() const;
+ PROTOBUF_RUNTIME_DEPRECATED("Please use SpaceUsedLong() instead")
int SpaceUsed() const { return internal::ToIntSize(SpaceUsedLong()); }
// Debugging & Testing----------------------------------------------
@@ -428,6 +429,7 @@ class LIBPROTOBUF_EXPORT Reflection {
// Estimate the amount of memory used by the message object.
virtual size_t SpaceUsedLong(const Message& message) const = 0;
+ PROTOBUF_RUNTIME_DEPRECATED("Please use SpaceUsedLong() instead")
int SpaceUsed(const Message& message) const {
return internal::ToIntSize(SpaceUsedLong(message));
}
@@ -752,9 +754,9 @@ class LIBPROTOBUF_EXPORT Reflection {
// specifyed by 'field' passing ownership to the message.
// TODO(tmarek): Make virtual after all subclasses have been
// updated.
- virtual void AddAllocatedMessage(Message* /* message */,
- const FieldDescriptor* /*field */,
- Message* /* new_entry */) const {}
+ virtual void AddAllocatedMessage(Message* message,
+ const FieldDescriptor* field,
+ Message* new_entry) const;
// Get a RepeatedFieldRef object that can be used to read the underlying