summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 3b9dce6..d3465b0 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1765,13 +1765,7 @@ SetListFromAny(
* elements by counting the number of space characters in the list.
*/
- limit = string + length;
- estCount = 1;
- for (p = string; p < limit; p++) {
- if (isspace(UCHAR(*p))) { /* INTL: ISO space. */
- estCount++;
- }
- }
+ estCount = TclCountSpaceRuns(string, length, &limit) + 1;
/*
* Allocate a new List structure with enough room for "estCount" elements.