summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-21 09:36:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-21 09:36:35 (GMT)
commitae2f2b211d31070531913851b894e2665b544beb (patch)
treef85bb98792c720e90346badc16cb7db5dd867027 /generic/tclCompile.c
parent65d17884a3fc402968d737201112e8006e371434 (diff)
parent3b786ffebeb7769d34099ea7064532501dc6aee5 (diff)
downloadtcl-winFixes.zip
tcl-winFixes.tar.gz
tcl-winFixes.tar.bz2
merge core-8-6-branch. Undo changes to coffbase.txt (they cause overlap with Tk)winFixes
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index c0203dd..f6b3c52 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1781,9 +1781,17 @@ CompileCmdLiteral(
CompileEnv *envPtr)
{
int numBytes;
- const char *bytes = Tcl_GetStringFromObj(cmdObj, &numBytes);
- int cmdLitIdx = TclRegisterNewCmdLiteral(envPtr, bytes, numBytes);
- Command *cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, cmdObj);
+ const char *bytes;
+ Command *cmdPtr;
+ int cmdLitIdx, extraLiteralFlags = LITERAL_CMD_NAME;
+
+ cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, cmdObj);
+ if ((cmdPtr != NULL) && (cmdPtr->flags & CMD_VIA_RESOLVER)) {
+ extraLiteralFlags |= LITERAL_UNSHARED;
+ }
+
+ bytes = Tcl_GetStringFromObj(cmdObj, &numBytes);
+ cmdLitIdx = TclRegisterLiteral(envPtr, (char *)bytes, numBytes, extraLiteralFlags);
if (cmdPtr) {
TclSetCmdNameObj(interp, TclFetchLiteral(envPtr, cmdLitIdx), cmdPtr);