summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix gcc warnings (discovered with latest mingw, based on gcc 4.6.1)jan.nijtmans2011-10-071-1/+1
|
* 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: restored Tcl_SetObjLength() side-effectdas2003-02-191-67/+45
| | | | | | | | | | | | | | | | | | | of always invalidating unicode rep (if the obj has a string rep). Added hasUnicode flag to String struct, allows decoupling of validity of unicode rep from buffer size allocated to it (improves memory allocation efficiency). [Bugs #686782, #671138, #635200] * macosx/Tcl.pbproj/project.pbxproj: * macosx/Makefile: reworked embedded build to no longer require relinking but to use install_name_tool instead to change the install_names for embedded frameworks. * macosx/Tcl.pbproj/project.pbxproj: preserve mod dates when running 'make install' to build framework (avoids bogus rebuilds of dependent frameworks because tcl headers appear changed). * tests/ioCmd.test (iocmd-1.8): fix failure when system encoding is utf-8: use iso8859-1 encoding explicitly.
* * generic/tclCompile.c (TclCompileExprWords): remove unusedMiguel Sofer2003-02-191-3/+2
| | | | | | | | | variable "range" [Bug 664743] * generic/tclExecute.c (ExprSrandFunc): remove unused variable "result" [Bug 664743] * generic/tclStringObj.c (UpdateStringOfString): remove unused variable "length" [Bug 664751] * tests/execute.test (execute-7.30): fix for [Bug 664775]
* generic/tclStringObj.c (Tcl_GetCharLength): perf tweakhobbs2003-02-151-7/+8
|
* * tests/stringObj.test:hobbs2003-02-111-7/+6
| | | | | * generic/tclStringObj.c (Tcl_GetCharLength): correct ascii char opt of 2002-11-11 to not stop early on \x00. [Bug #684699]
* stringObj unicode Tcl_SetObjLength fixesvincentdarley2003-01-241-83/+131
|
* execution trace, command trace and stringObj bug fixesvincentdarley2003-01-171-22/+48
|
* 3 small fixesvincentdarley2002-11-131-3/+3
|
* * generic/tclStringObj.c (Tcl_GetCharLength): optimize for thehobbs2002-11-121-5/+19
| | | | | | ascii char case. (Tcl_GetUniChar): remove unnecessary use of Tcl_UtfToUniChar. (FillUnicodeRep): Use TclUtfToUniChar.
* * Sought out and eliminated instances of CONST-casting that are nodgp2002-01-261-3/+3
| | | | longer needed after the TIP 27 effort.
* * typos and formattingdgp2002-01-081-4/+3
|
* * generic/tclCkalloc.c (MemoryCmd, TclFinalizeMemorySubsystem):dgp2001-12-281-4/+4
| | | | | | | | | | | | | | | | | | | Added the [memory onexit] command, intended to replace [checkmem]. * doc/DumpActiveMemory.3: * doc/memory.n: Updated documentation for [memory] and related matters. [Bug 487677] * mac/tclMacBOAMain.c (Tcl_Main, CheckmemCmd): Removed all the machinery for the [checkmem] command that is completely duplicated by code in generic/tclCkalloc.c. * generic/tclBinary.c: * generic/tclListObj.c: * generic/tclObj.c: * generic/tclStringObj.c: Removed references to [checkmem] in comments, referencing [memory active] instead, since it is documented.
* * generic/tcl.decls:hobbs2001-05-151-1/+58
| | | | | | | * generic/tclDecls.h: * generic/tclStubInit.c: * generic/tclStringObj.c (Tcl_GetUnicodeFromObj): new function to parallel Tcl_GetStringFromObj (fix of an API oversight).
* (TIP#27) Changed a number of Tcl API's to accept "CONST char*"Kevin B Kenny2001-04-041-20/+20
| | | | in place of simple "char*". (kennykb) [Patch #404026]
* * doc/Alloc.3: Added entries for Tcl_AttemptAlloc, Tcl_AttempRealloc.ericm2000-09-141-53/+137
| | | | | | | | | | | | | | | | | | | | | | | | * doc/StringObj.3: Added entry for Tcl_AttemptSetObjLength. * generic/tclDecls.h: * generic/tclStubInit.c: Regen'ed stubs files from new tcl.decls. * generic/tcl.decls: Added stubs for the Tcl_Attempt* memory allocators and for Tcl_AttemptSetObjLength. * generic/tcl.h: Added #define's for attemptckalloc, attemptckrealloc, which map to the Tcl_Attempt* memory allocators. * generic/tclCkalloc.c: Added non-panic'ing versions of Tcl_Alloc, Tcl_Realloc, etc.; these are called Tcl_AttemptAlloc, Tcl_AttemptRealloc, etc. These are used by Tcl_AttemptSetObjLength and the string obj append functions. * generic/tclStringObj.c: Modified string growth algorithm to use doubling algorithm as long as possible, and only fall back when that fails. Added Tcl_AttemptSetObjLength, and modified AppendUnicodeToUnicodeRep, AppendUtfToUtfRep, and Tcl_AppendStringsToObjVA to support this.
* * generic/tclStringObj.c: Applied patch from Gerhard Hintermayerericm2000-08-301-25/+90
| | | | | | to provide a more conservative string growth algorithm for strings larger than one megabyte; this allows more efficient use of memory for very large strings.
* * generic/tclStringObj.c (Tcl_AppendUnicodeToObj): removed dead code.hobbs2000-05-261-22/+9
| | | | | (AppendUnicodeToUnicodeRep) removed overallocation by extra sizeof(Tcl_UniChar) multiplier.
* minor comment correctionhobbs2000-05-081-2/+2
|
* * generic/tclProc.c: corrected error reporting for default casehobbs1999-11-191-9/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | at the global level for uplevel command. * generic/tclIOSock.c: changed int to size_t type for len in TclSockMinimumBuffers. * generic/tclCkalloc.c: fixed Tcl_DbCkfree to return a value on NULL input. [Bug: 3400] * generic/tclStringObj.c: fixed support for passing in negative length to Tcl_SetUnicodeObj, et al handling routines. [Bug: 3380] * doc/scan.n: * tests/scan.test: * generic/tclScan.c: finished support for inline scan by supporting XPG identifiers. * doc/http.n: * library/http2.1/http.tcl: added register and unregister commands to http:: package (better support for tls/SSL), as well as -type argument to http::geturl. [RFE: 2617] * generic/tclBasic.c: removed extra decr of numLevels in Tcl_EvalObjEx that could cause seg fault. (mjansen@wendt.de) * generic/tclEvent.c: fixed possible lack of MutexUnlock in Tcl_DeleteExitHandler [Bug: 3545]
* * generic/tclStringObj.c: fixed Tcl_AppendResultVA so it onlyhobbs1999-10-291-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | iterates once over the va_list (avoiding a memcpy of it, which is not portable). * generic/tclEnv.c: fixed possible ABR error in environ array * tests/scan.test: * generic/tclScan.c: added support for use of inline scan, XPG3 currently not included * tests/incr.test: * tests/set.test: * generic/tclCompCmds.c: fixed improper bytecode handling of 'eval {set array($unknownvar) 5}' (also for incr) * win/tclWinTest.c: added testvolumetype command, as atime is completely ignored for Windows FAT file systems * win/tclWinPort.h: added sys/utime.h to includes * unix/tclUnixPort.h: added utime.h to includes * doc/file.n: * tests/cmdAH.test: * generic/tclCmdAH.c: added time arguments to atime and mtime file command methods (support 'touch' functionality)
* 1999-09-01 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-09-021-5/+6
| | | | | | | | | | | | | * generic/tclParseExpr.c: changed '"' to '\"' to make FreeBSD happy [Bug: 2625] * generic/tclProc.c: moved static buf to better location and changed static msg that would overflow in ProcessProcResultCode [Bug: 2483] and added Tcl_DStringFree to Tcl_ProcObjCmd. Also reworked size of static buffers. * tests/stringObj.test: added test 9.11 * generic/tclStringObj.c: changed Tcl_AppendObjToObj to properly handle the 1-byte dest and mixed src case where both had had Unicode string len checks made on them. [Bug: 2678]
* fixed bug that cause bad memory read on Windowshershey1999-06-161-5/+5
|
* fixed bugs that kept windows from compiling.hershey1999-06-161-6/+6
|
* beefed up the string object testshershey1999-06-151-67/+73
|
* Improved the appendObj functions (uncomented the optimized code that washershey1999-06-151-31/+7
| | | | | | | | | present in the Unicode obj). Updated the teststringobj command to look in the correct location for the amount of space allocated for the UTF string rep. Note: one stringObj test is still failing; it reflects a change in that may not be undesirable...
* Merged String and Unicode object types. Added new functions tohershey1999-06-151-75/+1002
| | | | | | | | | the puplic API: Tcl_NewUnicodeObj, Tcl_SetUnicodeObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendUnicodeToObj. Note: some stringObj tests are still failing--the teststringobj command still needs to be updated.
* * tests/string.test:hershey1999-06-081-6/+3
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c (Tcl_SetVar2Ex): * generic/tclStringObj.c (Tcl_AppendObjToObj): * generic/tclCmdMZ.c (Tcl_StringObjCmd): optimized the string index, string length, string range, and append command in cases where the object's internal rep is a bytearray. Objects with other internal reps are converted to have the new unicode internal rep. * unix/Makefile.in: * win/Makefile.in: * win/Makefile.vc: * tests/unicode.test: * generic/tclInt.h: * generic/tclObj.c: * generic/tclUnicodeObj.c: added a new object type to store the unicode representation of a string. * generic/tclTestObj.c: added the objtype option to the testobj command. This option returns the name of the type of internal rep an object has.
* * generic/tclResult.c (Tcl_AppendResultVA):stanton1999-05-071-3/+4
| | | | | | * generic/tclStringObj.c (Tcl_AppendStringsToObjVA): Fixed to copy arglist using memcpy instead of assignment so it works properly on OS/390. [Bug: 1997]
* * mac/tclMacResource.c:stanton1999-04-281-7/+7
| | | | | | | | | * generic/tclListObj.c: * generic/tclObj.c: * generic/tclStringObj.c: Changed to avoid freeing the string representation before freeing the internal rep. This helps with debugging since the string rep will still be valid when the free proc is invoked.
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-11/+40
|
* Merged stubs changes into mainline for 8.0stanton1999-03-101-8/+36
|
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* Initial revisionrjohnson1998-03-261-0/+598