Преглед изворни кода

Fix compile error on Cygwin, where int32 is typedefed to long instead of int, and the compiler can't figure out which overload of this method to use in that case.

kenton@google.com пре 16 година
родитељ
комит
1d4df6caa4
2 измењених фајлова са 4 додато и 0 уклоњено
  1. 2 0
      src/google/protobuf/stubs/common.cc
  2. 2 0
      src/google/protobuf/stubs/common.h

+ 2 - 0
src/google/protobuf/stubs/common.cc

@@ -145,6 +145,8 @@ DECLARE_STREAM_OPERATOR(const char*  , )
 DECLARE_STREAM_OPERATOR(char         , SimpleCtoa)
 DECLARE_STREAM_OPERATOR(char         , SimpleCtoa)
 DECLARE_STREAM_OPERATOR(int          , SimpleItoa)
 DECLARE_STREAM_OPERATOR(int          , SimpleItoa)
 DECLARE_STREAM_OPERATOR(uint         , SimpleItoa)
 DECLARE_STREAM_OPERATOR(uint         , SimpleItoa)
+DECLARE_STREAM_OPERATOR(long         , SimpleItoa)
+DECLARE_STREAM_OPERATOR(unsigned long, SimpleItoa)
 DECLARE_STREAM_OPERATOR(double       , SimpleDtoa)
 DECLARE_STREAM_OPERATOR(double       , SimpleDtoa)
 #undef DECLARE_STREAM_OPERATOR
 #undef DECLARE_STREAM_OPERATOR
 
 

+ 2 - 0
src/google/protobuf/stubs/common.h

@@ -586,6 +586,8 @@ class LIBPROTOBUF_EXPORT LogMessage {
   LogMessage& operator<<(char value);
   LogMessage& operator<<(char value);
   LogMessage& operator<<(int value);
   LogMessage& operator<<(int value);
   LogMessage& operator<<(uint value);
   LogMessage& operator<<(uint value);
+  LogMessage& operator<<(long value);
+  LogMessage& operator<<(unsigned long value);
   LogMessage& operator<<(double value);
   LogMessage& operator<<(double value);
 
 
  private:
  private: