diff options
author | dgp <dgp@users.sourceforge.net> | 2005-04-05 16:56:08 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-04-05 16:56:08 (GMT) |
commit | a413cb1b70f4d1bfdd0e22082d9b817c94e560fa (patch) | |
tree | f1db1f152fc987d1d0b25c57a3acc942167a6412 /generic/tclExecute.c | |
parent | 17ec5a7e8039b2fe845126a294c0073b3d55bf95 (diff) | |
download | tcl-a413cb1b70f4d1bfdd0e22082d9b817c94e560fa.zip tcl-a413cb1b70f4d1bfdd0e22082d9b817c94e560fa.tar.gz tcl-a413cb1b70f4d1bfdd0e22082d9b817c94e560fa.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 697ea08..7f90890 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.178 2005/04/04 10:12:51 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.179 2005/04/05 16:56:26 dgp Exp $ */ #include "tclInt.h" @@ -6146,11 +6146,7 @@ ExprSrandFunc(interp, tosPtr, clientData) return TCL_ERROR; } - 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 */ |