summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 92d3368..225b9cd 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.68 2004/07/06 21:08:36 dgp Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.69 2004/07/07 22:05:59 msofer Exp $
*/
#include "tclInt.h"
@@ -1118,6 +1118,15 @@ TclCompileScript(interp, script, numBytes, envPtr)
envPtr->literalArrayPtr[objIndex].objPtr,
cmdPtr);
}
+ if ((wordIdx == 0) && (parse.numWords == 1)) {
+ /*
+ * Single word script: unshare the command name to
+ * avoid shimmering between bytecode and cmdName
+ * representations [Bug 458361]
+ */
+
+ TclHideLiteral(interp, envPtr, objIndex);
+ }
} else {
objIndex = TclRegisterNewLiteral(envPtr,
tokenPtr[1].start, tokenPtr[1].size);