summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
Commit message (Collapse)AuthorAgeFilesLines
* Completed patch with mucho comments. Merge 8.5.bug_3173086dgp2011-05-101-0/+2
|
* 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.
| * * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limitdgp2009-01-091-4/+7
| | | | | | | | | | memory allocation requests to the sizes that can be supported by Tcl's memory allocation routines. [Bug 2494093].
| * * generic/tclStringObj.c (STRING_UALLOC): Added missing parensdgp2009-01-081-2/+2
| | | | | | | | | | required to get correct results out of things like STRING_UALLOC(num + append). [Bug 2494093].
| * * generic/tclParse.c (Tcl_ParseCommand): also return an error ifMiguel Sofer2006-09-241-3/+5
| | | | | | | | | | | | | | start==NULL and numBytes<0. This is coverity's bug #20 * generic/tclStringObj.c (STRING_SIZE): fix allocation for 0-length strings. This is coverity's bugs #54-5
| * * generic/tclStringObj.c: fixed incorrect handling of internal repMiguel Sofer2006-01-231-2/+2
| | | | | | | | in Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth.
* | * 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: Fix array overrun in test format-1.12dgp2010-03-291-2/+2
| | | | | | | | caught by valgrind testing.
* | [Bug 2932421]: Make [format] less likely to smash intreps.dkf2010-01-181-21/+33
| |
* | * generic/tclStringObj.c: A few more string overflow cases indgp2009-08-271-3/+13
| | | | | | | | [format]. [Bug 2845535]
* | * generic/tclStringObj.c: Corrected failure to grow bufferdgp2009-07-311-1/+4
| | | | | | | | | | * tests/format.test: when format spec request large width floating point values. Thanks to Clemens Misch. [Bug 2830354]
* | fix 64bit int <-> ptr cast warningsdas2009-07-151-2/+2
| |
* | Cast wide integer to int conversion and some signed/unsigned conversions. ↵patthoyts2009-07-011-3/+3
| | | | | | | | (silence msvc6 warnings)
* | * generic/tclStringObj.c: sprintf() -> Tcl_ObjPrintf() conversion.dgp2009-06-151-5/+3
| |
* | * generic/tclStringObj.c: Revised [format] to not overflow thedgp2009-06-101-8/+68
| | | | | | | | | | | | | | integer calculations computing the length of the %ll formats of really big integers. Also added protections so that [format]s that would produce results overflowing the maximum string length of Tcl values throw a normal Tcl error instead of a panic. [Bug 2801413]
* | * generic/tclStringObj.c: AppendUnicodeToUnicodeRep failedcore_8_5_7dgp2009-04-151-1/+2
| | | | | | | | to set stringPtr->allocated to 0, leading to crashes.
* | silence warning preventing symbols build with msvc6 (signed/unsigned comparison)patthoyts2009-04-101-2/+2
| |
* | * generic/tclStringObj.c (UpdateStringOfString): Fix bug detecteddgp2009-04-101-3/+3
| | | | | | | | by compiler warning about undefined "dst".
* | * generic/tclStringObj.c: Completed backports of fixes fordgp2009-04-071-68/+112
| | | | | | | | [Bug 2494093] and [Bug 2553906].
* | * generic/tclStringObj.c: Added protections from invalid memorydgp2009-03-301-1/+33
| | | | | | | | | | | | | | * 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]
* | comment typodgp2009-02-041-2/+2
| |
* | * generic/tclStringObj.c (SetUnicodeObj): Corrected failure ofdgp2009-02-041-43/+28
| | | | | | | | | | Tcl_SetUnicodeObj() to panic on a shared object. [Bug 2561488]. Also factored out common code to reduce duplication.
* | * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limitdgp2009-01-091-4/+7
| | | | | | | | | | memory allocation requests to the sizes that can be supported by Tcl's memory allocation routines. [Bug 2494093].
* | * generic/tclStringObj.c (STRING_UALLOC): Added missing parensdgp2009-01-081-2/+2
| | | | | | | | | | required to get correct results out of things like STRING_UALLOC(num + append). [Bug 2494093].
* | * generic/tclStringObj.c (Tcl_AppendFormatToObj):dgp2008-04-071-3/+3
| | | | | | | | | | | | Fix [format {% d}] so that it behaves the same way as in 8.4 and as C's printf(). * tests/format.test: Add a test for '% d' and '%+d'.
* | * generic/tclStringObj.c (Tcl_AppendFormatToObj): [format %llx $big]dgp2008-02-281-1/+4
| | | | | | | | leaked an mp_int.
* | * generic/tclStringObj.c (Tcl_AppendFormatToObj): Correct failure todgp2008-01-101-4/+4
| | | | | | | | | | * tests/format.test: account for big.used == 0 corner case in the %ll(idox) format directives. [Bug 1867855].
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | More minor cleanupdkf2007-11-181-74/+69
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-17/+17
| | | | | | | | objTypes.
* | * generic/tclCmdMZ.c (STR_REVERSE): Implement the actualdgp2007-03-281-1/+83
| | | | | | | | | | | | | | | | | | | | | | [string reverse] command in terms of the new TclStringObjReverse() routine. * generic/tclInt.h (TclStringObjReverse): New internal routine * generic/tclStringObj.c (TclStringObjReverse): that implements the [string reverse] operation, making use of knowledge/surgery of the String intrep to minimize the number of allocs and copies needed to do the job.
* | * generic/tclExecute.c: More ckalloc -> ckrealloc conversions.dgp2007-03-211-10/+8
| | | | | | | | | | | | | | | | | | * generic/tclLiteral.c: * generic/tclNamesp.c: * generic/tclParse.c: * generic/tclPreserve.c: * generic/tclStringObj.c: * generic/tclUtil.c:
* | TIP#270 IMPLEMENTATIONdgp2006-11-151-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* | * generic/tclStringObj.c: Changed Tcl_ObjPrintf() response todgp2006-11-051-2/+3
| | | | | | | | | | an invalid format specifier string. No longer panics; now produces an error message as output.
* | * generic/tclCmdAH.c: Further revisions to produce the routinesdgp2006-11-021-91/+10
| | | | | | | | | | | | * generic/tclInt.h: TclFormat() and TclAppendFormatToObj() that * generic/tclNamesp.c: accept (objc, objv) arguments rather than * generic/tclStringObj.c: any varargs stuff.
* | * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* | * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-25/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c: