diff options
author | andreas_kupries <akupries@shaw.ca> | 2001-12-04 21:52:07 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2001-12-04 21:52:07 (GMT) |
commit | 8c077c7737d8f145bda783f4f6ae7b66660d5c3d (patch) | |
tree | 259a45f6a070e91ac73a150fa4714d286ef18078 /generic/tclInt.h | |
parent | 546058a1d386adc014fece9653fe8faa2356ab0e (diff) | |
download | tcl-8c077c7737d8f145bda783f4f6ae7b66660d5c3d.zip tcl-8c077c7737d8f145bda783f4f6ae7b66660d5c3d.tar.gz tcl-8c077c7737d8f145bda783f4f6ae7b66660d5c3d.tar.bz2 |
* NOTES:
* tcl.h:
* tclInt.h: Moved the macros to control feature exclusion and
stack manipulation into the private area of the tcl
headers. Renamed the macros for TCL_STRUCT_ON_HEAP to make their
names more sensible.
* tclCmdAH.c:
* tclCompCmds.c:
* tclCompExpr.c:
* tclCompile.c:
* tclExecute.c:
* tclIO.c:
* tclParse.c:
* tclParseExpr.c:
* tclScan.c:
* tclUnixChan.c: Adapted to changed macro names, added some more
places there structures go on the heap instead of the stack.
Fixed a problem with TCL_FMT_STATIC_FLOATBUFFER_SZ which
caused the interp to crash when actually used to reduce the
usage of the stack.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 97 |
1 files changed, 96 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index f2e5b8d..84c69b8 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -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: tclInt.h,v 1.42.2.3 2001/10/19 23:47:57 hobbs Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.42.2.3.2.1 2001/12/04 21:52:09 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -2218,5 +2218,100 @@ extern Tcl_Mutex tclObjMutex; # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT +/* The following macros are + * - a clause to activate all macros cutting features out of the core. + * - feature dependencies + */ + +#ifdef MODULAR_TCL +#define TCL_NO_SOCKETS /* Disable "tcp" channel driver */ +#define TCL_NO_TTY /* Disable "tty" channel driver */ +#define TCL_NO_PIPES /* Disable "pipe" channel driver */ +#define TCL_NO_PIDCMD /* Disable "pid" command */ +#define TCL_NO_NONSTDCHAN /* Disable creation of channels beyond std* */ +#define TCL_NO_CHANNELCOPY /* Disable channel copying, C/Tcl [fcopy] */ +#define TCL_NO_CHANNEL_READ /* Disable Tcl_ReadChars, [read] */ +#define TCL_NO_CHANNEL_EOF /* Disable [eof] */ +#define TCL_NO_CHANNEL_CONFIG /* Disable [fconfigure] and Tcl_GetChannelOption */ +#define TCL_NO_CHANNEL_BLOCKED /* Disable [fblocked] */ +#define TCL_NO_FILEEVENTS /* Disable [fileevent] and underlying APIs */ +#define TCL_NO_FILESYSTEM /* Disable everything related to the filesystem */ +#define TCL_NO_LOADCMD /* Disable [load] and machinery below */ +#define TCL_NO_SLAVEINTERP /* No slave interp's */ +#define TCL_NO_CMDALIASES /* No command aliases */ +#define TCL_STRUCT_ON_HEAP /* Allocate temp. big structures off the heap */ +#endif + +#ifdef TCL_NO_NONSTDCHAN +#define TCL_NO_SOCKETS /* Disable "tcp" channel driver */ +#define TCL_NO_TTY /* Disable "tty" channel driver */ +#define TCL_NO_PIPES /* Disable "pipe" channel driver */ +#endif + + +#ifdef TCL_STRUCT_ON_HEAP +#define TEMP(t) t * +#define ITEM(var,item) var -> item +#define REF(var) (var) +#define NEWTEMP(t,var) (var) = (t *) Tcl_Alloc(sizeof(t)) +#define RELTEMP(var) Tcl_Free((void*)(var)) +#define STRING(n,var) char* var +#define NEWSTR(n,var) (var) = (char *) Tcl_Alloc(n) +#else +#define TEMP(t) t +#define ITEM(var,item) var . item +#define REF(var) &(var) +#define NEWTEMP(t,var) +#define RELTEMP(var) +#define STRING(n,var) char var [n] +#define NEWSTR(n,var) +#endif + +/* + * Additional macros to control the sizes of various data placed on the stack. + */ + +#ifndef TCL_FMT_STATIC_FLOATBUFFER_SZ +#define TCL_FMT_STATIC_FLOATBUFFER_SZ 320 +#endif +#ifndef TCL_FMT_STATIC_VALIDATE_LIST +#define TCL_FMT_STATIC_VALIDATE_LIST 16 +#endif +#ifndef TCL_FOREACH_STATIC_ARGS +#define TCL_FOREACH_STATIC_ARGS 9 +#endif +#ifndef TCL_FOREACH_STATIC_LIST_SZ +#define TCL_FOREACH_STATIC_LIST_SZ 4 +#endif +#ifndef TCL_FOREACH_STATIC_VARLIST_SZ +#define TCL_FOREACH_STATIC_VARLIST_SZ 5 +#endif +#ifndef TCL_RESULT_APPEND_STATIC_LIST_SZ +#define TCL_RESULT_APPEND_STATIC_LIST_SZ 16 +#endif +#ifndef TCL_MERGE_STATIC_LIST_SZ +#define TCL_MERGE_STATIC_LIST_SZ 20 +#endif +#ifndef TCL_PROC_STATIC_CLOCALS +#define TCL_PROC_STATIC_CLOCALS 20 +#endif +#ifndef TCL_PROC_STATIC_ARGS +#define TCL_PROC_STATIC_ARGS 20 +#endif +#ifndef TCL_INVOKE_STATIC_ARGS +#define TCL_INVOKE_STATIC_ARGS 20 +#endif +#ifndef TCL_EVAL_STATIC_VARCHARS +#define TCL_EVAL_STATIC_VARCHARS 30 +#endif +#ifndef TCL_STATS_COUNTERS +#define TCL_STATS_COUNTERS 10 +#endif +#ifndef TCL_LSORT_STATIC_MERGE_BUCKETS +#define TCL_LSORT_STATIC_MERGE_BUCKETS 30 +#endif + + + #endif /* _TCLINT */ |