summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-08-27 23:53:39 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-08-27 23:53:39 (GMT)
commit36a5a062dc66fd75bce7141f52a1567bf23738d5 (patch)
tree308e8b1c0f99df60365cd108d665df633272a7cd /Modules
parentb9981ba680de8487ffa7ffb0ee216e82030e6304 (diff)
downloadcpython-36a5a062dc66fd75bce7141f52a1567bf23738d5.zip
cpython-36a5a062dc66fd75bce7141f52a1567bf23738d5.tar.gz
cpython-36a5a062dc66fd75bce7141f52a1567bf23738d5.tar.bz2
_datetimemodule.c: fix the compilation warning "conversion from 'double' to
'long', possible loss of data" in delta_new(), use an explicit cast from double to long
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_datetimemodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 1836310..fb78e6d 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -2160,7 +2160,7 @@ delta_new(PyTypeObject *type, PyObject *args, PyObject *kw)
whole_us = 2.0 * round((leftover_us + x_is_odd) * 0.5) - x_is_odd;
}
- temp = PyLong_FromLong(whole_us);
+ temp = PyLong_FromLong((long)whole_us);
if (temp == NULL) {
Py_DECREF(x);