summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-07-15 17:42:11 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-07-15 17:42:11 (GMT)
commit904a467ccfeca1913883354a57a3639c84f403b1 (patch)
treec90cbe8bfbba40582d7d52caa3d333c26062927d /generic/tclLiteral.c
parent4d636106758757629d87a6b8e9fa35cb684fbe93 (diff)
downloadtcl-904a467ccfeca1913883354a57a3639c84f403b1.zip
tcl-904a467ccfeca1913883354a57a3639c84f403b1.tar.gz
tcl-904a467ccfeca1913883354a57a3639c84f403b1.tar.bz2
* generic/tclCompile.c (TclCompileScript):
* generic/tclLiteral.c (TclReleaseLiteral): fix for [Bug 467523], which resurfaced with the latest changes. The previous strategy was to have special code in TclReleaseLiteral to handle the self-references generated by empty scripts. The new approach avoids the self-reference altogether, by having empty scripts return an unshared literal.
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r--generic/tclLiteral.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 19042fd..ad38167 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -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: tclLiteral.c,v 1.16 2004/07/08 18:46:06 msofer Exp $
+ * RCS: @(#) $Id: tclLiteral.c,v 1.17 2004/07/15 17:42:12 msofer Exp $
*/
#include "tclInt.h"
@@ -731,22 +731,6 @@ TclReleaseLiteral(interp, objPtr)
}
/*
- * Check if the LiteralEntry is only being kept alive by
- * a circular reference from a ByteCode stored as its
- * internal rep. In that case, set the ByteCode object array
- * entry NULL to signal to TclCleanupByteCode to not try to
- * release this about to be freed literal again.
- */
-
- if (objPtr->typePtr == &tclByteCodeType) {
- codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr;
- if ((codePtr->numLitObjects == 1)
- && (codePtr->objArrayPtr[0] == objPtr)) {
- codePtr->objArrayPtr[0] = NULL;
- }
- }
-
- /*
* Remove the reference corresponding to the local literal table
* entry.
*/