summaryrefslogtreecommitdiffstats
path: root/generic/tclResolve.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-07-15 13:17:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-07-15 13:17:17 (GMT)
commitb5f035d9c80dbec4986ba4e7e2ba4a1881d90d38 (patch)
tree30dfc00e40cfadd30723fb7fcb13abc429ddb8b1 /generic/tclResolve.c
parent0a901b4dd0d5f48c4258a435a7015b391a292f65 (diff)
downloadtcl-b5f035d9c80dbec4986ba4e7e2ba4a1881d90d38.zip
tcl-b5f035d9c80dbec4986ba4e7e2ba4a1881d90d38.tar.gz
tcl-b5f035d9c80dbec4986ba4e7e2ba4a1881d90d38.tar.bz2
Added code to save space in namespaces. Currently #ifdef'ed out for compat.
Also added code from itcl-ng for better separation of concerns.
Diffstat (limited to 'generic/tclResolve.c')
-rw-r--r--generic/tclResolve.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclResolve.c b/generic/tclResolve.c
index af7d4cb..8455793 100644
--- a/generic/tclResolve.c
+++ b/generic/tclResolve.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: tclResolve.c,v 1.10 2008/04/27 22:21:32 dkf Exp $
+ * RCS: @(#) $Id: tclResolve.c,v 1.11 2009/07/15 13:17:19 dkf Exp $
*/
#include "tclInt.h"
@@ -262,12 +262,23 @@ BumpCmdRefEpochs(
nsPtr->cmdRefEpoch++;
+#ifndef BREAK_NAMESPACE_COMPAT
for (entry = Tcl_FirstHashEntry(&nsPtr->childTable, &search);
entry != NULL; entry = Tcl_NextHashEntry(&search)) {
Namespace *childNsPtr = Tcl_GetHashValue(entry);
BumpCmdRefEpochs(childNsPtr);
}
+#else
+ if (nsPtr->childTablePtr != NULL) {
+ for (entry = Tcl_FirstHashEntry(nsPtr->childTablePtr, &search);
+ entry != NULL; entry = Tcl_NextHashEntry(&search)) {
+ Namespace *childNsPtr = Tcl_GetHashValue(entry);
+
+ BumpCmdRefEpochs(childNsPtr);
+ }
+ }
+#endif
TclInvalidateNsPath(nsPtr);
}