OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 namespace google { | 90 namespace google { |
91 namespace protobuf { | 91 namespace protobuf { |
92 namespace internal { | 92 namespace internal { |
93 | 93 |
94 // Some of these constants are macros rather than const ints so that they can | 94 // Some of these constants are macros rather than const ints so that they can |
95 // be used in #if directives. | 95 // be used in #if directives. |
96 | 96 |
97 // The current version, represented as a single integer to make comparison | 97 // The current version, represented as a single integer to make comparison |
98 // easier: major * 10^6 + minor * 10^3 + micro | 98 // easier: major * 10^6 + minor * 10^3 + micro |
99 #define GOOGLE_PROTOBUF_VERSION 3001000 | 99 #define GOOGLE_PROTOBUF_VERSION 3000000 |
100 | |
101 // A suffix string for alpha, beta or rc releases. Empty for stable releases. | |
102 #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" | |
103 | 100 |
104 // The minimum library version which works with the current version of the | 101 // The minimum library version which works with the current version of the |
105 // headers. | 102 // headers. |
106 #define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3001000 | 103 #define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3000000 |
107 | 104 |
108 // The minimum header version which works with the current version of | 105 // The minimum header version which works with the current version of |
109 // the library. This constant should only be used by protoc's C++ code | 106 // the library. This constant should only be used by protoc's C++ code |
110 // generator. | 107 // generator. |
111 static const int kMinHeaderVersionForLibrary = 3001000; | 108 static const int kMinHeaderVersionForLibrary = 3000000; |
112 | 109 |
113 // The minimum protoc version which works with the current version of the | 110 // The minimum protoc version which works with the current version of the |
114 // headers. | 111 // headers. |
115 #define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3001000 | 112 #define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3000000 |
116 | 113 |
117 // The minimum header version which works with the current version of | 114 // The minimum header version which works with the current version of |
118 // protoc. This constant should only be used in VerifyVersion(). | 115 // protoc. This constant should only be used in VerifyVersion(). |
119 static const int kMinHeaderVersionForProtoc = 3001000; | 116 static const int kMinHeaderVersionForProtoc = 3000000; |
120 | 117 |
121 // Verifies that the headers and libraries are compatible. Use the macro | 118 // Verifies that the headers and libraries are compatible. Use the macro |
122 // below to call this. | 119 // below to call this. |
123 void LIBPROTOBUF_EXPORT VerifyVersion(int headerVersion, int minLibraryVersion, | 120 void LIBPROTOBUF_EXPORT VerifyVersion(int headerVersion, int minLibraryVersion, |
124 const char* filename); | 121 const char* filename); |
125 | 122 |
126 // Converts a numeric version number to a string. | 123 // Converts a numeric version number to a string. |
127 std::string LIBPROTOBUF_EXPORT VersionString(int version); | 124 std::string LIBPROTOBUF_EXPORT VersionString(int version); |
128 | 125 |
129 } // namespace internal | 126 } // namespace internal |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 #endif | 216 #endif |
220 | 217 |
221 // This is at the end of the file instead of the beginning to work around a bug | 218 // This is at the end of the file instead of the beginning to work around a bug |
222 // in some versions of MSVC. | 219 // in some versions of MSVC. |
223 using namespace std; // Don't do this at home, kids. | 220 using namespace std; // Don't do this at home, kids. |
224 | 221 |
225 } // namespace protobuf | 222 } // namespace protobuf |
226 } // namespace google | 223 } // namespace google |
227 | 224 |
228 #endif // GOOGLE_PROTOBUF_COMMON_H__ | 225 #endif // GOOGLE_PROTOBUF_COMMON_H__ |
OLD | NEW |