summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2005-11-13 01:38:15 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2005-11-13 01:38:15 (GMT)
commitd6c73ab77833ab9488ab9930031dd0851a931cb4 (patch)
tree74d49ed99b1068c86ff6e32b7160abf3f495d087 /generic/tclBasic.c
parenta01400deb8629465006faa71d0173f26abcb8e79 (diff)
downloadtcl-d6c73ab77833ab9488ab9930031dd0851a931cb4.zip
tcl-d6c73ab77833ab9488ab9930031dd0851a931cb4.tar.gz
tcl-d6c73ab77833ab9488ab9930031dd0851a931cb4.tar.bz2
fixing last commit, no Changelog entry
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 125afe0..6fc9dd3 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,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.180 2005/11/13 01:21:39 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.181 2005/11/13 01:38:15 msofer Exp $
*/
#include "tclInt.h"
@@ -2441,6 +2441,13 @@ Tcl_DeleteCommandFromToken(
Tcl_Command importCmd;
/*
+ * Bump the command epoch counter. This will invalidate all cached
+ * references that point to this command.
+ */
+
+ cmdPtr->cmdEpoch++;
+
+ /*
* The code here is tricky. We can't delete the hash table entry before
* invoking the deletion callback because there are cases where the
* deletion callback needs to invoke the command (e.g. object systems such
@@ -2470,8 +2477,7 @@ Tcl_DeleteCommandFromToken(
* may try to avoid this (renaming the command etc). Also traces and
* delete procs may try to delete the command themsevles. This flag
* declares that a delete is in progress and that recursive deletes should
- * be ignored. It also invalidates all cached references that point to
- * this command.
+ * be ignored.
*/
cmdPtr->flags |= CMD_IS_DELETED;