summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-09-10 15:37:28 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-09-10 15:37:28 (GMT)
commit96940cf30dcaac664e3af1dca79b502c78a41248 (patch)
tree23e8e085425191fd2a22b6ef0d055735905170a7 /Modules
parent076b209ca4c1aca4feafa6f41a4051454973c2e6 (diff)
downloadcpython-96940cf30dcaac664e3af1dca79b502c78a41248.zip
cpython-96940cf30dcaac664e3af1dca79b502c78a41248.tar.gz
cpython-96940cf30dcaac664e3af1dca79b502c78a41248.tar.bz2
extract_time(): Squash compiler warning about possibly information-
losing implicit double->long cast.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 465cb51..90c0aac 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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. */