diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-09-07 18:01:35 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-09-07 18:01:35 (GMT) |
commit | 65bc35e33b2f3c501acdaa45836327325e7e0da7 (patch) | |
tree | 1cb0daef656147b1485cd168459c2f21737a61d2 | |
parent | 0fff7f052b013ecc6e4194b8568bc7c9e1a9c4f6 (diff) | |
download | tcl-65bc35e33b2f3c501acdaa45836327325e7e0da7.zip tcl-65bc35e33b2f3c501acdaa45836327325e7e0da7.tar.gz tcl-65bc35e33b2f3c501acdaa45836327325e7e0da7.tar.bz2 |
* generic/tclProc.c (TclInitCompiledLocals): the refCount of
resolved variables was being managed without checking if they were
Var or VarInHash: itcl [Bug 1790184]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclProc.c | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2007-09-07 Miguel Sofer <msofer@users.sf.net> + + * 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 <dgp@users.sourceforge.net> * 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; } |