diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-04-14 10:17:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-04-14 10:17:31 (GMT) |
commit | e59db7e00e94f016d7c222aea7603dbbc8eecb4e (patch) | |
tree | 49eea3f1d82a1ac023889575a2e07d7643ad4b41 /generic/tclResult.c | |
parent | 2f98c2ea4d9b29dc3a797522a457585ac5865388 (diff) | |
parent | 920063dce71227734c3cd38eea46fd644ec37ded (diff) | |
download | tcl-e59db7e00e94f016d7c222aea7603dbbc8eecb4e.zip tcl-e59db7e00e94f016d7c222aea7603dbbc8eecb4e.tar.gz tcl-e59db7e00e94f016d7c222aea7603dbbc8eecb4e.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r-- | generic/tclResult.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c index 2336aad..baecf46 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -730,6 +730,7 @@ Tcl_AppendElement( char *dst; int size; int flags; + int quoteHash = 1; /* * If the string result is empty, move the object result to the string @@ -766,9 +767,17 @@ Tcl_AppendElement( * then this element will not lead a list, and need not have it's * leading '#' quoted. */ - + quoteHash = 0; + } else { + while ((--dst >= iPtr->appendResult) && TclIsSpaceProcM(*dst)) { + } + quoteHash = !TclNeedSpace(iPtr->appendResult, dst+1); + } + dst = iPtr->appendResult + iPtr->appendUsed; + if (!quoteHash) { flags |= TCL_DONT_QUOTE_HASH; } + iPtr->appendUsed += Tcl_ConvertElement(element, dst, flags); #endif /* !TCL_NO_DEPRECATED */ } |