diff options
author | Michi Henning <michi@zeroc.com> | 2005-05-11 05:51:03 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-05-11 05:51:03 +0000 |
commit | 71e63707bacbcc90051eb303080ef538a29f5d6b (patch) | |
tree | 6d02e804ece68fb312447f0f2492803844255c21 /cpp/src/Ice/Initialize.cpp | |
parent | Fixed version check so major and minor version must match, and the caller's (diff) | |
download | ice-71e63707bacbcc90051eb303080ef538a29f5d6b.tar.bz2 ice-71e63707bacbcc90051eb303080ef538a29f5d6b.tar.xz ice-71e63707bacbcc90051eb303080ef538a29f5d6b.zip |
Fixed version check for generated code so we can actually use 2.1.0 code
against a 2.1.1 library.
Diffstat (limited to 'cpp/src/Ice/Initialize.cpp')
-rw-r--r-- | cpp/src/Ice/Initialize.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index dc98f7e775f..e0d690ffa2b 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -154,7 +154,18 @@ Ice::initializeWithProperties(int& argc, char* argv[], const PropertiesPtr& prop // // Major and minor version numbers must match. // + // + // Major and minor version numbers must match. + // if(version != ICE_INT_VERSION) + // + // The caller's patch level cannot be greater than library's patch level. (Patch level changes are + // backward-compatible, but not forward-compatible.) + // + if(version % 100 > ICE_INT_VERSION % 100) + { + throw VersionMismatchException(__FILE__, __LINE__); + } { throw VersionMismatchException(__FILE__, __LINE__); } |