From a8eab3914ae049d11796aae78540064f3a277dbf Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 8 Dec 2006 13:50:42 +0000 Subject: Fix [Bug 1571056] and silence a GCC warning --- ChangeLog | 4 ++++ generic/tclNamesp.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f712f5..9320406 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-12-08 Donal K. Fellows + * generic/tclNamesp.c (TclTeardownNamespace): Ensure that dying + namespaces unstitch themselves from their referents. [Bug 1571056] + (NsEnsembleImplementationCmd): Silence GCC warning. + * tests/mathop.test: Full tests for & | and ^ operators 2006-12-08 Daniel Steffen diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 91ab1a8..d641eef 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.120 2006/11/28 22:20:29 andreas_kupries Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.121 2006/12/08 13:50:42 dkf Exp $ */ #include "tclInt.h" @@ -1109,6 +1109,9 @@ TclTeardownNamespace( if (nsPtr->commandPathSourceList != NULL) { NamespacePathEntry *nsPathPtr = nsPtr->commandPathSourceList; do { + if (nsPathPtr->nsPtr != NULL && nsPathPtr->creatorNsPtr != NULL) { + nsPathPtr->creatorNsPtr->cmdRefEpoch++; + } nsPathPtr->nsPtr = NULL; nsPathPtr = nsPathPtr->nextPtr; } while (nsPathPtr != NULL); @@ -6303,7 +6306,7 @@ NsEnsembleImplementationCmd( } } tempObjv = (Tcl_Obj **) TclStackAlloc(interp, - sizeof(Tcl_Obj *) * (objc - 2 + prefixObjc)); + (int) sizeof(Tcl_Obj *) * (objc - 2 + prefixObjc)); memcpy(tempObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); memcpy(tempObjv+prefixObjc, objv+2, sizeof(Tcl_Obj *) * (objc-2)); result = Tcl_EvalObjv(interp, objc-2+prefixObjc, tempObjv, -- cgit v0.12