diff options
author | dgp <dgp@users.sourceforge.net> | 2009-01-14 06:10:03 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2009-01-14 06:10:03 (GMT) |
commit | 00c2160b1e7f0bbd3d80f5c3551f2d5a1b7da3d2 (patch) | |
tree | 74339416fa37f1b677ad0c08083955cbaf7c3c4c /generic/tclBasic.c | |
parent | f44e5b6875ed72cdc2d55a087009478c0daa0738 (diff) | |
download | tcl-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.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 |