aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/reflection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/reflection.h')
-rw-r--r--src/google/protobuf/reflection.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/google/protobuf/reflection.h b/src/google/protobuf/reflection.h
index 5d0fc42b..236a68b6 100644
--- a/src/google/protobuf/reflection.h
+++ b/src/google/protobuf/reflection.h
@@ -38,6 +38,10 @@
#include <google/protobuf/message.h>
#include <google/protobuf/generated_enum_util.h>
+#ifdef SWIG
+#error "You cannot SWIG proto headers"
+#endif
+
namespace google {
namespace protobuf {
namespace internal {
@@ -333,8 +337,8 @@ namespace internal {
// CPPTYPE_BOOL bool bool
// CPPTYPE_ENUM generated enum type int32
// CPPTYPE_STRING string string
-// CPPTYPE_MESSAGE generated message type google::protobuf::Message
-// or google::protobuf::Message
+// CPPTYPE_MESSAGE generated message type proto2::Message
+// or proto2::Message
//
// Note that for enums we use int32 in the interface.
//
@@ -347,7 +351,6 @@ class LIBPROTOBUF_EXPORT RepeatedFieldAccessor {
typedef void Value;
typedef void Iterator;
- virtual ~RepeatedFieldAccessor();
virtual bool IsEmpty(const Field* data) const = 0;
virtual int Size(const Field* data) const = 0;
// Depends on the underlying representation of the repeated field, this
@@ -425,6 +428,13 @@ class LIBPROTOBUF_EXPORT RepeatedFieldAccessor {
ActualType tmp = static_cast<ActualType>(value);
Add(data, static_cast<const Value*>(&tmp));
}
+
+ protected:
+ // We want the destructor to be completely trivial as to allow it to be
+ // a function local static. Hence we make it non-virtual and protected,
+ // this class only live as part of a global singleton and should not be
+ // deleted.
+ ~RepeatedFieldAccessor() = default;
};
// Implement (Mutable)RepeatedFieldRef::iterator