diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | generic/tclBasic.c | 11 |
2 files changed, 19 insertions, 1 deletions
@@ -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 |