summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-02 08:12:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-02 08:12:38 (GMT)
commitf00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5 (patch)
tree1601cdbe0f43c015bfcb743565108c36f488e67b /generic/tclUtf.c
parent1a543aa367940f7b7f4f8c6a8e83f673e2715611 (diff)
parent3ae95af52ca24414d723b827fc99cc1a2b94f778 (diff)
downloadtcl-f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5.zip
tcl-f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5.tar.gz
tcl-f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5.tar.bz2
Merge core-8-6-branch. This removes the work currently being done in "sebres-8-6-clock-speedup-cr1" branch, but that will be merged again as soon as the work is done.
All other changes in "trunk" since then (e.g. the INST_STR_CONCAT1 performance improvement, and the removal of SunOS-4) are retained.
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index eec4068..b33bf6a 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -292,9 +292,7 @@ Tcl_UtfToUniChar(
*/
*chPtr = (Tcl_UniChar) (((byte & 0x1F) << 6) | (src[1] & 0x3F));
- if ((*chPtr == 0) || (*chPtr > 0x7f)) {
- return 2;
- }
+ return 2;
}
/*
@@ -309,9 +307,7 @@ Tcl_UtfToUniChar(
*chPtr = (Tcl_UniChar) (((byte & 0x0F) << 12)
| ((src[1] & 0x3F) << 6) | (src[2] & 0x3F));
- if (*chPtr > 0x7ff) {
- return 3;
- }
+ return 3;
}
/*
@@ -328,9 +324,7 @@ Tcl_UtfToUniChar(
*chPtr = (Tcl_UniChar) (((byte & 0x0E) << 18) | ((src[1] & 0x3F) << 12)
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
- if ((*chPtr <= 0x10ffff) && (*chPtr > 0xffff)) {
- return 4;
- }
+ return 4;
}
/*