summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-20 09:30:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-20 09:30:02 (GMT)
commit1c8b2b280f3d85688ac53e997df447281672a44a (patch)
treed84b517e050859f5635eef156f6869f152c3de2a /generic/tclBasic.c
parentb8271467dc712230e7eecf2818f7232c2ebda8b4 (diff)
parent43b22f924faa4963e0238f2191f56270c8d90b81 (diff)
downloadtcl-1c8b2b280f3d85688ac53e997df447281672a44a.zip
tcl-1c8b2b280f3d85688ac53e997df447281672a44a.tar.gz
tcl-1c8b2b280f3d85688ac53e997df447281672a44a.tar.bz2
merge trunk (still has test failure in socket.test)
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index c1dd52d..81b3513 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -3024,13 +3024,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
@@ -3052,6 +3045,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;
}
@@ -3154,6 +3155,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++;
}
/*