summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
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/tclInt.h
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/tclInt.h')
-rw-r--r--generic/tclInt.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 8c5cf3d..d2d8830 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.429 2009/07/14 16:52:28 kennykb Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.430 2009/07/15 13:17:18 dkf Exp $
*/
#ifndef _TCLINT
@@ -215,6 +215,15 @@ typedef struct TclVarHashTable {
TclVarHashCreateVar((tablePtr), (key), NULL)
/*
+ * Define this to reduce the amount of space that the average namespace
+ * consumes by only allocating the table of child namespaces when necessary.
+ * Defining it breaks compatibility for Tcl extensions (e.g., itcl) which
+ * reach directly into the Namespace structure.
+ */
+
+#undef BREAK_NAMESPACE_COMPAT
+
+/*
* The structure below defines a namespace.
* Note: the first five fields must match exactly the fields in a
* Tcl_Namespace structure (see tcl.h). If you change one, be sure to change
@@ -236,7 +245,7 @@ typedef struct Namespace {
struct Namespace *parentPtr;/* Points to the namespace that contains this
* one. NULL if this is the global
* namespace. */
-#if 1
+#ifndef BREAK_NAMESPACE_COMPAT
Tcl_HashTable childTable; /* Contains any child namespaces. Indexed by
* strings; values have type (Namespace *). */
#else