summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-04-07 18:45:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-04-07 18:45:54 (GMT)
commit6df16152535178264e5b70e09d4f5adf03fcd404 (patch)
tree7f9bc529c2ed87dfbc9db450d005d0d15d4ef6be /generic/tclStringObj.c
parentf645033318ef3df0653babe269de18aebcca34f1 (diff)
downloadtcl-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.
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c4
1 files changed, 2 insertions, 2 deletions
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);