summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-03-03 21:07:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-03-03 21:07:17 (GMT)
commit3369c9129fa90ad0a083438bb7b066a1df3ee8d6 (patch)
tree94c6ec6f45a829d8ef54b008b42fda71118c1b35 /generic/tclIndexObj.c
parente729c2775a2779c6a58e56fd171dbee06bcc53d9 (diff)
downloadtcl-3369c9129fa90ad0a083438bb7b066a1df3ee8d6.zip
tcl-3369c9129fa90ad0a083438bb7b066a1df3ee8d6.tar.gz
tcl-3369c9129fa90ad0a083438bb7b066a1df3ee8d6.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.
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c10
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);