diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-03-31 08:38:29 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-03-31 08:38:29 +0200 |
commit | 04c83affba981565fcca3b3bfa2a3d96ca331c81 (patch) | |
tree | 8cf749969ff9209645130bb8e4433d837c77c6d6 /python/modules | |
parent | Merge remote-tracking branch 'origin/3.6' (diff) | |
parent | Fixed Glacier2 bug which would cause hang on shutdown (diff) | |
download | ice-04c83affba981565fcca3b3bfa2a3d96ca331c81.tar.bz2 ice-04c83affba981565fcca3b3bfa2a3d96ca331c81.tar.xz ice-04c83affba981565fcca3b3bfa2a3d96ca331c81.zip |
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'python/modules')
-rw-r--r-- | python/modules/IcePy/Current.cpp | 2 | ||||
-rw-r--r-- | python/modules/IcePy/Operation.cpp | 8 | ||||
-rw-r--r-- | python/modules/IcePy/Types.cpp | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/python/modules/IcePy/Current.cpp b/python/modules/IcePy/Current.cpp index 9832d1913a6..7afb2461dd4 100644 --- a/python/modules/IcePy/Current.cpp +++ b/python/modules/IcePy/Current.cpp @@ -113,7 +113,7 @@ currentGetter(CurrentObject* self, void* closure) assert(self->current); - long field = reinterpret_cast<long>(closure); + Py_ssize_t field = reinterpret_cast<Py_ssize_t>(closure); switch(field) { case CURRENT_ADAPTER: diff --git a/python/modules/IcePy/Operation.cpp b/python/modules/IcePy/Operation.cpp index 9c8744b399b..6d4e3660fb2 100644 --- a/python/modules/IcePy/Operation.cpp +++ b/python/modules/IcePy/Operation.cpp @@ -1026,7 +1026,7 @@ void IcePy::ParamInfo::unmarshaled(PyObject* val, PyObject* target, void* closure) { assert(PyTuple_Check(target)); - long i = reinterpret_cast<long>(closure); + Py_ssize_t i = reinterpret_cast<Py_ssize_t>(closure); PyTuple_SET_ITEM(target, i, val); Py_INCREF(val); // PyTuple_SET_ITEM steals a reference. } @@ -1644,7 +1644,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: ParamInfoPtr info = *p; if(!info->optional) { - void* closure = reinterpret_cast<void*>(info->pos); + void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(info->pos)); info->type->unmarshal(&is, info, results.get(), closure, false, &info->metaData); } } @@ -1655,7 +1655,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: if(_op->returnType && !_op->returnType->optional) { assert(_op->returnType->pos == 0); - void* closure = reinterpret_cast<void*>(_op->returnType->pos); + void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(_op->returnType->pos)); _op->returnType->type->unmarshal(&is, _op->returnType, results.get(), closure, false, &_op->metaData); } @@ -1667,7 +1667,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: ParamInfoPtr info = *p; if(is.readOptional(info->tag, info->type->optionalFormat())) { - void* closure = reinterpret_cast<void*>(info->pos); + void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(info->pos)); info->type->unmarshal(&is, info, results.get(), closure, true, &info->metaData); } else diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp index 24fc0ae7c58..a0edca1a301 100644 --- a/python/modules/IcePy/Types.cpp +++ b/python/modules/IcePy/Types.cpp @@ -717,7 +717,7 @@ IcePy::PrimitiveInfo::validate(PyObject* p) { // Ensure double does not exceed maximum float value before casting double val = PyFloat_AsDouble(p); - return (val <= numeric_limits<float>::max() && val >= -numeric_limits<float>::max()) || + return (val <= numeric_limits<float>::max() && val >= -numeric_limits<float>::max()) || #if defined(_MSC_VER) && (_MSC_VER <= 1700) !_finite(val); #else @@ -1679,7 +1679,7 @@ IcePy::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& for(Ice::Int i = 0; i < sz; ++i) { - void* cl = reinterpret_cast<void*>(i); + void* cl = reinterpret_cast<void*>(static_cast<Py_ssize_t>(i)); elementType->unmarshal(is, sm, result.get(), cl, false); } @@ -2335,7 +2335,7 @@ IcePy::SequenceInfo::SequenceMapping::SequenceMapping(const Ice::StringSeq& meta void IcePy::SequenceInfo::SequenceMapping::unmarshaled(PyObject* val, PyObject* target, void* closure) { - long i = reinterpret_cast<long>(closure); + Py_ssize_t i = reinterpret_cast<Py_ssize_t>(closure); if(type == SEQ_DEFAULT || type == SEQ_LIST) { PyList_SET_ITEM(target, i, val); |