diff options
author | Kevin B Kenny <kennykb@acm.org> | 2005-04-25 21:37:17 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2005-04-25 21:37:17 (GMT) |
commit | fee601196f3a3d37e48ca7a5ea763cd132e49cd6 (patch) | |
tree | 132b0442d0fa8a33d0b625e1de318963e109bb78 /generic/tclExecute.c | |
parent | 6cf83d45073c586faca9948b305311770bcc49ca (diff) | |
download | tcl-fee601196f3a3d37e48ca7a5ea763cd132e49cd6.zip tcl-fee601196f3a3d37e48ca7a5ea763cd132e49cd6.tar.gz tcl-fee601196f3a3d37e48ca7a5ea763cd132e49cd6.tar.bz2 |
Merged with HEAD.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 75df800..a6d9442 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.167.2.10 2005/04/10 23:14:48 kennykb Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.167.2.11 2005/04/25 21:37:20 kennykb Exp $ */ #include "tclInt.h" @@ -4289,7 +4289,7 @@ TclExecuteByteCode(interp, codePtr) */ if ((tPtr == &tclIntType) || (tPtr == &tclBooleanType)) { i = valuePtr->internalRep.longValue; - TclNewLongObj(objResultPtr, -i) + TclNewLongObj(objResultPtr, -i); TRACE_WITH_OBJ(("%ld => ", i), objResultPtr); } else if (tPtr == &tclWideIntType) { TclGetWide(w,valuePtr); @@ -4329,7 +4329,7 @@ TclExecuteByteCode(interp, codePtr) i = (w == W0); TRACE_WITH_OBJ((LLD" => ", w), objResultPtr); } else { - i = (valuePtr->internalRep.doubleValue == 0.0) + i = (valuePtr->internalRep.doubleValue == 0.0); TRACE_WITH_OBJ(("%.6g => ", d), objResultPtr); } objResultPtr = eePtr->constants[i]; @@ -4639,7 +4639,10 @@ TclExecuteByteCode(interp, codePtr) * If some var in some var list still has a remaining list * element iterate one more time. Assign to var the next * element from its value list. We already checked above - * that each list temp holds a valid list object. + * that each list temp holds a valid list object (by calling + * Tcl_ListObjLength), but cannot rely on that check remaining + * valid: one list could have been shimmered as a side effect of + * setting a traced variable. */ if (continueLoop) { @@ -4650,7 +4653,7 @@ TclExecuteByteCode(interp, codePtr) listVarPtr = &(compiledLocals[listTmpIndex]); listPtr = listVarPtr->value.objPtr; - TclListObjGetElements(listPtr, listLen, elements); + Tcl_ListObjGetElements(interp, listPtr, &listLen, &elements); valIndex = (iterNum * numVars); for (j = 0; j < numVars; j++) { |