summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-05-25 19:25:55 (GMT)
committerhobbs <hobbs>2005-05-25 19:25:55 (GMT)
commita4cdc865d7714654fd17a2e9ebb03a26826daecc (patch)
treee8912d883300dab0b861e60824996d518cd9a5a1
parenta037b38a4b352395866f07d29197d83129a22526 (diff)
downloadtcl-a4cdc865d7714654fd17a2e9ebb03a26826daecc.zip
tcl-a4cdc865d7714654fd17a2e9ebb03a26826daecc.tar.gz
tcl-a4cdc865d7714654fd17a2e9ebb03a26826daecc.tar.bz2
* generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary cast
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclCmdMZ.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1138c21..4f94942 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
2005-05-25 Jeff Hobbs <jeffh@ActiveState.com>
- * unix/configure.in: ensure false Tcl.framework is only created
- with --enable-framework
+ * generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary cast
+
+ * unix/configure, unix/configure.in: ensure false Tcl.framework is
+ only created with --enable-framework
2005-05-24 Daniel Steffen <das@users.sourceforge.net>
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index d26f33c..0c9ff94 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.18 2005/05/24 04:18:54 das Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.19 2005/05/25 19:25:57 hobbs Exp $
*/
#include "tclInt.h"
@@ -2944,7 +2944,8 @@ Tcl_TimeObjCmd(dummy, interp, objc, objv)
totalMicroSec = ( ( (double) ( stop.sec - start.sec ) ) * 1.0e6
+ ( stop.usec - start.usec ) );
if (count <= 1) {
- objs[0] = Tcl_NewIntObj((count <= 0) ? 0 : totalMicroSec);
+ /* Use int obj since we know time is not fractional [Bug 1202178] */
+ objs[0] = Tcl_NewIntObj((count <= 0) ? 0 : (int) totalMicroSec);
} else {
objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
}