diff options
author | dkf <dkf@noemail.net> | 2009-07-15 13:17:16 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-07-15 13:17:16 (GMT) |
commit | 50110cab6cb49be574d52f3dd827c06cca7cdc49 (patch) | |
tree | 30dfc00e40cfadd30723fb7fcb13abc429ddb8b1 /generic/tclInt.h | |
parent | 7c3dbd34f6f6784cab84fc17af574fc24b22e7d7 (diff) | |
download | tcl-50110cab6cb49be574d52f3dd827c06cca7cdc49.zip tcl-50110cab6cb49be574d52f3dd827c06cca7cdc49.tar.gz tcl-50110cab6cb49be574d52f3dd827c06cca7cdc49.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.
FossilOrigin-Name: 518b8a92e083149d15d0045b0931240c85452db7
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 13 |
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 |