From 40fe734e338c7f76d3d8e58dc9ba49618ed78922 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 13 Oct 2010 16:41:26 +0000 Subject: * generic/tclCompile.c: Alternative fix for [Bugs 467523,983660] where * generic/tclExecute.c: sharing of empty scripts is allowed again. --- ChangeLog | 5 +++++ generic/tclCompile.c | 8 ++++---- generic/tclExecute.c | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27ecd15..eb86e3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-13 Don Porter + + * generic/tclCompile.c: Alternative fix for [Bugs 467523,983660] where + * generic/tclExecute.c: sharing of empty scripts is allowed again. + 2010-10-13 Jan Nijtmans * win/tclWinThrd.h (removed) because it is just empty en used nowhere diff --git a/generic/tclCompile.c b/generic/tclCompile.c index b250420..5547071 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.189 2010/10/06 18:38:44 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.190 2010/10/13 16:41:27 dgp 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; } /* @@ -1863,7 +1863,7 @@ TclCompileScript( */ if (envPtr->codeNext == entryCodeNext) { - TclEmitPush(TclAddLiteralObj(envPtr, Tcl_NewObj(), NULL), envPtr); + TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr); } envPtr->numSrcBytes = p - script; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 649b100..c7f3690 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.505 2010/10/09 15:56:35 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.506 2010/10/13 16:41:27 dgp Exp $ */ #include "tclInt.h" @@ -1525,12 +1525,12 @@ FreeExprCodeInternalRep( { ByteCode *codePtr = (ByteCode *) 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; } /* -- cgit v0.12