diff options
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 2b6f84c..81fd615 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -4211,11 +4211,12 @@ TclCompileSwitchCmd( numWords = 0; while (numBytes > 0) { - CONST char *start, *prevBytes = bytes; - int size, braced; + CONST char *prevBytes = bytes; + int literal; - if (TCL_OK != TclFindElement(NULL, bytes, numBytes, &start, - &bytes, &size, &braced)) { + if (TCL_OK != TclFindElement(NULL, bytes, numBytes, + &(bodyTokenArray[numWords].start), &bytes, + &(bodyTokenArray[numWords].size), &literal) || !literal) { abort: ckfree((char *) bodyToken); ckfree((char *) bodyTokenArray); @@ -4225,19 +4226,9 @@ TclCompileSwitchCmd( } bodyTokenArray[numWords].type = TCL_TOKEN_TEXT; - bodyTokenArray[numWords].start = start; - bodyTokenArray[numWords].size = size; bodyTokenArray[numWords].numComponents = 0; bodyToken[numWords] = bodyTokenArray + numWords; - if (!braced) { - while (size--) { - if (*start++ == '\\') { - goto abort; - } - } - } - /* * TIP #280: Now determine the line the list element starts on * (there is no need to do it earlier, due to the possibility of |