diff options
author | hobbs <hobbs> | 2001-07-16 23:14:13 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-07-16 23:14:13 (GMT) |
commit | 857ae17df742da7ac70bee24c00ca6ce568e9011 (patch) | |
tree | 7e9a0ee1031efe79c0206e863be0d5deafb8df3d /generic/tclObj.c | |
parent | 4a83040c8a15e5f30bc3a02f549e71ab156307e8 (diff) | |
download | tcl-857ae17df742da7ac70bee24c00ca6ce568e9011.zip tcl-857ae17df742da7ac70bee24c00ca6ce568e9011.tar.gz tcl-857ae17df742da7ac70bee24c00ca6ce568e9011.tar.bz2 |
2001-07-02 Jeff Hobbs <jeffh@ActiveState.com>
* tests/util.test: added util-4.6
* generic/tclUtil.c (Tcl_ConcatObj): Corrected walking backwards
over utf-8 chars. [Bug #227512]
2001-06-27 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclUtf.c (Tcl_UtfBackslash): Corrected backslash
handling of multibyte utf-8 chars. [Bug #217987]
* generic/tclCmdIL.c (InfoProcsCmd): fixed potential mem leak in
info procs that created objects without using them.
* generic/tclCompCmds.c (TclCompileStringCmd): fixed mem leak when
string command failed to parse the subcommand.
2001-05-22 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclObj.c (TclAllocateFreeObjects): simplified
objSizePlusPadding to use sizeof(Tcl_Obj) (max)
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 432cd4a..a463b3b 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.12.2.2 2001/04/06 01:32:34 hobbs Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.12.2.3 2001/07/16 23:14:13 hobbs Exp $ */ #include "tclInt.h" @@ -523,8 +523,7 @@ Tcl_DbNewObj(file, line) void TclAllocateFreeObjects() { - size_t objSizePlusPadding = sizeof(Tcl_Obj); - size_t bytesToAlloc = (OBJS_TO_ALLOC_EACH_TIME * objSizePlusPadding); + size_t bytesToAlloc = (OBJS_TO_ALLOC_EACH_TIME * sizeof(Tcl_Obj)); char *basePtr; register Tcl_Obj *prevPtr, *objPtr; register int i; @@ -534,7 +533,7 @@ TclAllocateFreeObjects() prevPtr = NULL; objPtr = (Tcl_Obj *) basePtr; - for (i = 0; i < OBJS_TO_ALLOC_EACH_TIME; i++) { + for (i = 0; i < OBJS_TO_ALLOC_EACH_TIME; i++) { objPtr->internalRep.otherValuePtr = (VOID *) prevPtr; prevPtr = objPtr; objPtr++; |