Browse Source

Fix windows build.

Change-Id: Ibf7d1df850f4b497303f9f617751be98327898ef
Feng Xiao 9 years ago
parent
commit
2fe0556c7a
2 changed files with 14 additions and 7 deletions
  1. 2 7
      src/google/protobuf/extension_set.h
  2. 12 0
      src/google/protobuf/extension_set_heavy.cc

+ 2 - 7
src/google/protobuf/extension_set.h

@@ -419,13 +419,8 @@ class LIBPROTOBUF_EXPORT ExtensionSet {
   // are never forced to serialize deterministically.
   // are never forced to serialize deterministically.
   uint8* SerializeWithCachedSizesToArray(int start_field_number,
   uint8* SerializeWithCachedSizesToArray(int start_field_number,
                                          int end_field_number,
                                          int end_field_number,
-                                         uint8* target) const {
-    return InternalSerializeWithCachedSizesToArray(
-        start_field_number, end_field_number, false, target);
-  }
-  uint8* SerializeMessageSetWithCachedSizesToArray(uint8* target) const {
-    return InternalSerializeMessageSetWithCachedSizesToArray(false, target);
-  }
+                                         uint8* target) const;
+  uint8* SerializeMessageSetWithCachedSizesToArray(uint8* target) const;
 
 
   // Returns the total serialized size of all the extensions.
   // Returns the total serialized size of all the extensions.
   int ByteSize() const;
   int ByteSize() const;

+ 12 - 0
src/google/protobuf/extension_set_heavy.cc

@@ -409,6 +409,18 @@ int ExtensionSet::Extension::SpaceUsedExcludingSelf() const {
 
 
 // The Serialize*ToArray methods are only needed in the heavy library, as
 // The Serialize*ToArray methods are only needed in the heavy library, as
 // the lite library only generates SerializeWithCachedSizes.
 // the lite library only generates SerializeWithCachedSizes.
+uint8* ExtensionSet::SerializeWithCachedSizesToArray(int start_field_number,
+                                                     int end_field_number,
+                                                     uint8* target) const {
+  return InternalSerializeWithCachedSizesToArray(
+      start_field_number, end_field_number, false, target);
+}
+
+uint8* ExtensionSet::SerializeMessageSetWithCachedSizesToArray(
+    uint8* target) const {
+  return InternalSerializeMessageSetWithCachedSizesToArray(false, target);
+}
+
 uint8* ExtensionSet::InternalSerializeWithCachedSizesToArray(
 uint8* ExtensionSet::InternalSerializeWithCachedSizesToArray(
     int start_field_number, int end_field_number,
     int start_field_number, int end_field_number,
     bool deterministic, uint8* target) const {
     bool deterministic, uint8* target) const {