summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclStringObj.c: Revisions so that we avoid creatingdgp2009-02-142-51/+84
| | | | | | | | | | | | 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-142-7/+10
| | | | get blocked by MODULE_SCOPE limits.
* Const correctness fixes in the debug build.dgp2009-02-141-5/+5
|
* Remove all "register" keywords.dgp2009-02-131-20/+20
|
* New utility routine UnicodeLength(), to compute the length of unicodedgp2009-02-132-23/+24
| | | | | 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-133-153/+134
| | | | | | | | | | | 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-123-25/+37
| | | | | | * 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-122-32/+56
| | | | | | 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-123-5/+31
|
* Revise latest commit to better maintain stringPtr->numChars.dgp2009-02-121-8/+12
|
* * generic/tclStringObj.c: Re-implemented AppendUnicodeToUtfRepdgp2009-02-122-54/+84
| | | | | | 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.
* Removed casts now unnecessary after type of stringPtr->allocated changed.dgp2009-02-111-5/+5
|
* * generic/tclStringObj.c: Changed type of the 'allocated' fielddgp2009-02-112-4/+5
| | | | | | * 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-113-3/+10
| | | | | of the String struct from size_t to int since only int values are ever stored in it.
* - eliminate some unnessary type castsnijtmans2009-02-1013-167/+133
| | | | | - some internal const decorations - spacing
* - eliminate some unnessary type castsnijtmans2009-02-1019-110/+134
| | | | | - some internal const decorations - spacing
* fix [tcl-Bug 2502365] Building of head on HPUX isnijtmans2009-02-103-10/+22
| | | | broken when using the native CC.
* Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString,dgp2009-02-102-3/+3
| | | | which is only called when objPtr->bytes is NULL.
* Simplify Tcl_SetObjLength by removing unreachable code.dgp2009-02-102-10/+4
|
* Simplify SetStringFromAny() by removing unreachable and duplicate code.dgp2009-02-102-25/+14
|
* * generic/tclObj.c (Tcl_GetString): Added comments and validitydgp2009-02-103-12/+26
| | | | | | checks following the call to an UpdateStringProc. Simplify Tcl_AttemptSetObjLength by removing unreachable code.
* Convert all Tcl_InvalidateStringRep() calls into macros.dgp2009-02-102-7/+8
|
* * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*.dgp2009-02-102-6/+5
| | | | Restrict AppendUtfToUtfRep to non-negative length appends.
* * generic/tclStringObj.c (Tcl_GetUnicode*): Reduce code duplication.dgp2009-02-102-25/+6
|
* formattingdgp2009-02-101-3/+4
|
* fix [Bug 2555129] const compilernijtmans2009-02-092-3/+7
| | | | warning (as error) in tclCompile.c
* Improve error messages. [Bug 2573172]dkf2009-02-072-181/+205
|
* Fix for [Bug 2544618]Joe Mistachkin2009-02-063-19/+26
|
* Simplify the implementation of some commands now that the underlying stringdkf2009-02-052-101/+65
| | | | API knows more about bytearrays.
* Add missing castdkf2009-02-051-2/+2
|
* Fix [Bug 2568434]dkf2009-02-053-40/+39
|
* More/better/cleaner handling of the bytearray special casing for string ops.dkf2009-02-052-17/+87
|
* Improve efficiency of Tcl_AppendObjToObj's bytearray handling.dkf2009-02-052-1/+37
|
* comment typodgp2009-02-041-2/+2
|
* * generic/tclStringObj.c: Added overflow protections to thedgp2009-02-042-4/+18
| | | | | 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-042-11/+19
| | | | length of the result of [string repeat]. [Bug 2561746]
* - eliminate some unnessary type castsnijtmans2009-02-038-66/+76
| | | | | - some internal const decorations - spacing
* - eliminate some unnessary type castsnijtmans2009-02-0313-56/+72
| | | | | - some internal const decorations - spacing
* Added missing declaration of tclCmdNameTypedkf2009-02-031-1/+2
|
* Fix for [Bug 2558422] though this area is still a mess.dkf2009-02-032-9/+22
|
* * generic/tclStringObj.c (SetUnicodeObj): Corrected failure ofdgp2009-02-032-43/+32
| | | | | 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-032-8/+6
|
* * generic/tclInterp.c: Reverted the conversion of [interp] into andgp2009-02-024-974/+469
| | | | | | | | * tests/interp.test: ensemble. Such conversion is not necessary * tests/nre.test: (or even all that helpful) in the NRE-enabling of [interp invokehidden], and it has other implications -- including significant forkage of the 8.5 and 8.6 implementations -- that are better off avoided if there's no gain.
* * generic/tclStringObj.c (STRING_NOMEM): Add missing cast ofdgp2009-02-022-2/+6
| | | | NULL to (char *) that upsets some compilers. [Bug 2494093].
* * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): Addeddgp2009-02-022-1/+23
| | | | | | protections against callers asking for negative lengths. It is likely when this happens that an integer overflow is to blame. [Bug 2553906].
* Revert unreleased improvements to pkgs/itcl .dgp2009-02-021-1/+0
|
* no messagedavygrvy2009-02-011-0/+2
|
* * win/makefile.vc: Allow nmake flags such as -a (rebuilddavygrvy2009-02-011-5/+5
| | | | all) to pass down to the pkgs targets, too.
* no messagedavygrvy2009-02-011-0/+4
|
* remove accidental typodkf2009-01-311-2/+2
|