From 36a5a062dc66fd75bce7141f52a1567bf23738d5 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 28 Aug 2013 01:53:39 +0200 Subject: [PATCH] _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 --- Modules/_datetimemodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 1836310709..fb78e6d0fe 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); -- 2.50.0