summaryrefslogtreecommitdiffstats
path: root/generic/tclHash.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-11-17 22:15:34 (GMT)
committernijtmans <nijtmans>2008-11-17 22:15:34 (GMT)
commitdb2e6bf825388498ab5798bbeca26fce23d4286f (patch)
tree2f8215b09f523671c94a4acc837892ad9160b950 /generic/tclHash.c
parent984e58b8dfc72a94b8827802e7234f66ce8aa7e4 (diff)
downloadtcl-db2e6bf825388498ab5798bbeca26fce23d4286f.zip
tcl-db2e6bf825388498ab5798bbeca26fce23d4286f.tar.gz
tcl-db2e6bf825388498ab5798bbeca26fce23d4286f.tar.bz2
Fix signature and implementation of Tcl_HashStats,
such that it conforms to the documentation.
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r--generic/tclHash.c10
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);