Commit fe97d79a authored by Feng Xiao's avatar Feng Xiao

Fix MSVC DLL build.

parent fab8812c
......@@ -438,9 +438,7 @@ class LIBPROTOBUF_EXPORT ExtensionSet {
// SpaceUsed()).
size_t SpaceUsedExcludingSelfLong() const;
int SpaceUsedExcludingSelf() const {
return internal::FromIntSize(SpaceUsedExcludingSelfLong());
}
int SpaceUsedExcludingSelf() const;
private:
......
......@@ -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);
......
......@@ -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:
......
......@@ -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
......
......@@ -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:
......
......@@ -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,
......
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