summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-09 10:57:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-09 10:57:36 (GMT)
commit0d7132ebb280216561e9dc82002d476155681934 (patch)
tree30e60dc015fa2fa44627a0f25afcd450b0df0b5c /generic/tclStringObj.c
parent2e06c053b45e281352f82c0a8884f1d90713cb4c (diff)
downloadtcl-0d7132ebb280216561e9dc82002d476155681934.zip
tcl-0d7132ebb280216561e9dc82002d476155681934.tar.gz
tcl-0d7132ebb280216561e9dc82002d476155681934.tar.bz2
Rename macro to ISCONTINUATION()
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 7ad47b8..e9f8c11 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -70,7 +70,7 @@ static void SetUnicodeObj(Tcl_Obj *objPtr,
static int UnicodeLength(const Tcl_UniChar *unicode);
static void UpdateStringOfString(Tcl_Obj *objPtr);
-#define ISCONTBYTEORLOWERSURROGATE(bytes) ((bytes) \
+#define ISCONTINUATION(bytes) ((bytes) \
&& ((((bytes)[0] & 0xC0) == 0x80) || (((bytes)[0] == '\xED') \
&& (((bytes)[1] & 0xF0) == 0xB0) && (((bytes)[2] & 0xC0) == 0x80))))
@@ -1225,7 +1225,7 @@ Tcl_AppendLimitedToObj(
/* If appended string starts with a continuation byte or a lower surrogate,
* force objPtr to unicode representation. See [7f1162a867] */
- if (ISCONTBYTEORLOWERSURROGATE(bytes)) {
+ if (ISCONTINUATION(bytes)) {
Tcl_GetUnicode(objPtr);
}
if (stringPtr->hasUnicode && stringPtr->numChars > 0) {
@@ -1428,8 +1428,8 @@ Tcl_AppendObjToObj(
/* If appended string starts with a continuation byte or a lower surrogate,
* force objPtr to unicode representation. See [7f1162a867]
* This fixes append-3.4, append-3.7 and utf-1.18 testcases. */
- if (ISCONTBYTEORLOWERSURROGATE(appendObjPtr->bytes)) {
- Tcl_GetUnicodeFromObj(objPtr, &numChars);
+ if (ISCONTINUATION(appendObjPtr->bytes)) {
+ Tcl_GetUnicode(objPtr);
}
/*
* If objPtr has a valid Unicode rep, then get a Unicode string from