summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-04-05 09:32:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-04-05 09:32:43 (GMT)
commit7032562591b12990b1b45ad8815bb30513a4d8e1 (patch)
tree9ad3277c4299b0e66d247459790081b349433166 /generic/tclStringObj.c
parent99ec9379ce6008e7e1cde6cd70228189bc79b34a (diff)
downloadtcl-7032562591b12990b1b45ad8815bb30513a4d8e1.zip
tcl-7032562591b12990b1b45ad8815bb30513a4d8e1.tar.gz
tcl-7032562591b12990b1b45ad8815bb30513a4d8e1.tar.bz2
Rename UtfCount() to TclUtfCount() and use it in more places. Suggested by pspjuth here: [e99a79a32650e7e5]
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index e718749..b480735 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2967,7 +2967,7 @@ ExtendStringRepWithUnicode(
*/
int i, origLength, size = 0;
- char *dst, buf[TCL_UTF_MAX];
+ char *dst;
String *stringPtr = GET_STRING(objPtr);
if (numChars < 0) {
@@ -2993,7 +2993,7 @@ ExtendStringRepWithUnicode(
}
for (i = 0; i < numChars && size >= 0; i++) {
- size += Tcl_UniCharToUtf((int) unicode[i], buf);
+ size += TclUtfCount(unicode[i]);
}
if (size < 0) {
Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX);