summaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclStringObj.c: Rewrite GrowStringBuffer() so that itdgp2009-02-181-0/+7
| | | | | | | | has parallel structure with GrowUnicodeBuffer(). The revision permits allocation attempts to continue all the way up to failure, with no gap. It also directly manipulates the String and Tcl_Obj internals instead of inefficiently operating via Tcl_*SetObjLength() with all of its extra protections and underdocumented special cases.
* * generic/tclStringObj.c: Another round of simplification ondgp2009-02-181-0/+5
| | | | the allocation macros.
* * generic/tclStringObj.c: Pare back the length of the unicodedgp2009-02-171-0/+7
| | | | | | | | array in a non-extended String struct to one Tcl_UniChar, meant to hold the terminating NUL character. Non-empty unicode strings are then stored by extending the String struct by stringPtr->maxChars additional slots in that array with sizeof(Tcl_UniChar) bytes per slot. This revision makes the allocation macros much simpler.
* * generic/tclStringObj.c: Factor out common GrowUnicodeBuffer()dgp2009-02-171-0/+3
| | | | and solve overflow and growth algorithm fallbacks in it.
* * win/tcl.m4, win/configure: Check if cl groks _WIN64 already tohobbs2009-02-171-0/+6
| | | | | avoid CC manipulation that can screw up later configure checks. Use 'd'ebug runtime in 64-bit builds.
* * generic/tclStringObj.c: Factor out common GrowStringBuffer().dgp2009-02-171-0/+11
| | | | | | | | | | | * generic/tclStringObj.c: Convert Tcl_AppendStringsToObj into * tests/stringObj.test: a radically simpler implementation where we just loop over calls to Tcl_AppendToObj. This fixes [Bug 2597185]. It also creates a *** POTENTIAL INCOMPATIBILITY *** in that T_ASTO can now allocate more space than is strictly required, like all the other Tcl_Append* routines. The incompatibility was detected by test stringObj-6.5, which I've updated to reflect the new behavior.
* * generic/tclStringObj.c: Revise buffer growth implementationdgp2009-02-171-8/+14
| | | | | | | in ExtendStringRepWithUnicode. Use cheap checks to determine that no reallocation is necessary without cost of computing the precise number of bytes needed. Also make use of the string growth algortihm in the case of repeated appends.
* fix [Feature Request 2605263] use officialnijtmans2009-02-161-0/+2
| | | | zlib build.
* fix [Feature Request 2605263] use officialnijtmans2009-02-161-1/+8
| | | | zlib build.
* fix [Bug 2605232] tdbc doesn't build whennijtmans2009-02-161-0/+5
| | | | Tcl is compiled with --disable-shared.
* * generic/tclTestObj.c: Replace the [teststringobj ualloc] testingdgp2009-02-161-0/+3
| | | | | * tests/stringObj.test: command with [teststringobj maxchars] and update the tests.
* * generic/tclStringObj.c: Added protections from invalid memorydgp2009-02-161-0/+6
| | | | | | | * 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: Factor out duplicate code fromdgp2009-02-151-0/+3
| | | | Tcl_AppendObjToObj.
* * generic/tclStringObj.c: Replace the 'size_t uallocated' fielddgp2009-02-151-0/+7
| | | | | | | | of the String struct, storing the number of bytes allocated to store the Tcl_UniChar array, with an 'int maxChars' field, storing the number of Tcl_UniChars that may be stored in the allocated space. This reduces memory requirement a small bit, and makes some range checks simpler to code.
* * generic/tclStringObj.c: Removed limitation indgp2009-02-151-0/+9
| | | | | | | | Tcl_AppendObjToObj where the char length of the result was only computed if the appended string was all single byte characters. This limitation was in place to dodge a bug in Tcl_GetUniChar. With that bug gone, we can take advantage of always recording the length of append results when we know it.
* * generic/tclStringObj.c: Revisions so that we avoid creatingdgp2009-02-141-0/+11
| | | | | | | | | | | | the strange representation of an empty string with objPtr->bytes == NULL and stringPtr->hasUnicode == 0. Instead in the situations where that was being created, create a traditional two-legged stork representation (objPtr->bytes = tclEmptyStringRep and stringPtr->hasUnicode = 1). In the situations where the strange rep was treated differently, continue to do so by testing stringPtr->numChars == 0 to detect it. These changes make the code more conventional so easier for new maintainers to pick up. Also sets up further simplifications.
* * generic/tclTestObj.c: Revise updates to [teststringobj] so we don'tdgp2009-02-141-0/+5
| | | | get blocked by MODULE_SCOPE limits.
* New utility routine UnicodeLength(), to compute the length of unicodedgp2009-02-131-0/+3
| | | | | buffer arguments when no length is passed in, with built-in overflow protection included. Update three callers to use it.
* * generic/tclStringObj.c: Rewrites of the routinesdgp2009-02-131-0/+10
| | | | | | | | | | | Tcl_GetCharLength, Tcl_GetUniChar, Tcl_GetUnicodeFromObj, Tcl_GetRange, and TclStringObjReverse to use the new macro, and to more simply and clearly split the cases depending on whether a valid unicode rep is present or needs to be created. * generic/tclInt.h: New macro TclNumUtfChars meant to be a faster replacement for a full Tcl_NumUtfChars() call when the string has all single-byte characters.
* * generic/tclStringObj.c: Simplified Tcl_GetCharLength bydgp2009-02-121-0/+5
| | | | | | * generic/tclTestObj.c: removing code that did nothing. Added early returns from Tcl_*SetObjLength when the desired length is already present; adapted test command to the change.
* * generic/tclStringObj.c: Re-implemented AppendUtfToUnicodeRepdgp2009-02-121-0/+7
| | | | | | so that we no longer pass through Tcl_DStrings which have their own sets of problems when lengths overflow the int range. Now AUTUR and FillUnicodeRep share a common core routine.
* Fix tricky point that meant it was next to impossible to extend [oo::define].dkf2009-02-121-0/+7
|
* * generic/tclStringObj.c: Re-implemented AppendUnicodeToUtfRepdgp2009-02-121-0/+5
| | | | | | so that we no longer pass through Tcl_DStrings which have their own sets of problems when lengths overflow the int range. Now AUTUR and UpdateStringOfString share a common core routine.
* * generic/tclStringObj.c: Changed type of the 'allocated' fielddgp2009-02-111-2/+3
| | | | | | * generic/tclTestObj.c: of the String struct (and the TestString counterpart) from size_t to int since only int values are ever stored in it.
* * generic/tclStringObj.c: Changed type of the 'allocated' fielddgp2009-02-111-0/+6
| | | | | of the String struct from size_t to int since only int values are ever stored in it.
* - eliminate some unnessary type castsnijtmans2009-02-101-4/+16
| | | | | - some internal const decorations - spacing
* - eliminate some unnessary type castsnijtmans2009-02-101-0/+20
| | | | | - some internal const decorations - spacing
* fix [tcl-Bug 2502365] Building of head on HPUX isnijtmans2009-02-101-0/+6
| | | | broken when using the native CC.
* Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString,dgp2009-02-101-0/+2
| | | | which is only called when objPtr->bytes is NULL.
* Simplify Tcl_SetObjLength by removing unreachable code.dgp2009-02-101-0/+1
|
* Simplify SetStringFromAny() by removing unreachable and duplicate code.dgp2009-02-101-0/+1
|
* * generic/tclObj.c (Tcl_GetString): Added comments and validitydgp2009-02-101-0/+4
| | | | | | checks following the call to an UpdateStringProc. Simplify Tcl_AttemptSetObjLength by removing unreachable code.
* Convert all Tcl_InvalidateStringRep() calls into macros.dgp2009-02-101-0/+1
|
* * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*.dgp2009-02-101-1/+2
| | | | Restrict AppendUtfToUtfRep to non-negative length appends.
* * generic/tclStringObj.c (Tcl_GetUnicode*): Reduce code duplication.dgp2009-02-101-0/+4
|
* formattingdgp2009-02-101-3/+4
|
* fix [Bug 2555129] const compilernijtmans2009-02-091-0/+4
| | | | warning (as error) in tclCompile.c
* Improve error messages. [Bug 2573172]dkf2009-02-071-0/+7
|
* Fix for [Bug 2544618]Joe Mistachkin2009-02-061-0/+7
|
* Simplify the implementation of some commands now that the underlying stringdkf2009-02-051-2/+6
| | | | API knows more about bytearrays.
* Fix [Bug 2568434]dkf2009-02-051-0/+3
|
* More/better/cleaner handling of the bytearray special casing for string ops.dkf2009-02-051-3/+5
|
* Improve efficiency of Tcl_AppendObjToObj's bytearray handling.dkf2009-02-051-0/+7
|
* * generic/tclStringObj.c: Added overflow protections to thedgp2009-02-041-0/+4
| | | | | AppendUtfToUtfRep routine to either avoid invalid arguments and crashes, or to replace them with controlled panics. [Bug 2561794]
* * generic/tclCmdMZ.c: Prevent crashes due to int overflow of thedgp2009-02-041-0/+5
| | | | length of the result of [string repeat]. [Bug 2561746]
* - eliminate some unnessary type castsnijtmans2009-02-031-0/+7
| | | | | - some internal const decorations - spacing
* - eliminate some unnessary type castsnijtmans2009-02-031-0/+15
| | | | | - some internal const decorations - spacing
* Fix for [Bug 2558422] though this area is still a mess.dkf2009-02-031-7/+12
|
* * generic/tclStringObj.c (SetUnicodeObj): Corrected failure ofdgp2009-02-031-0/+4
| | | | | Tcl_SetUnicodeObj() to panic on a shared object. [Bug 2561488]. Also factored out common code to reduce duplication.
* * generic/tclObj.c (Tcl_GetStringFromObj): Reduce code duplication.dgp2009-02-031-0/+4
|