From 65bc35e33b2f3c501acdaa45836327325e7e0da7 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 7 Sep 2007 18:01:35 +0000 Subject: * generic/tclProc.c (TclInitCompiledLocals): the refCount of resolved variables was being managed without checking if they were Var or VarInHash: itcl [Bug 1790184] --- ChangeLog | 6 ++++++ generic/tclProc.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c371417..cbf9737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-07 Miguel Sofer + + * generic/tclProc.c (TclInitCompiledLocals): the refCount of + resolved variables was being managed without checking if they were + Var or VarInHash: itcl [Bug 1790184] + 2007-09-06 Don Porter * generic/tclResult.c (Tcl_GetReturnOptions): Take care that a diff --git a/generic/tclProc.c b/generic/tclProc.c index ca8aa4f..c09b7df 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.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: tclProc.c,v 1.131 2007/08/10 00:43:44 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.132 2007/09/07 18:01:36 msofer Exp $ */ #include "tclInt.h" @@ -1204,7 +1204,9 @@ InitResolvedLocals( Var *resolvedVarPtr = (Var *) (*resVarInfo->fetchProc)(interp, resVarInfo); if (resolvedVarPtr) { - VarHashRefCount(resolvedVarPtr)++; + if (TclIsVarInHash(resolvedVarPtr)) { + VarHashRefCount(resolvedVarPtr)++; + } varPtr->flags = VAR_LINK; varPtr->value.linkPtr = resolvedVarPtr; } -- cgit v0.12