diff options
| author | dgp <dgp@users.sourceforge.net> | 2016-12-02 19:02:41 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2016-12-02 19:02:41 (GMT) |
| commit | 32b482d3bfa6ea3df6a3a2dac787f8a64f998b02 (patch) | |
| tree | 49640560ad405973701b40b2daf94b9f519d8f0f /generic/tclBasic.c | |
| parent | 99d0691f570831e6350ab973640408fb4ba8a056 (diff) | |
| parent | 0714cd9321bd746c492495904d66208bad3f7520 (diff) | |
| download | tcl-32b482d3bfa6ea3df6a3a2dac787f8a64f998b02.zip tcl-32b482d3bfa6ea3df6a3a2dac787f8a64f998b02.tar.gz tcl-32b482d3bfa6ea3df6a3a2dac787f8a64f998b02.tar.bz2 | |
merge trunk
Diffstat (limited to 'generic/tclBasic.c')
| -rw-r--r-- | generic/tclBasic.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 19c9829..7ef671a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -2969,13 +2969,6 @@ 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 @@ -2997,6 +2990,14 @@ Tcl_DeleteCommandFromToken( Tcl_DeleteHashEntry(cmdPtr->hPtr); cmdPtr->hPtr = NULL; } + + /* + * Bump the command epoch counter. This will invalidate all cached + * references that point to this command. + */ + + cmdPtr->cmdEpoch++; + return 0; } @@ -3099,6 +3100,13 @@ Tcl_DeleteCommandFromToken( if (cmdPtr->hPtr != NULL) { Tcl_DeleteHashEntry(cmdPtr->hPtr); cmdPtr->hPtr = NULL; + + /* + * Bump the command epoch counter. This will invalidate all cached + * references that point to this command. + */ + + cmdPtr->cmdEpoch++; } /* |
