From fe97d79abf610fdccfadcd4b503ab3bc0a162d30 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 30 Mar 2017 23:54:39 +0000 Subject: Fix MSVC DLL build. --- src/google/protobuf/extension_set.h | 4 +--- src/google/protobuf/extension_set_heavy.cc | 4 ++++ src/google/protobuf/generated_message_reflection.h | 2 +- src/google/protobuf/generated_message_util.h | 2 +- src/google/protobuf/map_entry.h | 2 +- src/google/protobuf/map_entry_lite.h | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h index cb8ed217..cf5f652d 100644 --- a/src/google/protobuf/extension_set.h +++ b/src/google/protobuf/extension_set.h @@ -438,9 +438,7 @@ class LIBPROTOBUF_EXPORT ExtensionSet { // SpaceUsed()). size_t SpaceUsedExcludingSelfLong() const; - int SpaceUsedExcludingSelf() const { - return internal::FromIntSize(SpaceUsedExcludingSelfLong()); - } + int SpaceUsedExcludingSelf() const; private: diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc index 3649104f..f545fe30 100644 --- a/src/google/protobuf/extension_set_heavy.cc +++ b/src/google/protobuf/extension_set_heavy.cc @@ -340,6 +340,10 @@ bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, } } +int ExtensionSet::SpaceUsedExcludingSelf() const { + return internal::FromIntSize(SpaceUsedExcludingSelfLong()); +} + size_t ExtensionSet::SpaceUsedExcludingSelfLong() const { size_t total_size = extensions_.size() * sizeof(ExtensionMap::value_type); diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index b4fdbb11..12b73ca3 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -255,7 +255,7 @@ struct MigrationSchema { // of whatever type the individual field would be. Strings and // Messages use RepeatedPtrFields while everything else uses // RepeatedFields. -class GeneratedMessageReflection PROTOBUF_FINAL : public Reflection { +class LIBPROTOBUF_EXPORT GeneratedMessageReflection PROTOBUF_FINAL : public Reflection { public: // Constructs a GeneratedMessageReflection. // Parameters: diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h index 903c4ee8..055304a1 100644 --- a/src/google/protobuf/generated_message_util.h +++ b/src/google/protobuf/generated_message_util.h @@ -177,7 +177,7 @@ LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyString() { return GetEmptyStringAlreadyInited(); } -size_t StringSpaceUsedExcludingSelfLong(const string& str); +LIBPROTOBUF_EXPORT size_t StringSpaceUsedExcludingSelfLong(const string& str); // True if IsInitialized() is true for all elements of t. Type is expected diff --git a/src/google/protobuf/map_entry.h b/src/google/protobuf/map_entry.h index 0a7d9a97..7c675568 100644 --- a/src/google/protobuf/map_entry.h +++ b/src/google/protobuf/map_entry.h @@ -83,7 +83,7 @@ namespace internal { template -class LIBPROTOBUF_EXPORT MapEntry +class MapEntry : public MapEntryImpl { public: diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h index cd67f6e0..c466cc7b 100644 --- a/src/google/protobuf/map_entry_lite.h +++ b/src/google/protobuf/map_entry_lite.h @@ -92,7 +92,7 @@ struct MoveHelper { // strings and similar template -class LIBPROTOBUF_EXPORT MapEntryImpl : public Base { +class MapEntryImpl : public Base { protected: // Provide utilities to parse/serialize key/value. Provide utilities to // manipulate internal stored type. @@ -537,7 +537,7 @@ class LIBPROTOBUF_EXPORT MapEntryImpl : public Base { template -class LIBPROTOBUF_EXPORT MapEntryLite +class MapEntryLite : public MapEntryImpl, MessageLite, Key, Value, kKeyFieldType, -- cgit v1.2.3