From a4cdc865d7714654fd17a2e9ebb03a26826daecc Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 25 May 2005 19:25:55 +0000 Subject: * generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary cast --- ChangeLog | 6 ++++-- generic/tclCmdMZ.c | 5 +++-- 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 - * 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 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); } -- cgit v0.12