Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.809
diff -u -u -r1.809 ChangeLog
--- ChangeLog	2002/01/21 22:50:49	1.809
+++ ChangeLog	2002/01/22 06:10:12
@@ -1,3 +1,12 @@
+2002-01-22  Don Porter <dgp@users.sourceforge.net>
+
+	* doc/Hash.3:
+	* generic/tcl.decls (Tcl_HashStats):
+	* generic/tclHash.c (Tcl_HashStats):  Updated APIs of generic/tclHash.c
+	according to guidelines of TIP 27.
+	* generic/tclDecls.h: make genstubs
+	* generic/tclVar.c (Tcl_ArrayObjCmd): Updated callers.
+
 2002-01-21  David Gravereaux <davygrvy@pobox.com>
 
 	* generic/tclLoadNone.c: TclpLoadFile() didn't match proto of
Index: doc/Hash.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/Hash.3,v
retrieving revision 1.8
diff -u -u -r1.8 Hash.3
--- doc/Hash.3	2001/01/18 19:09:55	1.8
+++ doc/Hash.3	2002/01/22 06:10:12
@@ -46,7 +46,7 @@
 Tcl_HashEntry *
 \fBTcl_NextHashEntry\fR(\fIsearchPtr\fR)
 .sp
-char *
+CONST char *
 \fBTcl_HashStats\fR(\fItablePtr\fR)
 .SH ARGUMENTS
 .AS Tcl_HashSearch *searchPtr
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.76
diff -u -u -r1.76 tcl.decls
--- generic/tcl.decls	2002/01/21 16:15:03	1.76
+++ generic/tcl.decls	2002/01/22 06:10:13
@@ -945,7 +945,7 @@
     void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList)
 }
 declare 269 generic {
-    char * Tcl_HashStats(Tcl_HashTable *tablePtr)
+    CONST char * Tcl_HashStats(Tcl_HashTable *tablePtr)
 }
 declare 270 generic {
     CONST char * Tcl_ParseVar(Tcl_Interp *interp, char *str, char **termPtr)
Index: generic/tclDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclDecls.h,v
retrieving revision 1.76
diff -u -u -r1.76 tclDecls.h
--- generic/tclDecls.h	2002/01/21 16:15:03	1.76
+++ generic/tclDecls.h	2002/01/22 06:10:14
@@ -876,7 +876,7 @@
 EXTERN void		Tcl_AppendStringsToObjVA _ANSI_ARGS_((
 				Tcl_Obj * objPtr, va_list argList));
 /* 269 */
-EXTERN char *		Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable * tablePtr));
+EXTERN CONST char *	Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable * tablePtr));
 /* 270 */
 EXTERN CONST char *	Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp * interp, 
 				char * str, char ** termPtr));
@@ -1842,7 +1842,7 @@
     void (*tcl_ValidateAllMemory) _ANSI_ARGS_((CONST char * file, int line)); /* 266 */
     void (*tcl_AppendResultVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 267 */
     void (*tcl_AppendStringsToObjVA) _ANSI_ARGS_((Tcl_Obj * objPtr, va_list argList)); /* 268 */
-    char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
+    CONST char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
     CONST char * (*tcl_ParseVar) _ANSI_ARGS_((Tcl_Interp * interp, char * str, char ** termPtr)); /* 270 */
     CONST char * (*tcl_PkgPresent) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 271 */
     CONST char * (*tcl_PkgPresentEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 272 */
Index: generic/tclHash.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclHash.c,v
retrieving revision 1.9
diff -u -u -r1.9 tclHash.c
--- generic/tclHash.c	2001/01/18 19:09:55	1.9
+++ generic/tclHash.c	2002/01/22 06:10:14
@@ -736,7 +736,7 @@
  *----------------------------------------------------------------------
  */
 
-char *
+CONST char *
 Tcl_HashStats(tablePtr)
     Tcl_HashTable *tablePtr;		/* Table for which to produce stats. */
 {
Index: generic/tclVar.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclVar.c,v
retrieving revision 1.45
diff -u -u -r1.45 tclVar.c
--- generic/tclVar.c	2002/01/17 04:37:33	1.45
+++ generic/tclVar.c	2002/01/22 06:10:15
@@ -3579,7 +3579,7 @@
 	}
 
 	case ARRAY_STATISTICS: {
-	    char *stats;
+	    CONST char *stats;
 
 	    if (notArray) {
 		goto error;
@@ -3587,7 +3587,7 @@
 
 	    stats = Tcl_HashStats(varPtr->value.tablePtr);
 	    if (stats != NULL) {
-		Tcl_SetResult(interp, stats, TCL_VOLATILE);
+		Tcl_SetStringObj(Tcl_GetObjResult(interp), stats, -1);
 		ckfree((void *)stats);
 	    } else {
 		Tcl_SetResult(interp, "error reading array statistics",
