summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2001-05-15 14:19:13 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2001-05-15 14:19:13 (GMT)
commit78889206e8a882e866563ebd0ff5e1309edb4288 (patch)
tree70a9f069004245b780b0f5791f52b78bffe4d3b1 /generic/tclNamesp.c
parent1badd23371684cf0dd67714e8a78f4c7ddd6e55a (diff)
downloadtcl-78889206e8a882e866563ebd0ff5e1309edb4288.zip
tcl-78889206e8a882e866563ebd0ff5e1309edb4288.tar.gz
tcl-78889206e8a882e866563ebd0ff5e1309edb4288.tar.bz2
Patch from [Bug: 231259]
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 8945e52..577a139 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.22 2001/04/25 09:44:49 dkf Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.23 2001/05/15 14:19:13 msofer Exp $
*/
#include "tclInt.h"
@@ -2283,6 +2283,17 @@ TclResetShadowedCmdRefs(interp, newCmdPtr)
hPtr = Tcl_FindHashEntry(&shadowNsPtr->cmdTable, cmdName);
if (hPtr != NULL) {
nsPtr->cmdRefEpoch++;
+
+ /*
+ * If the shadowed command was compiled to bytecodes, we
+ * invalidate all the bytecodes in nsPtr, to force a new
+ * compilation. We use the resolverEpoch to signal the need
+ * for a fresh compilation of every bytecode.
+ */
+
+ if ((((Command *) hPtr)->compileProc) != NULL) {
+ nsPtr->resolverEpoch++;
+ }
}
}