summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclInt.h9
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 <msofer@users.sf.net>
+ * generic/tclInt.h: remove redundant ops in TclNewStringObj macro
+
+2007-08-10 Miguel Sofer <msofer@users.sf.net>
+
* 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) \