summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}