summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2021-04-23 19:26:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2021-04-23 19:26:14 (GMT)
commit29df9898621895b83a9f6512991c6685813b9cf2 (patch)
treec6016ff5dbeaf50be19bf61d4d5acc9df7b5e993 /generic/tclStringObj.c
parent8a0dc9c0b31c875284735bf0276bc989ac5db392 (diff)
parentaa1949c4f3d10fedc5209ff5c34a9f6d2442293e (diff)
downloadtcl-29df9898621895b83a9f6512991c6685813b9cf2.zip
tcl-29df9898621895b83a9f6512991c6685813b9cf2.tar.gz
tcl-29df9898621895b83a9f6512991c6685813b9cf2.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 6599246..73bbac0 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1155,6 +1155,7 @@ Tcl_AppendLimitedToObj(
* force objPtr to unicode representation. See [7f1162a867] */
if (bytes && ISCONTINUATION(bytes)) {
Tcl_GetUnicode(objPtr);
+ stringPtr = GET_STRING(objPtr);
}
if (stringPtr->hasUnicode && (stringPtr->numChars+1) > 1) {
AppendUtfToUnicodeRep(objPtr, bytes, toCopy);
@@ -1359,6 +1360,7 @@ Tcl_AppendObjToObj(
* This fixes append-3.4, append-3.7 and utf-1.18 testcases. */
if (ISCONTINUATION(TclGetString(appendObjPtr))) {
Tcl_GetUnicode(objPtr);
+ stringPtr = GET_STRING(objPtr);
}
/*
* If objPtr has a valid Unicode rep, then get a Unicode string from
@@ -3739,6 +3741,7 @@ TclStringReverse(
if (stringPtr->hasUnicode) {
Tcl_UniChar *from = Tcl_GetUnicode(objPtr);
+ stringPtr = GET_STRING(objPtr);
Tcl_UniChar *src = from + stringPtr->numChars;
Tcl_UniChar *to;
@@ -3751,6 +3754,7 @@ TclStringReverse(
objPtr = Tcl_NewUnicodeObj(&ch, 1);
Tcl_SetObjLength(objPtr, stringPtr->numChars);
to = Tcl_GetUnicode(objPtr);
+ stringPtr = GET_STRING(objPtr);
while (--src >= from) {
#if TCL_UTF_MAX < 4
ch = *src;