summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-12-08 13:50:42 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-12-08 13:50:42 (GMT)
commita8eab3914ae049d11796aae78540064f3a277dbf (patch)
treec09d46bcea1e83bec22adcbeaeb820c6b2af4658
parent1cc496188903b292b91cb8507de78c5f86a7c42f (diff)
downloadtcl-a8eab3914ae049d11796aae78540064f3a277dbf.zip
tcl-a8eab3914ae049d11796aae78540064f3a277dbf.tar.gz
tcl-a8eab3914ae049d11796aae78540064f3a277dbf.tar.bz2
Fix [Bug 1571056] and silence a GCC warning
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclNamesp.c7
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 <donal.k.fellows@manchester.ac.uk>
+ * 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 <das@users.sourceforge.net>
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,