Tcl Source Code

Check-in [8d1ff82057]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some "scan.test" test-cases when TCL_UTF_MAX=4. Wrongly resolved merge-conflict in previous cherry-pick merge.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 8d1ff82057679f3628ec1bdb6153f679e970de96f89b256b44a7c8d7e625b039
User & Date: jan.nijtmans 2019-03-02 16:35:26.049
Context
2019-03-08
11:34
3-way merge 8.6 - timerate is part of Tcl now (since TIP#527 got merged), conflicts resolved, merge-... check-in: 102958b94e user: sebres tags: sebres-8-6-event-perf-branch
2019-03-07
20:05
Merge forward to demonstrate the test fails after the bug arrived. Closed-Leaf check-in: 89f964c345 user: dgp tags: pkg-return-check
2019-03-06
01:42
[39fed4dae5] Minimal fix for volatile lifetime of string returned by Tcl_PkgRequire().

We need a te... check-in: bec67444fa user: dgp tags: bug-39fed4dae5

2019-03-05
16:59
integrate sebres-8-6-timerate, merge 8.5 (TIP#527, New measurement facilities in TCL: New command ti... check-in: 49f82cfd7f user: sebres tags: core-8-6-branch
2019-03-02
16:52
Minor optimization in UTF-8 handling, and add some comments describing how Tcl_UniCharToUtf() handle... check-in: 6e3632ede5 user: jan.nijtmans tags: core-8-branch
16:35
Fix some "scan.test" test-cases when TCL_UTF_MAX=4. Wrongly resolved merge-conflict in previous che... check-in: 8d1ff82057 user: jan.nijtmans tags: core-8-6-branch
16:04
Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 conversions when handling su... check-in: 9e1984c250 user: jan.nijtmans tags: core-8-6-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tclScan.c.
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
	    /*
	     * Scan a single Unicode character.
	     */

	    offset = TclUtfToUniChar(string, &sch);
	    i = (int)sch;
#if TCL_UTF_MAX == 4
	    if (!offset) {
		offset = TclUtfToUniChar(string, &sch);
		i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF);
	    }
#endif
	    string += offset;
	    if (!(flags & SCAN_SUPPRESS)) {
		objPtr = Tcl_NewIntObj(i);
		Tcl_IncrRefCount(objPtr);







|
|







884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
	    /*
	     * Scan a single Unicode character.
	     */

	    offset = TclUtfToUniChar(string, &sch);
	    i = (int)sch;
#if TCL_UTF_MAX == 4
	    if ((sch >= 0xD800) && (offset < 3)) {
		offset += TclUtfToUniChar(string+offset, &sch);
		i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF);
	    }
#endif
	    string += offset;
	    if (!(flags & SCAN_SUPPRESS)) {
		objPtr = Tcl_NewIntObj(i);
		Tcl_IncrRefCount(objPtr);