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)
commitb74823229102197226f39d91b52b146826567cf4 (patch)
tree8b3fcee2d834673ca87d7d3ccf003f43591ccfaf /generic/tclCompile.c
parentd35a5023da2f2221f48458a5e64fcee90f234d91 (diff)
downloadtcl-b74823229102197226f39d91b52b146826567cf4.zip
tcl-b74823229102197226f39d91b52b146826567cf4.tar.gz
tcl-b74823229102197226f39d91b52b146826567cf4.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);