summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclVar.c13
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 83b65a0..df53649 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-03 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclVar.c (Tcl_ArrayObjCmd): More corrections for the 'unset'
+ subcommand.
+
2010-02-02 Andreas Kupries <andreask@activestate.com>
* generic/tclCompile.c: [Bug 2933089]: A literal sharing problem with
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 9977975..36db617 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.160.2.8 2010/02/02 16:13:46 dkf Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.160.2.9 2010/02/03 13:28:44 dkf Exp $
*/
#include "tclInt.h"
@@ -3218,9 +3218,7 @@ Tcl_ArrayObjCmd(
*/
if (varPtr2 == protectedVarPtr) {
- if (VarHashRefCount(varPtr2)-- == 1) {
- CleanupVar(varPtr2, varPtr);
- }
+ VarHashRefCount(varPtr2)--;
}
/*
@@ -3249,12 +3247,13 @@ Tcl_ArrayObjCmd(
*/
if (protectedVarPtr) {
- if (VarHashRefCount(protectedVarPtr)-- == 1) {
- CleanupVar(protectedVarPtr, varPtr);
- }
+ VarHashRefCount(protectedVarPtr)--;
+ CleanupVar(protectedVarPtr, varPtr);
}
return TCL_ERROR;
}
+ } else {
+ CleanupVar(varPtr2, varPtr);
}
}
break;