summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-09-07 18:01:35 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-09-07 18:01:35 (GMT)
commit65bc35e33b2f3c501acdaa45836327325e7e0da7 (patch)
tree1cb0daef656147b1485cd168459c2f21737a61d2
parent0fff7f052b013ecc6e4194b8568bc7c9e1a9c4f6 (diff)
downloadtcl-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--ChangeLog6
-rw-r--r--generic/tclProc.c6
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 <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;
}