aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-30 23:54:39 +0000
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-30 23:54:39 +0000
commitfe97d79abf610fdccfadcd4b503ab3bc0a162d30 (patch)
treec4a1b67232379f79f82fe7641f1c8f8d56828dad
parentfab8812cc1bb9db0683e7d0b0182a63ee1159874 (diff)
Fix MSVC DLL build.
-rw-r--r--src/google/protobuf/extension_set.h4
-rw-r--r--src/google/protobuf/extension_set_heavy.cc4
-rw-r--r--src/google/protobuf/generated_message_reflection.h2
-rw-r--r--src/google/protobuf/generated_message_util.h2
-rw-r--r--src/google/protobuf/map_entry.h2
-rw-r--r--src/google/protobuf/map_entry_lite.h4
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 <typename Derived, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType, int default_enum_value>
-class LIBPROTOBUF_EXPORT MapEntry
+class MapEntry
: public MapEntryImpl<Derived, Message, Key, Value, kKeyFieldType,
kValueFieldType, default_enum_value> {
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<false, false, true, T> { // strings and similar
template <typename Derived, typename Base, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType, int default_enum_value>
-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 <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType, int default_enum_value>
-class LIBPROTOBUF_EXPORT MapEntryLite
+class MapEntryLite
: public MapEntryImpl<MapEntryLite<Key, Value, kKeyFieldType,
kValueFieldType, default_enum_value>,
MessageLite, Key, Value, kKeyFieldType,