diff options
author | dgp <dgp@noemail.net> | 2008-05-21 20:28:12 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2008-05-21 20:28:12 (GMT) |
commit | 2a3d1e1555bd778eed52e5e1656a90483bc26719 (patch) | |
tree | b351f874a6a36f55d1fe282b740f94088ed84169 /generic/tclParse.c | |
parent | 7954670b0b44354ba7c8899561d582a40177c105 (diff) | |
download | tcl-2a3d1e1555bd778eed52e5e1656a90483bc26719.zip tcl-2a3d1e1555bd778eed52e5e1656a90483bc26719.tar.gz tcl-2a3d1e1555bd778eed52e5e1656a90483bc26719.tar.bz2 |
* generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace()
* tests/parse.test (parse-15.60): routine has no mechanism to
return the "incomplete" status of "\\\n" so calling this routine
anywhere that can be reached within a Tcl_ParseCommand() call is a
mistake. In particular, ParseComment() must not use it. [Bug 1968882].
FossilOrigin-Name: 0dd3531d099d79fe3ad244d818fcf73362efbb6d
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index b4b872d..620f54e 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.63 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.64 2008/05/21 20:28:14 dgp Exp $ */ #include "tclInt.h" @@ -954,9 +954,12 @@ ParseComment( char type; int scanned; - scanned = TclParseAllWhiteSpace(p, numBytes); - p += scanned; - numBytes -= scanned; + do { + scanned = ParseWhiteSpace(p, numBytes, + &parsePtr->incomplete, &type); + p += scanned; + numBytes -= scanned; + } while (numBytes && (*p == '\n') && (p++,numBytes--)); if ((numBytes == 0) || (*p != '#')) { break; |