From 6b79f6992ce81472621494c66d999cb6863d0c29 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 11 Aug 2007 21:48:21 +0000 Subject: * generic/tclInt.h: remove redundant ops in TclNewStringObj macro --- ChangeLog | 4 ++++ generic/tclInt.h | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b881c80..c9c8159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-08-10 Miguel Sofer + * generic/tclInt.h: remove redundant ops in TclNewStringObj macro + +2007-08-10 Miguel Sofer + * generic/tclInt.h: fix the TclSetVarNamespaceVar macro, was causing a leak. diff --git a/generic/tclInt.h b/generic/tclInt.h index 2fce67b..e050884 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.331 2007/08/10 18:40:24 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.332 2007/08/11 21:48:22 msofer Exp $ */ #ifndef _TCLINT @@ -3445,8 +3445,11 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, (objPtr)->typePtr = &tclDoubleType #define TclNewStringObj(objPtr, s, len) \ - TclNewObj(objPtr); \ - TclInitStringRep((objPtr), (s), (len)) + TclIncrObjsAllocated(); \ + TclAllocObjStorage(objPtr); \ + (objPtr)->refCount = 0; \ + TclInitStringRep((objPtr), (s), (len));\ + (objPtr)->typePtr = NULL #else /* TCL_MEM_DEBUG */ #define TclNewIntObj(objPtr, i) \ -- cgit v0.12