summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-12-13 13:46:05 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-12-13 13:46:05 (GMT)
commit0def411fa61fa15627a6b3b0cad45918f27ca675 (patch)
treec61ed8a22b6b92f71cd348e84938575bd46d0794 /generic/tclExecute.c
parentcb4e5f7e2d63b9da22c4dc5daccfa3be0a563df6 (diff)
downloadtcl-0def411fa61fa15627a6b3b0cad45918f27ca675.zip
tcl-0def411fa61fa15627a6b3b0cad45918f27ca675.tar.gz
tcl-0def411fa61fa15627a6b3b0cad45918f27ca675.tar.bz2
Fix [Bug 1379349]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 31870b5..f21a4e2 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -12,7 +12,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.222 2005/11/30 14:59:40 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.223 2005/12/13 13:46:12 dkf Exp $
*/
#include "tclInt.h"
@@ -5922,7 +5922,6 @@ TclExecuteByteCode(
searchPtr = (Tcl_DictSearch *) ckalloc(sizeof(Tcl_DictSearch));
result = Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr,
&valuePtr, &done);
- Tcl_DecrRefCount(dictPtr);
if (result != TCL_OK) {
ckfree((char *) searchPtr);
cleanup = 0;
@@ -5930,7 +5929,8 @@ TclExecuteByteCode(
}
TclNewObj(statePtr);
statePtr->typePtr = &dictIteratorType;
- statePtr->internalRep.otherValuePtr = (void *) searchPtr;
+ statePtr->internalRep.twoPtrValue.ptr1 = (void *) searchPtr;
+ statePtr->internalRep.twoPtrValue.ptr2 = (void *) dictPtr;
varPtr = compiledLocals + opnd;
if (varPtr->value.objPtr == NULL) {
TclSetVarScalar(compiledLocals + opnd);
@@ -5976,9 +5976,12 @@ TclExecuteByteCode(
Tcl_Panic("mis-issued dictDone!");
}
if (statePtr->typePtr == &dictIteratorType) {
- searchPtr = (Tcl_DictSearch *) statePtr->internalRep.otherValuePtr;
+ searchPtr = (Tcl_DictSearch *)
+ statePtr->internalRep.twoPtrValue.ptr1;
+ dictPtr = (Tcl_Obj *) statePtr->internalRep.twoPtrValue.ptr2;
Tcl_DictObjDone(searchPtr);
ckfree((char *) searchPtr);
+ Tcl_DecrRefCount(dictPtr);
}
/*