summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-10-20 01:50:18 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-10-20 01:50:18 (GMT)
commit7ef903af6d95a38ef6c6a3236bd637fe9a9c29a0 (patch)
tree012aca108d2e4e279dd830e7c202ea1add3fa5aa /generic/tclCompile.c
parentab1be3cbc8f840d7d2eb235f86051e816d188187 (diff)
downloadtcl-7ef903af6d95a38ef6c6a3236bd637fe9a9c29a0.zip
tcl-7ef903af6d95a38ef6c6a3236bd637fe9a9c29a0.tar.gz
tcl-7ef903af6d95a38ef6c6a3236bd637fe9a9c29a0.tar.bz2
merge
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 519bf01..2a6ee34 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,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.187.2.2 2010/10/09 17:53:16 kennykb Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.187.2.3 2010/10/20 01:50:19 kennykb Exp $
*/
#include "tclInt.h"
@@ -714,12 +714,12 @@ FreeByteCodeInternalRep(
{
register ByteCode *codePtr = objPtr->internalRep.otherValuePtr;
+ objPtr->typePtr = NULL;
+ objPtr->internalRep.otherValuePtr = NULL;
codePtr->refCount--;
if (codePtr->refCount <= 0) {
TclCleanupByteCode(codePtr);
}
- objPtr->typePtr = NULL;
- objPtr->internalRep.otherValuePtr = NULL;
}
/*
@@ -1854,16 +1854,10 @@ TclCompileScript(
/*
* If the source script yielded no instructions (e.g., if it was empty),
* push an empty string as the command's result.
- *
- * WARNING: push an unshared object! If the script being compiled is a
- * shared empty string, it will otherwise be self-referential and cause
- * difficulties with literal management [Bugs 467523, 983660]. We used to
- * have special code in TclReleaseLiteral to handle this particular
- * self-reference, but now opt for avoiding its creation altogether.
*/
if (envPtr->codeNext == entryCodeNext) {
- TclEmitPush(TclAddLiteralObj(envPtr, Tcl_NewObj(), NULL), envPtr);
+ TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr);
}
envPtr->numSrcBytes = p - script;