diff options
author | dgp <dgp@noemail.net> | 2011-03-03 21:07:17 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-03-03 21:07:17 (GMT) |
commit | 34633950d6efe653c31b2c52cc11043f6b0ad71a (patch) | |
tree | 94c6ec6f45a829d8ef54b008b42fda71118c1b35 /generic/tclIndexObj.c | |
parent | 2d3910dce7064027b02ac73b3d7d9f85bc967cee (diff) | |
download | tcl-34633950d6efe653c31b2c52cc11043f6b0ad71a.zip tcl-34633950d6efe653c31b2c52cc11043f6b0ad71a.tar.gz tcl-34633950d6efe653c31b2c52cc11043f6b0ad71a.tar.bz2 |
Significant rewrite of the Tcl*(Scan|Convert)*Element() system, and revisions
to the callers. Needs more work on comments, and testing to check for any
performance impact in either direction. Fixes reported bug.
FossilOrigin-Name: a142b240b3d0fb1e0757f103fd6129e80d93f0b4
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index af29363..dcedd4e 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -534,12 +534,13 @@ Tcl_WrongNumArgs( } else { elementStr = TclGetStringFromObj(origObjv[i], &elemLen); } - len = Tcl_ScanCountedElement(elementStr, elemLen, &flags); + flags = 0; + len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { char *quotedElementStr = TclStackAlloc(interp, (unsigned)len); - len = Tcl_ConvertCountedElement(elementStr, elemLen, + len = TclConvertElement(elementStr, elemLen, quotedElementStr, flags); Tcl_AppendToObj(objPtr, quotedElementStr, len); TclStackFree(interp, quotedElementStr); @@ -588,12 +589,13 @@ Tcl_WrongNumArgs( */ elementStr = TclGetStringFromObj(objv[i], &elemLen); - len = Tcl_ScanCountedElement(elementStr, elemLen, &flags); + flags = 0; + len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { char *quotedElementStr = TclStackAlloc(interp,(unsigned) len); - len = Tcl_ConvertCountedElement(elementStr, elemLen, + len = TclConvertElement(elementStr, elemLen, quotedElementStr, flags); Tcl_AppendToObj(objPtr, quotedElementStr, len); TclStackFree(interp, quotedElementStr); |