summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-01-14 06:10:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-01-14 06:10:03 (GMT)
commit00c2160b1e7f0bbd3d80f5c3551f2d5a1b7da3d2 (patch)
tree74339416fa37f1b677ad0c08083955cbaf7c3c4c
parentf44e5b6875ed72cdc2d55a087009478c0daa0738 (diff)
downloadtcl-00c2160b1e7f0bbd3d80f5c3551f2d5a1b7da3d2.zip
tcl-00c2160b1e7f0bbd3d80f5c3551f2d5a1b7da3d2.tar.gz
tcl-00c2160b1e7f0bbd3d80f5c3551f2d5a1b7da3d2.tar.bz2
* generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted
most of the substance of my 2009-01-12 commit. NULLing the objProc field of a Command when deleting it is important so that tests for certain classes of commands don't return false positives when applied to deleted command tokens. Overall change is now just replacement of a false comment with a true one.
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclBasic.c11
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b4890c..8e612a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-14 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted
+ most of the substance of my 2009-01-12 commit. NULLing the objProc
+ field of a Command when deleting it is important so that tests for
+ certain classes of commands don't return false positives when applied
+ to deleted command tokens. Overall change is now just replacement
+ of a false comment with a true one.
+
2009-01-13 Jan Nijtmans <nijtmans@users.sf.net>
* unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 3eab76a..e9aa6e1 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.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: tclBasic.c,v 1.382 2009/01/13 20:30:03 dkf Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.383 2009/01/14 06:10:04 dgp Exp $
*/
#include "tclInt.h"
@@ -3001,6 +3001,15 @@ Tcl_DeleteCommandFromToken(
}
/*
+ * A number of tests for particular kinds of commands are done by
+ * checking whether the objProc field holds a known value. Set the
+ * field to NULL so that such tests won't have false positives when
+ * applied to deleted commands.
+ */
+
+ cmdPtr->objProc = NULL;
+
+ /*
* Now free the Command structure, unless there is another reference to it
* from a CmdName Tcl object in some ByteCode code sequence. In that case,
* delay the cleanup until all references are either discarded (when a