From 82d70288992628555e6c555719490b7a504fd671 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 6 Aug 2008 20:58:48 +0000 Subject: * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core could not trigger before TclOO: the number of locals was being read from the Proc, which can under some circumstance be out of sync with the localCache's. --- ChangeLog | 5 +++++ generic/tclVar.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b4b05e..e5d5615 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-08-06 Miguel Sofer + * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core + could not trigger before TclOO: the number of locals was being + read from the Proc, which can under some circumstance be out of + sync with the localCache's. + * library/init.tcl (::unknown): removed the [namespace inscope] hack that was maintained for Itcl diff --git a/generic/tclVar.c b/generic/tclVar.c index dd4ac10..f4e1ad3 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.165 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.166 2008/08/06 20:58:49 msofer Exp $ */ #include "tclInt.h" @@ -997,8 +997,7 @@ TclLookupSimpleVar( } } } else { /* Local var: look in frame varFramePtr. */ - Proc *procPtr = varFramePtr->procPtr; - int localCt = procPtr->numCompiledLocals; + int localCt = varFramePtr->numCompiledLocals; Tcl_Obj **objPtrPtr = &varFramePtr->localCachePtr->varName0; for (i=0 ; i