summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-08-11 21:48:21 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-08-11 21:48:21 (GMT)
commit6b79f6992ce81472621494c66d999cb6863d0c29 (patch)
tree43ac2dd9c467736a009018e1629cd22049e831f0
parent8cf0a4f7e51f09188275ae72e26f90d0a9a43e34 (diff)
downloadtcl-6b79f6992ce81472621494c66d999cb6863d0c29.zip
tcl-6b79f6992ce81472621494c66d999cb6863d0c29.tar.gz
tcl-6b79f6992ce81472621494c66d999cb6863d0c29.tar.bz2
* generic/tclInt.h: remove redundant ops in TclNewStringObj macro
-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) \