Kaydet (Commit) 36a5a062 authored tarafından Victor Stinner's avatar Victor Stinner

_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
üst b9981ba6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment