From 1e5a5e84193575c63126b0e90a2707378a8015ec Mon Sep 17 00:00:00 2001 From: "xiaofeng@google.com" Date: Thu, 31 Jan 2013 15:52:58 +0000 Subject: [PATCH] Down-integrate from internal branch --- src/google/protobuf/message.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index 77faa9a77a..0f90bc1a15 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -750,6 +750,27 @@ class LIBPROTOBUF_EXPORT MessageFactory { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFactory); }; +#define DECLARE_GET_REPEATED_FIELD(TYPE) \ +template<> \ +LIBPROTOBUF_EXPORT \ +const RepeatedField& Reflection::GetRepeatedField( \ + const Message& message, const FieldDescriptor* field) const; \ + \ +template<> \ +LIBPROTOBUF_EXPORT \ +RepeatedField* Reflection::MutableRepeatedField( \ + Message* message, const FieldDescriptor* field) const; + +DECLARE_GET_REPEATED_FIELD(int32) +DECLARE_GET_REPEATED_FIELD(int64) +DECLARE_GET_REPEATED_FIELD(uint32) +DECLARE_GET_REPEATED_FIELD(uint64) +DECLARE_GET_REPEATED_FIELD(float) +DECLARE_GET_REPEATED_FIELD(double) +DECLARE_GET_REPEATED_FIELD(bool) + +#undef DECLARE_GET_REPEATED_FIELD + // ============================================================================= // Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide // specializations for , and and handle