diff options
author | dgp <dgp@users.sourceforge.net> | 2005-04-05 16:39:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-04-05 16:39:58 (GMT) |
commit | f67da7eac043413a7e37d04e4ff19fcb39bafc58 (patch) | |
tree | e9e94c52165c0e0c330127a5b3fc57a234100eba /generic/tclExecute.c | |
parent | ee6a3a70463ffbf998a1c7769fcfdfcae003fa56 (diff) | |
download | tcl-f67da7eac043413a7e37d04e4ff19fcb39bafc58.zip tcl-f67da7eac043413a7e37d04e4ff19fcb39bafc58.tar.gz tcl-f67da7eac043413a7e37d04e4ff19fcb39bafc58.tar.bz2 |
* generic/tclExecute.c (ExprSrandFunc): Replaced incursions into the
* generic/tclUtil.c (TclGetIntForIndex): intreps of numeric types
with simpler calls of Tcl_GetIntFromObj and Tcl_GetLongFromObj,
now that those routines are better behaved wrt shimmering.
[Patch 1177219]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 99e1d67..2809466 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.94.2.11 2005/02/01 17:26:32 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.94.2.12 2005/04/05 16:40:11 dgp Exp $ */ #include "tclInt.h" @@ -5555,11 +5555,7 @@ ExprSrandFunc(interp, eePtr, clientData) goto badValue; } - if (valuePtr->typePtr == &tclIntType) { - i = valuePtr->internalRep.longValue; - } else if (valuePtr->typePtr == &tclWideIntType) { - TclGetLongFromWide(i,valuePtr); - } else { + if (Tcl_GetLongFromObj(NULL, valuePtr, &i) != TCL_OK) { /* * At this point, the only other possible type is double */ |