diff options
author | nijtmans <nijtmans@noemail.net> | 2008-11-17 22:15:33 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2008-11-17 22:15:33 (GMT) |
commit | 5b7c03beb6cc1cf08ee54551c8fcc1576c62ac7b (patch) | |
tree | 2f8215b09f523671c94a4acc837892ad9160b950 /generic/tclHash.c | |
parent | 0eeba10b941d28935f4bf60bd7ed6920afe501eb (diff) | |
download | tcl-5b7c03beb6cc1cf08ee54551c8fcc1576c62ac7b.zip tcl-5b7c03beb6cc1cf08ee54551c8fcc1576c62ac7b.tar.gz tcl-5b7c03beb6cc1cf08ee54551c8fcc1576c62ac7b.tar.bz2 |
Fix signature and implementation of Tcl_HashStats,
such that it conforms to the documentation.
FossilOrigin-Name: 2b7fc9b4445dd1264716d839f5b6637f5bbb766c
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r-- | generic/tclHash.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c index dd995f0..89fbb6f 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.36 2008/10/15 06:17:03 nijtmans Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.37 2008/11/17 22:15:34 nijtmans Exp $ */ #include "tclInt.h" @@ -614,7 +614,7 @@ Tcl_NextHashEntry( *---------------------------------------------------------------------- */ -const char * +char * Tcl_HashStats( Tcl_HashTable *tablePtr) /* Table for which to produce stats. */ { @@ -665,11 +665,7 @@ Tcl_HashStats( * Print out the histogram and a few other pieces of information. */ - if (typePtr->flags & TCL_HASH_KEY_SYSTEM_HASH) { - result = (char *) TclpSysAlloc((unsigned) (NUM_COUNTERS*60) + 300, 0); - } else { - result = (char *) ckalloc((unsigned) (NUM_COUNTERS*60) + 300); - } + result = (char *) ckalloc((unsigned) (NUM_COUNTERS*60) + 300); sprintf(result, "%d entries in table, %d buckets\n", tablePtr->numEntries, tablePtr->numBuckets); p = result + strlen(result); |