summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-03-09 12:18:07 +0100
committerJose <jose@zeroc.com>2016-03-09 12:18:07 +0100
commit2bee7a5a32454c3e3f267a3173c7a71930fa63a6 (patch)
tree0764b1358b634ebe8ca79222ed20f95792ae3f9b /python
parenticegriddb Windows build fixes (diff)
downloadice-2bee7a5a32454c3e3f267a3173c7a71930fa63a6.tar.bz2
ice-2bee7a5a32454c3e3f267a3173c7a71930fa63a6.tar.xz
ice-2bee7a5a32454c3e3f267a3173c7a71930fa63a6.zip
isfinite not supported with VS 2012
Diffstat (limited to 'python')
-rw-r--r--python/modules/IcePy/Types.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp
index 37e9db0d9e3..151d400757a 100644
--- a/python/modules/IcePy/Types.cpp
+++ b/python/modules/IcePy/Types.cpp
@@ -726,7 +726,12 @@ 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()) || !isfinite(val);
+ return (val <= numeric_limits<float>::max() && val >= -numeric_limits<float>::max()) ||
+#if defined(_MSC_VER) && (_MSC_VER <= 1700)
+ !_finite(val);
+#else
+ !isfinite(val);
+#endif
}
break;