Commit c167c17d authored by Tim Peters's avatar Tim Peters

extract_time(): Squash compiler warning about possibly information-

losing implicit double->long cast.
parent 93e5f8c9
......@@ -1412,7 +1412,7 @@ extract_time(PyObject *t, long* sec, long* usec)
intval = PyInt_AsLong(intobj);
Py_DECREF(intobj);
*sec = intval;
*usec = (tval - intval) * 1e6;
*usec = (long)((tval - intval) * 1e6); /* can't exceed 1000000 */
if (*usec < 0)
/* If rounding gave us a negative number,
truncate. */
......
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