diff options
author | dgp <dgp@users.sourceforge.net> | 2009-04-07 18:45:54 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2009-04-07 18:45:54 (GMT) |
commit | 6df16152535178264e5b70e09d4f5adf03fcd404 (patch) | |
tree | 7f9bc529c2ed87dfbc9db450d005d0d15d4ef6be | |
parent | f645033318ef3df0653babe269de18aebcca34f1 (diff) | |
download | tcl-6df16152535178264e5b70e09d4f5adf03fcd404.zip tcl-6df16152535178264e5b70e09d4f5adf03fcd404.tar.gz tcl-6df16152535178264e5b70e09d4f5adf03fcd404.tar.bz2 |
* generic/tclStringObj.c: Correction so that value of
TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment claims.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclStringObj.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2009-04-07 Don Porter <dgp@users.sourceforge.net> + + * generic/tclStringObj.c: Correction so that value of + TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment claims. + 2009-04-04 Donal K. Fellows <dkf@users.sf.net> * doc/vwait.n: [Bug 1910136]: Extend description and examples to make diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 716c272..7bd7526 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.121 2009/02/22 04:38:58 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.122 2009/04/07 18:45:54 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -264,7 +264,7 @@ GrowUnicodeBuffer( */ unsigned int limit = STRING_MAXCHARS - needed; unsigned int extra = needed - stringPtr->numChars - + TCL_GROWTH_MIN_ALLOC; + + TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_UniChar); int growth = (int) ((extra > limit) ? limit : extra); attempt = needed + growth; ptr = stringAttemptRealloc(stringPtr, attempt); |