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/tclDictObj.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/tclDictObj.c')
-rw-r--r-- | generic/tclDictObj.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 2b87c01..75e1478 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.69 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.70 2008/11/17 22:15:34 nijtmans Exp $ */ #include "tclInt.h" @@ -2061,6 +2061,7 @@ DictInfoCmd( { Tcl_Obj *dictPtr; Dict *dict; + char *buf; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary"); @@ -2076,11 +2077,9 @@ DictInfoCmd( } dict = dictPtr->internalRep.otherValuePtr; - /* - * This next cast is actually OK. - */ - - Tcl_SetResult(interp, (char *) Tcl_HashStats(&dict->table), TCL_DYNAMIC); + buf = Tcl_HashStats(&dict->table); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); + ckfree(buf); return TCL_OK; } |