summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-07-31 14:57:09 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-07-31 14:57:09 (GMT)
commite96c13aa289ce583026f6b0549a9d0673df70769 (patch)
treeecd3e90ebc4c28e00b5800450da0f2cdff67e25a
parent3fecf16f4742a5408ef2ce6338913d2d89f23e1b (diff)
downloadtcl-e96c13aa289ce583026f6b0549a9d0673df70769.zip
tcl-e96c13aa289ce583026f6b0549a9d0673df70769.tar.gz
tcl-e96c13aa289ce583026f6b0549a9d0673df70769.tar.bz2
TclDecrRefCount under USE_THREAD_ALLOC: free intRep first, then string
rep [Bug 524802]
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclInt.h10
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 895b306..3efb602 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-07-31 Miguel Sofer <msofer@users.sourceforge.net>
+ * generic/tclInt.h (USE_THREAD_ALLOC): for unshared objects,
+ TclDecrRefCount now frees the internal rep before the string rep -
+ just like the non-macro Tcl_DecrRefCount/TclFreeObj [Bug 524802].
+ For the other allocators the fix was done on 2002-03-06.
+
+2002-07-31 Miguel Sofer <msofer@users.sourceforge.net>
+
* generic/tclInterp.c: signed/unsigned comparison warning fixed
(Vince Darley).
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 8fad788..9632bdd 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.108 2002/07/22 16:51:48 vincentdarley Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.109 2002/07/31 14:57:09 msofer Exp $
*/
#ifndef _TCLINT
@@ -2200,14 +2200,14 @@ EXTERN void TclThreadFreeObj _ANSI_ARGS_((Tcl_Obj *));
# define TclDecrRefCount(objPtr) \
if (--(objPtr)->refCount <= 0) { \
- if (((objPtr)->bytes != NULL) \
- && ((objPtr)->bytes != tclEmptyStringRep)) { \
- ckfree((char *) (objPtr)->bytes); \
- } \
if (((objPtr)->typePtr != NULL) \
&& ((objPtr)->typePtr->freeIntRepProc != NULL)) { \
(objPtr)->typePtr->freeIntRepProc(objPtr); \
} \
+ if (((objPtr)->bytes != NULL) \
+ && ((objPtr)->bytes != tclEmptyStringRep)) { \
+ ckfree((char *) (objPtr)->bytes); \
+ } \
TclThreadFreeObj((objPtr)); \
}