From 6df16152535178264e5b70e09d4f5adf03fcd404 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 7 Apr 2009 18:45:54 +0000 Subject: * generic/tclStringObj.c: Correction so that value of TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment claims. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 4 ++-- 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 + + * 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 * 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); -- cgit v0.12