summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclStringObj.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ec0289f..fae2448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);