summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-07 13:34:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-07 13:34:41 (GMT)
commit126933978f910cb47d9bf73c99e1c9eacb57ed04 (patch)
tree8eefd8a982aaa8cb93031d34bb939751e833acb4 /generic/tclObj.c
parent5a3911451c1076781c85ddc9c055b12f7a718f37 (diff)
parentea21bb5de3ca09b64d101656f0613cd10f877aa6 (diff)
downloadtcl-126933978f910cb47d9bf73c99e1c9eacb57ed04.zip
tcl-126933978f910cb47d9bf73c99e1c9eacb57ed04.tar.gz
tcl-126933978f910cb47d9bf73c99e1c9eacb57ed04.tar.bz2
Fix [d4e7780ca1681cd095dbd81fe264feff75c988f7|d4e7780ca1]: "global" cmd literal sharing vs. per-interp resolvers
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index df17f13..d3f59ec 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4264,8 +4264,13 @@ TclSetCmdNameObj(
Command *cmdPtr) /* Points to Command structure that the
* CmdName object should refer to. */
{
+ register ResolvedCmdName *resPtr;
+
if (objPtr->typePtr == &tclCmdNameType) {
- return;
+ resPtr = objPtr->internalRep.twoPtrValue.ptr1;
+ if (resPtr != NULL && resPtr->cmdPtr == cmdPtr) {
+ return;
+ }
}
SetCmdNameObj(interp, objPtr, cmdPtr, NULL);