mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
extract_time(): Squash compiler warning about possibly information-
losing implicit double->long cast.
This commit is contained in:
parent
076b209ca4
commit
96940cf30d
1 changed files with 1 additions and 1 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue