diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclExecute.c | 11 |
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); } /* |