Feng Xiao 8 жил өмнө
parent
commit
fe97d79abf

+ 1 - 3
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:
 

+ 4 - 0
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);

+ 1 - 1
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:

+ 1 - 1
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

+ 1 - 1
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:

+ 2 - 2
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,