summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-03-29 15:00:48 +0200
committerJose <jose@zeroc.com>2016-03-29 15:00:48 +0200
commit8358545598906f014c4a3ccb78890e398ec08be0 (patch)
treedf70b3d40df38cd5e4029795598562aaa1e8a466 /python
parentBuild test controller with test targets (diff)
downloadice-8358545598906f014c4a3ccb78890e398ec08be0.tar.bz2
ice-8358545598906f014c4a3ccb78890e398ec08be0.tar.xz
ice-8358545598906f014c4a3ccb78890e398ec08be0.zip
Python VS2015 x64 build fixes
Diffstat (limited to 'python')
-rw-r--r--python/modules/IcePy/Current.cpp2
-rw-r--r--python/modules/IcePy/Operation.cpp8
-rw-r--r--python/modules/IcePy/Types.cpp6
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 01741df2ccb..47dab4af475 100644
--- a/python/modules/IcePy/Operation.cpp
+++ b/python/modules/IcePy/Operation.cpp
@@ -1035,7 +1035,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.
}
@@ -1654,7 +1654,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);
}
}
@@ -1665,7 +1665,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);
}
@@ -1677,7 +1677,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 151d400757a..895f47e1cba 100644
--- a/python/modules/IcePy/Types.cpp
+++ b/python/modules/IcePy/Types.cpp
@@ -726,7 +726,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
@@ -1688,7 +1688,7 @@ IcePy::SequenceInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCal
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);
}
@@ -2344,7 +2344,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);