summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-26 13:34:35 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-26 13:34:35 (GMT)
commit5a3304deeab333f9e6c0e2cdfedf23bd6a075d15 (patch)
tree706dde16ad4e3768a8762b5feeb1aa15d0cb2d60
parent8584690093094721708f417633f2ef9f0c6c8864 (diff)
downloadtcl-5a3304deeab333f9e6c0e2cdfedf23bd6a075d15.zip
tcl-5a3304deeab333f9e6c0e2cdfedf23bd6a075d15.tar.gz
tcl-5a3304deeab333f9e6c0e2cdfedf23bd6a075d15.tar.bz2
* generic/tclVar.c (UnsetVarStruct): more streamlining.
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclVar.c18
2 files changed, 12 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 25cc956..68d28c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-26 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclVar.c (UnsetVarStruct): more streamlining.
+
2007-06-25 Don Porter <dgp@users.sourceforge.net>
* generic/tclExecute.c: Safety checks to avoid crashes in the
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 74a13e2..d6049e9 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,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.142 2007/06/25 17:46:24 msofer Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.143 2007/06/26 13:34:36 msofer Exp $
*/
#include "tclInt.h"
@@ -2089,13 +2089,13 @@ UnsetVarStruct(
*/
if (reachable && (traced || TclIsVarArray(varPtr))) {
- dummyVar = *varPtr;
- dummyVarPtr = &dummyVar;
- TclSetVarUndefined(varPtr);
- TclSetVarScalar(varPtr);
- varPtr->value.objPtr = NULL; /* dummyVar points to any value object */
- varPtr->tracePtr = NULL;
- varPtr->searchPtr = NULL;
+ dummyVar = *varPtr;
+ dummyVarPtr = &dummyVar;
+ TclSetVarUndefined(varPtr);
+ TclSetVarScalar(varPtr);
+ varPtr->value.objPtr = NULL; /* dummyVar points to any value object */
+ varPtr->tracePtr = NULL;
+ varPtr->searchPtr = NULL;
} else {
dummyVarPtr = varPtr;
}
@@ -2185,8 +2185,6 @@ UnsetVarStruct(
if (dummyVarPtr == varPtr) {
TclSetVarUndefined(varPtr);
TclSetVarScalar(varPtr);
- varPtr->tracePtr = NULL;
- varPtr->searchPtr = NULL;
}
/*