summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 14:52:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 14:52:01 (GMT)
commit2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6 (patch)
tree8b3fcee2d834673ca87d7d3ccf003f43591ccfaf /generic/tclCompile.c
parente9e3981faf0495befa4c2914d59af0bd994ac23c (diff)
downloadtcl-2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6.zip
tcl-2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6.tar.gz
tcl-2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6.tar.bz2
some more clean-up
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index ee36bff..f6b3c52 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1783,17 +1783,15 @@ CompileCmdLiteral(
int numBytes;
const char *bytes;
Command *cmdPtr;
- int cmdLitIdx, extraLiteralFlags = 0;
+ int cmdLitIdx, extraLiteralFlags = LITERAL_CMD_NAME;
cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, cmdObj);
- if (cmdPtr != NULL) {
- if ((cmdPtr->flags & CMD_VIA_RESOLVER)) {
- extraLiteralFlags = LITERAL_UNSHARED;
- }
+ if ((cmdPtr != NULL) && (cmdPtr->flags & CMD_VIA_RESOLVER)) {
+ extraLiteralFlags |= LITERAL_UNSHARED;
}
bytes = Tcl_GetStringFromObj(cmdObj, &numBytes);
- cmdLitIdx = TclRegisterLiteral(envPtr, (char *)bytes, numBytes, extraLiteralFlags|LITERAL_CMD_NAME);
+ cmdLitIdx = TclRegisterLiteral(envPtr, (char *)bytes, numBytes, extraLiteralFlags);
if (cmdPtr) {
TclSetCmdNameObj(interp, TclFetchLiteral(envPtr, cmdLitIdx), cmdPtr);