summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--doc/Hash.37
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bbc2296..9ccc373 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2004-04-21 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+ * doc/Hash.3: Added note to Tcl_{First,Next}HashEntry docs that
+ deleting the element they return is supported (and is in fact the
+ only safe update you can do to the structure of a hashtable while
+ an iteration is going over it.)
+
* doc/bgerror.n: Added example from David Welton. [Patch 939473]
* doc/after.n: Added examples from David Welton. [Patch 938820]
diff --git a/doc/Hash.3 b/doc/Hash.3
index 1067db5..32b40ec 100644
--- a/doc/Hash.3
+++ b/doc/Hash.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Hash.3,v 1.12 2003/11/14 23:21:02 dkf Exp $
+'\" RCS: @(#) $Id: Hash.3,v 1.13 2004/04/21 21:33:38 dkf Exp $
'\"
.so man.macros
.TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures"
@@ -210,8 +210,9 @@ A call to \fBTcl_FirstHashEntry\fR followed by calls to
\fBTcl_NextHashEntry\fR will return each of the entries in
the table exactly once, in an arbitrary order.
It is unadvisable to modify the structure of the table, e.g.
-by creating or deleting entries, while the search is in
-progress.
+by creating or deleting entries, while the search is in progress,
+with the exception of deleting the entry returned by
+\fBTcl_FirstHashEntry\fR or \fBTcl_NextHashEntry\fR.
.PP
\fBTcl_HashStats\fR returns a dynamically-allocated string with
overall information about a hash table, such as the number of