Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix bug in previous commit: Don't update stringPtr->numChars when doing a ↵ | jan.nijtmans | 2021-02-16 | 1 | -3/+0 |
| | | | | "string reverse", because TclUtfToUCS4() doesn't count surrogate pairs as 2 | ||||
* | Fix [22324bcbd]: string reverse is broken for Emoji. Thanks to Chrisian ↵ | jan.nijtmans | 2021-02-16 | 1 | -3/+41 |
| | | | | Werner for bug report and POC patch. | ||||
* | More usage of TclNewObj() in stead of Tcl_NewObj() and TclNewIntObj() in ↵ | jan.nijtmans | 2020-10-13 | 1 | -8/+11 |
| | | | | stead of Tcl_NewIntObj() | ||||
* | New internal function TclGetUCS4() only available when TCL_UTF_MAX=4. This ↵ | jan.nijtmans | 2020-05-04 | 1 | -2/+76 |
| | | | | fixes all "knownBug" testcases related to tip389. | ||||
* | Merge 8.5. Failing tests for now. To be remedied shortly. | dgp | 2020-04-16 | 1 | -3/+3 |
|\ | |||||
| * | Create and use macro TclUtfPrev for Tcl_UtfPrev. | dgp | 2020-04-16 | 1 | -3/+3 |
| | | |||||
* | | Merge 8.5. Failing tests highlight ticket [1b1f5f0b53]. | dgp | 2020-04-13 | 1 | -8/+16 |
|\ \ | |/ | |||||
| * | Bulletproof the calls to Tcl_UtfPrev in Tcl_AppendLimitedToObj. | dgp | 2020-04-09 | 1 | -10/+17 |
| | | |||||
* | | Fix [767e070d35]: Tcl_GetRange and Tcl_GetUniChar do not validate index inputs | jan.nijtmans | 2020-03-27 | 1 | -62/+115 |
| | | |||||
* | | Fix Valgrind problem reported as follow-up in [fc4393e9b0]. Since it happens ↵ | jan.nijtmans | 2019-12-08 | 1 | -2/+2 |
| | | | | | | | | only for TCL_UTF_MAX>3 it's not actully a 'bug' in 8.6, but it might be a corner-case not handled well in 8.7 | ||||
* | | Add /* FALLTHRU */ markers in various places (silencing possible GCC ↵ | jan.nijtmans | 2019-08-28 | 1 | -0/+2 |
| | | | | | | | | warnings). Eliminate some more "register" keywords. Eliminate (or silence) some unused function parameters. | ||||
* | | Merge 8.5 | jan.nijtmans | 2019-05-29 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Update some libtommath functions to the latest trunk versions. Small step ↵ | jan.nijtmans | 2019-05-29 | 1 | -2/+2 |
| | | | | | | | | | | forward in the upgrade to (upcoming) libtommath 1.2. Advantage: simplify Tcl code accessing those functions. | ||||
* | | end-of-line spacing | jan.nijtmans | 2019-05-24 | 1 | -1/+1 |
|\ \ | |/ | |||||
* | | Merge 8.5 | jan.nijtmans | 2019-05-14 | 1 | -5/+5 |
|\ \ | |/ | |||||
| * | DIGIT_BIT -> MP_DIGIT_BIT, since DIGIT_BIT is deprecated in future ↵ | jan.nijtmans | 2019-05-14 | 1 | -5/+5 |
| | | | | | | | | | | libtommath versions. So, better stop using it at all. Also add some other defines/typdefs for future libtommath compatibility. | ||||
* | | Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 ↵ | jan.nijtmans | 2019-03-02 | 1 | -3/+3 |
| | | | | | | | | conversions when handling surrogates. Only effective when compiling with -DTCL_UTF_MAX=4|6 (default: 3). Meant for benefit of Androwish. | ||||
* | | Fix some comments: "upper" -> "high" (when talking about surrogates) | jan.nijtmans | 2019-02-19 | 1 | -1/+1 |
| | | |||||
* | | amend after merge: 8.6th provide additionally an error-code (so missing ↵ | sebres | 2018-07-26 | 1 | -0/+1 |
| | | | | | | | | `errCode = "OVERFLOW"`) | ||||
* | | merge 8.5 - bug [d051b77fc1] fixed | sebres | 2018-07-26 | 1 | -0/+4 |
|\ \ | |/ | |||||
| * | closes [d051b77fc18d7340]: fixed segfault by integer overflow (if width by ↵ | sebres | 2018-07-26 | 1 | -0/+4 |
| | | | | | | | | format like "%4000000000g" overflows to negative values by scan of length) | ||||
| * | resolves some warnings by compiling with new gcc-versions (>= 7.x): | sebres | 2018-06-08 | 1 | -1/+1 |
| | | | | | | | | - '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] - passing argument 1 of 'Tcl_CreateExitHandler' from incompatible pointer type [-Wincompatible-pointer-types] | ||||
* | | Fix [53cad613d8]: TIP 389 implementation makes Tk tests font-4.12 and ↵ | jan.nijtmans | 2018-06-18 | 1 | -0/+6 |
| | | | | | | | | font-4.15 fail. One more situation in which high surrogate causes problem | ||||
* | | Avoid generating string representation when comparing the empty string. | pooryorick | 2018-05-05 | 1 | -0/+45 |
| | | |||||
* | | Fix behavior of Tcl_GetRange() and "string range" regarding surrogates, when ↵ | jan.nijtmans | 2018-01-11 | 1 | -1/+12 |
| | | | | | | | | Tcl is compiled with -DTCL_UTF_MAX=4. Partial fix for bug [11ae2be95dac9417]. Also, fix typo. | ||||
* | | [5808081213] Permit all bytearrays (including impure ones) to report length ↵ | dgp | 2017-11-30 | 1 | -4/+8 |
| | | | | | | | | without shimmering | ||||
* | | Make "scan %c" and the internal function ExtendUnicodeRepWithString() work ↵ | jan.nijtmans | 2017-11-09 | 1 | -3/+3 |
| | | | | | | | | as expected for TCL_UTF_MAX == 4 when handling characters > U+ffff. No effect when TCL_UTF_MAX == 3 or TCL_UTF_MAX == 6 | ||||
* | | Handle Unicode surrogates correctly in Tcl_AppendFormatToObj() and ↵ | jan.nijtmans | 2017-09-01 | 1 | -1/+1 |
| | | | | | | | | BuildCharSet(). Only makes a difference for TCL_UTF_MAX=4, when surrogates are used in the format string ... highly unlikely corner-case. | ||||
* | | merge core-8-6-branch | jan.nijtmans | 2017-07-03 | 1 | -10/+9 |
|\ \ | |||||
| * | | Eliminate use of (expensive) Tcl_UtfToUpper() from "format": Just generate ↵ | jan.nijtmans | 2017-06-28 | 1 | -10/+9 |
| | | | | | | | | | | | | the expected uppercase characters right away from the start. No change in functionality, just code optimization. | ||||
* | | | Better UTF-8 surrogate handling, only functional when TCL_UTF_MAX>3 | jan.nijtmans | 2017-06-08 | 1 | -2/+2 |
|/ / | |||||
* | | Tcl_UtfToUniChar() -> TclUtfToUniChar() in various places: No change in ↵ | jan.nijtmans | 2017-05-29 | 1 | -13/+13 |
| | | | | | | | | functionality, just faster if ASCII only strings are involved. | ||||
* | | Revert recent commit [80252e0aed]. TIP 237 is clear that %llu is invalid. | dgp | 2017-04-12 | 1 | -9/+5 |
| | | |||||
* | | Fix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu ↵ | jan.nijtmans | 2017-04-05 | 1 | -5/+9 |
| | | | | | | | | doesn't work. Also added new test-cases showing the expected behavior. | ||||
* | | Code optimization/reduction: If TCL_WIDE_INT_IS_LONG is defined, the ↵ | jan.nijtmans | 2017-04-03 | 1 | -5/+12 |
| | | | | | | | | variable useWide is always 0, so related code can be eliminated without loss of functionality. | ||||
* | | Add warning commentary making important assumptions explicit. | dgp | 2016-10-28 | 1 | -0/+2 |
|\ \ | |/ | |||||
| * | Add warning commentary making important assumptions explicit. | dgp | 2016-10-28 | 1 | -0/+2 |
| | | |||||
* | | Stop invading the String internals to work around a bug. Fix it instead. | dgp | 2016-10-13 | 1 | -0/+10 |
| | | |||||
* | | Factor out string internal rep definition so fix for [1af8de570511] is less ↵ | dkf | 2016-03-22 | 1 | -54/+1 |
| | | | | | | | | awful. | ||||
* | | Eliminate unnessessary end-of-line spacing. No functional change. | jan.nijtmans | 2015-10-04 | 1 | -8/+8 |
|\ \ | |/ | |||||
| * | Eliminate unnessessary end-of-line spacing. No functional change. | jan.nijtmans | 2015-10-04 | 1 | -2/+2 |
| | | |||||
* | | Merge the checkins of the dgp-read-bytes branch onto the trunk, up to | dgp | 2014-03-23 | 1 | -7/+48 |
|\ \ | |/ | | | | | | | | | and including checkin a1e82fb63e . Do not merge checkin bae1c688f2 which starts to take the dgp-read-bytes branch into directions apparently unfriendly to stacked channels, which tests for [chan push] on the trunk help us to detect. | ||||
| * | Revised ReadChars to restore an attempt to make sure we do not short read | dgp | 2014-02-06 | 1 | -0/+32 |
| | | | | | | | | | | because of a false notion of limited storage space. The test suite does not appear to demonstrate any case where this matters. Could be an incomplete test suite, or an example of pointless code. | ||||
| * | Revise the Tcl_Append* machinery to tolerate NULL bytes to append. | dgp | 2014-01-27 | 1 | -10/+19 |
| | | | | | | | | Then have ReadChars() use that machinery to resize buffer receiving input, rather than invent its own version. Simplify ReadChars() callers. | ||||
| * | Tcl_InvalidateStringRep -> TclInvalidateStringRep | jan.nijtmans | 2013-02-07 | 1 | -6/+6 |
| | | |||||
* | | [2992970] Restore safety of Tcl_AppendObjToObj(x, x) for bytearrays. | dgp | 2014-01-21 | 1 | -11/+31 |
|\ \ | |||||
| * | | [2992970] Restore the safety of Tcl_AppendObjToObj(x, x) for bytearrays. | dgp | 2014-01-15 | 1 | -11/+31 |
|/ / | | | | | | | | | | | | | | | | | Also moves overflow checking to TclAppendBytesToByteArray() and adds the ability to call TABTBA() with bytes==NULL, for appending unspecified bytes. That is, the string grows, but the new bytes are of undetermined value. Like Tcl_NewByteArrayObj(NULL, length) this option is useful for manipulating buffers. The TABTBA growth algorithm is also enhanced a bit, copying over a fuller implementation from GrowStringBuffer() in tclStringObj.c | ||||
* | | merge core-8-5-branch | jan.nijtmans | 2013-01-31 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Use twoPtrValue.ptr1 in stead of otherValuePtr everywhere. This is exactly ↵ | jan.nijtmans | 2013-01-31 | 1 | -2/+2 |
| | | | | | | | | the same field, but it allows twoPtrValue.ptr2 to be used for other purposes. | ||||
* | | Converted the memcpy() calls in append operations to memmove() calls. | dgp | 2012-02-09 | 1 | -2/+2 |
|\ \ | |/ | | | | | This adds safety in the case of overlapping copies, and improves performance on some benchmarks. |