Commit fe97d79a authored by Feng Xiao's avatar Feng Xiao

Fix MSVC DLL build.

parent fab8812c
...@@ -438,9 +438,7 @@ class LIBPROTOBUF_EXPORT ExtensionSet { ...@@ -438,9 +438,7 @@ class LIBPROTOBUF_EXPORT ExtensionSet {
// SpaceUsed()). // SpaceUsed()).
size_t SpaceUsedExcludingSelfLong() const; size_t SpaceUsedExcludingSelfLong() const;
int SpaceUsedExcludingSelf() const { int SpaceUsedExcludingSelf() const;
return internal::FromIntSize(SpaceUsedExcludingSelfLong());
}
private: private:
......
...@@ -340,6 +340,10 @@ bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, ...@@ -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 ExtensionSet::SpaceUsedExcludingSelfLong() const {
size_t total_size = size_t total_size =
extensions_.size() * sizeof(ExtensionMap::value_type); extensions_.size() * sizeof(ExtensionMap::value_type);
......
...@@ -255,7 +255,7 @@ struct MigrationSchema { ...@@ -255,7 +255,7 @@ struct MigrationSchema {
// of whatever type the individual field would be. Strings and // of whatever type the individual field would be. Strings and
// Messages use RepeatedPtrFields while everything else uses // Messages use RepeatedPtrFields while everything else uses
// RepeatedFields. // RepeatedFields.
class GeneratedMessageReflection PROTOBUF_FINAL : public Reflection { class LIBPROTOBUF_EXPORT GeneratedMessageReflection PROTOBUF_FINAL : public Reflection {
public: public:
// Constructs a GeneratedMessageReflection. // Constructs a GeneratedMessageReflection.
// Parameters: // Parameters:
......
...@@ -177,7 +177,7 @@ LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyString() { ...@@ -177,7 +177,7 @@ LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyString() {
return GetEmptyStringAlreadyInited(); 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 // True if IsInitialized() is true for all elements of t. Type is expected
......
...@@ -83,7 +83,7 @@ namespace internal { ...@@ -83,7 +83,7 @@ namespace internal {
template <typename Derived, typename Key, typename Value, template <typename Derived, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType, WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType, int default_enum_value> WireFormatLite::FieldType kValueFieldType, int default_enum_value>
class LIBPROTOBUF_EXPORT MapEntry class MapEntry
: public MapEntryImpl<Derived, Message, Key, Value, kKeyFieldType, : public MapEntryImpl<Derived, Message, Key, Value, kKeyFieldType,
kValueFieldType, default_enum_value> { kValueFieldType, default_enum_value> {
public: public:
......
...@@ -92,7 +92,7 @@ struct MoveHelper<false, false, true, T> { // strings and similar ...@@ -92,7 +92,7 @@ struct MoveHelper<false, false, true, T> { // strings and similar
template <typename Derived, typename Base, typename Key, typename Value, template <typename Derived, typename Base, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType, WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType, int default_enum_value> WireFormatLite::FieldType kValueFieldType, int default_enum_value>
class LIBPROTOBUF_EXPORT MapEntryImpl : public Base { class MapEntryImpl : public Base {
protected: protected:
// Provide utilities to parse/serialize key/value. Provide utilities to // Provide utilities to parse/serialize key/value. Provide utilities to
// manipulate internal stored type. // manipulate internal stored type.
...@@ -537,7 +537,7 @@ class LIBPROTOBUF_EXPORT MapEntryImpl : public Base { ...@@ -537,7 +537,7 @@ class LIBPROTOBUF_EXPORT MapEntryImpl : public Base {
template <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType, template <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType, int default_enum_value> WireFormatLite::FieldType kValueFieldType, int default_enum_value>
class LIBPROTOBUF_EXPORT MapEntryLite class MapEntryLite
: public MapEntryImpl<MapEntryLite<Key, Value, kKeyFieldType, : public MapEntryImpl<MapEntryLite<Key, Value, kKeyFieldType,
kValueFieldType, default_enum_value>, kValueFieldType, default_enum_value>,
MessageLite, Key, Value, kKeyFieldType, MessageLite, Key, Value, kKeyFieldType,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment