diff options
author | dgp <dgp@noemail.net> | 2011-05-02 17:36:27 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-05-02 17:36:27 (GMT) |
commit | 8c61d24fdc4ba989e1ad16445fe0be028ffe945a (patch) | |
tree | 6f65c0c47bdc92c47d2ef7ec544c6961aca11467 /generic/tclCmdMZ.c | |
parent | cbb19a69c6f78ac08e9ef00997d7ce2de3b751da (diff) | |
download | tcl-8c61d24fdc4ba989e1ad16445fe0be028ffe945a.zip tcl-8c61d24fdc4ba989e1ad16445fe0be028ffe945a.tar.gz tcl-8c61d24fdc4ba989e1ad16445fe0be028ffe945a.tar.bz2 |
Revised TclFindElement() interface.
The final argument had been bracePtr, the address of a boolean var, where
the caller can be told whether or not the parsed list element was enclosed
in braces. In practice, no callers really care about that. What the
callers really want to know is whether the list element value exists as a
literal substring of the string being parsed, or whether a call to
TclCopyAndCollpase() is needed to produce the list element value. Now
the final argument is changed to do what callers actually need. This is
a better fit for the calls in tclParse.c, where now a good deal of
post-processing checking for "naked backslashes" is no longer necessary.
***POTENTIAL INCOMPATIBILITY***
For any callers calling in via the internal stubs table who really do use
the final argument explicitly to check for the enclosing brace scenario.
Simply looking for the braces where they must be is the revision available
to those callers, and it will backport cleanly.
FossilOrigin-Name: 04d0ff20b9d7b9263bb7fd09e367b17560df5f72
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 5390cf0..60a9414 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -1621,7 +1621,7 @@ StringIsCmd( */ const char *elemStart, *nextElem; - int lenRemain, elemSize, hasBrace; + int lenRemain, elemSize; register const char *p; string1 = TclGetStringFromObj(objPtr, &length1); @@ -1630,7 +1630,7 @@ StringIsCmd( for (p=string1, lenRemain=length1; lenRemain > 0; p=nextElem, lenRemain=end-nextElem) { if (TCL_ERROR == TclFindElement(NULL, p, lenRemain, - &elemStart, &nextElem, &elemSize, &hasBrace)) { + &elemStart, &nextElem, &elemSize, NULL)) { Tcl_Obj *tmpStr; /* |