summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-12-06 03:58:56 (GMT)
committerhobbs <hobbs>2002-12-06 03:58:56 (GMT)
commit73dd4652419735a4cb922d3bacc0621637ceb5f0 (patch)
tree270caaf01e2b797b45f79bf4e43886307a20dce4
parent27a8d190cf465a8330ce472d21b87648811290ed (diff)
downloadtcl-73dd4652419735a4cb922d3bacc0621637ceb5f0.zip
tcl-73dd4652419735a4cb922d3bacc0621637ceb5f0.tar.gz
tcl-73dd4652419735a4cb922d3bacc0621637ceb5f0.tar.bz2
* generic/tclCompile.c (TclCleanupByteCode): when using
TCL_THREAD_LITERALS, do not worry about interp != NULL when cleaning up bytecodes.
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclCompile.c21
2 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a1e3aa..0f01c87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-05 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tclCompile.c (TclCleanupByteCode): when using
+ TCL_THREAD_LITERALS, do not worry about interp != NULL when
+ cleaning up bytecodes.
+
2002-12-05 Andreas Kupries <andreask@activestate.com>
* generic/tclCompile.c (TclCleanupByteCode): When encountering a
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 2ae53c4..f6b264a 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.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: tclCompile.c,v 1.20.2.1.2.7 2002/12/06 03:08:18 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.20.2.1.2.8 2002/12/06 03:58:58 hobbs Exp $
*/
#include "tclInt.h"
@@ -511,10 +511,11 @@ TclCleanupByteCode(codePtr)
register ByteCodeData *bcDataPtr = codePtr->bcDataPtr;
#ifdef TCL_COMPILE_STATS
- if (interp != NULL) {
#ifdef TCL_THREAD_LITERALS
+ if (1) {
ByteCodeStats *statsPtr = TclGlobalByteCodeStats();
#else
+ if (interp != NULL) {
ByteCodeStats *statsPtr = &((Interp *) interp)->stats;
#endif
Tcl_Time destroyTime;
@@ -613,18 +614,22 @@ TclCleanupByteCode(codePtr)
objArrayPtr++;
}
bcDataPtr->numLitObjects = 0;
- } else if (interp != NULL) {
+ } else
+#ifndef TCL_THREAD_LITERALS
+ if (interp != NULL)
+#endif
+ {
/*
- * If the interp has already been freed, then Tcl will have already
- * forcefully released all the literals used by ByteCodes compiled
- * with respect to that interp.
+ * If the interp has already been freed, then Tcl will have
+ * already forcefully released all the literals used by ByteCodes
+ * compiled with respect to that interp.
*/
objArrayPtr = bcDataPtr->objArrayPtr;
for (i = 0; i < numLitObjects; i++) {
/*
- * TclReleaseLiteral sets a ByteCode's object array entry NULL to
- * indicate that it has already freed the literal.
+ * TclReleaseLiteral sets a ByteCode's object array entry NULL
+ * to indicate that it has already freed the literal.
*/
if (*objArrayPtr != NULL) {