summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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