diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-10-17 14:48:11 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-10-17 14:49:41 +0200 |
commit | 6037bfc7f825ebc6482a071fa2c78aa134356ec3 (patch) | |
tree | 6f87c3dfa6fdc6fd0faec76a7818046350b5cc34 /python/modules/IcePy | |
parent | Do not build IceStorm/persistent test with C++11 (diff) | |
download | ice-6037bfc7f825ebc6482a071fa2c78aa134356ec3.tar.bz2 ice-6037bfc7f825ebc6482a071fa2c78aa134356ec3.tar.xz ice-6037bfc7f825ebc6482a071fa2c78aa134356ec3.zip |
Fixed IcePy compilation issue with GCC 8.2 on Debian/sid and -O3
Diffstat (limited to 'python/modules/IcePy')
-rw-r--r-- | python/modules/IcePy/Util.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp index 5fb091dcc74..289fab58f93 100644 --- a/python/modules/IcePy/Util.cpp +++ b/python/modules/IcePy/Util.cpp @@ -73,6 +73,11 @@ getVersion(PyObject* p, T& v, const char* type) } v.major = static_cast<Ice::Byte>(m); } + else + { + v.major = 0; + } + if(minor.get()) { major = PyNumber_Long(minor.get()); @@ -89,6 +94,10 @@ getVersion(PyObject* p, T& v, const char* type) } v.minor = static_cast<Ice::Byte>(m); } + else + { + v.minor = 0; + } return true; } |