summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
Commit message (Collapse)AuthorAgeFilesLines
* Add warning commentary making important assumptions explicit.dgp2016-10-281-0/+2
|\
| * Add warning commentary making important assumptions explicit.dgp2016-10-281-0/+2
| |\
| | * Add warning commentary making important assumptions explicit.dgp2016-10-281-0/+2
| | |
* | | Add obvious optimization to Tcl_GetCharLength().dgp2016-10-281-0/+9
| | |
* | | Merge INST_STR_REPLACE fixes and improvements.dgp2016-10-131-0/+10
|\ \ \ | |/ /
| * | Stop invading the String internals to work around a bug. Fix it instead.dgp2016-10-131-0/+10
| | |
* | | Micro-optimization: Use TclGetStringFromObj in stead of Tcl_GetStringFromObj ↵jan.nijtmans2016-07-081-1/+1
| | | | | | | | | | | | in many places where possible.
* | | Rename UtfCount() to TclUtfCount() and use it in more places. Suggested by ↵jan.nijtmans2016-04-051-2/+2
| | | | | | | | | | | | pspjuth here: [e99a79a32650e7e5]
* | | No longer a need to keep around 'revert to 8.5' code.dgp2016-03-241-80/+3
|/ /
* | Factor out string internal rep definition so fix for [1af8de570511] is less ↵dkf2016-03-221-54/+1
| | | | | | | | awful.
* | Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-8/+8
|\ \ | |/
| * Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-2/+2
| |
* | Merge the checkins of the dgp-read-bytes branch onto the trunk, up todgp2014-03-231-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 readdgp_may_be_pointlessdgp2014-02-061-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.dgp2014-01-271-10/+19
| | | | | | | | Then have ReadChars() use that machinery to resize buffer receiving input, rather than invent its own version. Simplify ReadChars() callers.
| * Tcl_InvalidateStringRep -> TclInvalidateStringRepjan.nijtmans2013-02-071-6/+6
| |
* | [2992970] Restore safety of Tcl_AppendObjToObj(x, x) for bytearrays.dgp2014-01-211-11/+31
|\ \
| * | [2992970] Restore the safety of Tcl_AppendObjToObj(x, x) for bytearrays.bug_2992970dgp2014-01-151-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-branchjan.nijtmans2013-01-311-2/+2
|\ \ | |/
| * Use twoPtrValue.ptr1 in stead of otherValuePtr everywhere. This is exactly ↵jan.nijtmans2013-01-311-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.dgp2012-02-091-2/+2
|\ \ | |/ | | | | This adds safety in the case of overlapping copies, and improves performance on some benchmarks.
| * 3484402 Correct Off-By-One error appending unicode. Thanks to Poor Yorick.dgp2012-02-091-2/+2
| |\ | | | | | | Also corrected test for when growth is needed.
| | * 3484402 Correct Off-By-One error appending unicode. Thanks to Poor Yorick.dgp2012-02-091-2/+2
| | |\ | | | | | | | | Also corrected test for when growth is needed.
| | | * 3484402 Correct Off-By-One error appending unicode. Thanks to Poor Yorick.bug_3484402dgp2012-02-071-4/+4
| | |/ | | | | | | | | | Also converted some memcpy() to memmove() to reliably handle overlapping copies, and corrected test for when growth is needed.
| | * Fix gcc warnings (discovered with latest mingw, based on gcc 4.6.1)jan.nijtmans2011-10-071-1/+1
| | |
| * | Backport fix for [Bug 2857044].dgp2011-04-271-0/+1
| | |
| * | Repair corruption in [string reverse] when string rep invalidation faileddgp2011-04-121-0/+1
| | | | | | | | | to also reset the bytes allocated for string rep to zero [Bug 3285472].
* | | [3396731] inline string reverse: minor further improvementsjan.nijtmans2011-08-291-32/+22
| | |
* | | Repaired the lost performance in the copy loop hotspots. Now meets or revert_3396731dgp2011-08-271-13/+12
| | | | | | | | | beats the former trunk (and current trunk by magnitudes) in tclbench.
* | | 3396731 Another rewrite of TclStringObjReverse() to make it adopt thedgp2011-08-251-70/+106
| | | | | | | | | | | | nijtmans approach for reversing the objPtr->bytes rep without losing performance.
* | | Set the defaults of all growth algorithm parameters based on one master value.dgp2011-05-121-10/+9
| | |
* | | Improved reaction to out of memory.dgp2011-04-281-1/+7
| | |
* | | TclFreeIntRep() cleanup.dgp2011-04-271-1/+0
| | |
* | | More generation of error codes ([format], [after], [trace], RE optimizer).dkf2011-04-041-2/+20
| | |
* | | Reduce the number of casts used to manage Tcl_Obj internal representations.dkf2011-03-261-3/+2
| | |
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-8/+8
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-61/+148
| | | | | | | | | the Engineering Manual.
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+1
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+1
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Typo in last commit broke tclStringObj.c build. Fixed.dgp2011-03-011-0/+1
| | |
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * generic/tclStringObj.c: (SetStringFromAny): avoid tramplingvasiljevic2010-04-021-2/+4
| | | | | | | | | | | | | | | over the tclEmptyStringRep->bytes as it is thread-shared (thx to Gustaf Neumann for the (hard) work of locating this one).
| | * * generic/tclStringObj.c (UpdateStringOfString): Added cast to fixandreas_kupries2009-04-221-2/+2
| | | | | | | | | | | | signed/unsigned mismatch breaking win32 symbol/debug build.
| | * UpdateStringOfString: matchup with core-8-5-branch changesdas2009-04-151-6/+6
| | |
| | * * generic/tclStringObj.c: AppendUnicodeToUnicodeRep faileddgp2009-04-151-1/+2
| | | | | | | | | | | | to set stringPtr->allocated to 0, leading to crashes.
| | * * generic/tclStringObj.c: Completed backports of fixes fordgp2009-04-071-66/+113
| | | | | | | | | | | | [Bug 2494093] and [Bug 2553906].
| | * * generic/tclStringObj.c: Added protections from invalid memorydgp2009-03-301-1/+32
| | | | | | | | | | | | | | | | | | | | | * generic/tclTestObj.c: accesses when we append (some part of) * tests/stringObj.test: a Tcl_Obj to itself. Added the appendself and appendself2 subcommands to the [teststringobj] testing command and added tests to the test suite. [Bug 2603158]
| | * * generic/tclStringObj.c: Test stringObj-6.9 checks thatdgp2009-03-211-2/+8
| | | | | | | | | | | | | | | * tests/stringObj.test: Tcl_AppendStringsToObj() no longer crashes when operating on a pure unicode value. [Bug 2597185]
| | * * generic/tclStringObj.c: Added overflow protections to thedgp2009-02-051-4/+29
| | | | | | | | | | | | | | | AppendUtfToUtfRep routine to either avoid invalid arguments and crashes, or to replace them with controlled panics. [Bug 2561794]
| | * * generic/tclStringObj.c (SetUnicodeObj): Corrected failure ofdgp2009-02-041-46/+34
| | | | | | | | | | | | | | | Tcl_SetUnicodeObj() to panic on a shared object. [Bug 2561488]. Also factored out common code to reduce duplication.