diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-16 09:11:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-16 09:11:54 (GMT) |
commit | 94c40f8b7100eb40e174041600f31ec60c4b7bc2 (patch) | |
tree | 5276bd593c3580934e1d5d617de496d08ac42d13 | |
parent | 90565904aa22260e8bdee126a55ed12fc12c94d6 (diff) | |
parent | 635b0327a6edcdd57f406ec19bf6f3659756c2ce (diff) | |
download | tcl-94c40f8b7100eb40e174041600f31ec60c4b7bc2.zip tcl-94c40f8b7100eb40e174041600f31ec60c4b7bc2.tar.gz tcl-94c40f8b7100eb40e174041600f31ec60c4b7bc2.tar.bz2 |
Merge 8.7
-rw-r--r-- | .github/workflows/onefiledist.yml | 2 | ||||
-rw-r--r-- | generic/tclUtil.c | 8 | ||||
-rw-r--r-- | generic/tclZipfs.c | 2 | ||||
-rw-r--r-- | tests/string.test | 18 |
4 files changed, 24 insertions, 6 deletions
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 158542a..df98bec 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -55,7 +55,7 @@ jobs: run: | mkdir 1dist touch generic/tclStubInit.c generic/tclOOStubInit.c || true - wget https://github.com/culler/macher/releases/download/v1.2/macher + wget https://github.com/culler/macher/releases/download/v1.3/macher sudo cp macher /usr/local/bin sudo chmod a+x /usr/local/bin/macher echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 1decb05..d5ec040 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1718,14 +1718,14 @@ TclTrimRight( */ do { - int qInc = TclUtfToUCS4(q, &ch2); + pInc = TclUtfToUCS4(q, &ch2); if (ch1 == ch2) { break; } - q += qInc; - bytesLeft -= qInc; + q += pInc; + bytesLeft -= pInc; } while (bytesLeft); if (bytesLeft == 0) { @@ -1771,7 +1771,7 @@ TclTrimLeft( * rely on (trim[numTrim] == '\0'). */ { const char *p = bytes; - int ch1, ch2; + int ch1, ch2; /* Empty strings -> nothing to do */ if ((numBytes == 0) || (numTrim == 0)) { diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 50653ff..0d646aa 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -3113,7 +3113,7 @@ TclZipfs_TclLibrary(void) { Tcl_Obj *vfsInitScript; int found; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(STATIC_BUILD) HMODULE hModule; WCHAR wName[MAX_PATH + LIBRARY_SIZE]; char dllName[(MAX_PATH + LIBRARY_SIZE) * 3]; diff --git a/tests/string.test b/tests/string.test index 50fcea7..b01d059 100644 --- a/tests/string.test +++ b/tests/string.test @@ -2086,6 +2086,24 @@ test string-24.15.$noComp {string reverse command - pure bytearray} { binary scan [run {tcl::string::reverse [binary format H* 010203]}] H* x set x } 030201 +test string-24.16.$noComp {string reverse command - surrogates} knownBug { + run {string reverse \u0444bulb\uD83D\uDE02} +} \uD83D\uDE02blub\u0444 +test string-24.17.$noComp {string reverse command - surrogates} knownBug { + run {string reverse \uD83D\uDE02hello\uD83D\uDE02} +} \uD83D\uDE02olleh\uD83D\uDE02 +test string-24.18.$noComp {string reverse command - surrogates} knownBug { + set s \u0444bulb\uD83D\uDE02 + # shim shimmery ... + string index $s 0 + run {string reverse $s} +} \uD83D\uDE02blub\u0444 +test string-24.19.$noComp {string reverse command - surrogates} knownBug { + set s \uD83D\uDE02hello\uD83D\uDE02 + # shim shimmery ... + string index $s 0 + run {string reverse $s} +} \uD83D\uDE02olleh\uD83D\uDE02 test string-25.1.$noComp {string is list} { run {string is list {a b c}} |