jorton 2004/04/21 13:56:31
Modified: include apr_hash.h
Log:
* include/apr_hash.h: Fix some NUL/null confusion, document
restriction on use of apr_hash_merge and apr_hash_overlay with custom
hash functions.
Revision Changes Path
1.43 +6 -4 apr/include/apr_hash.h
Index: apr_hash.h
===================================================================
RCS file: /home/cvs/apr/include/apr_hash.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -w -d -u -r1.42 -r1.43
--- apr_hash.h 18 Apr 2004 12:12:49 -0000 1.42
+++ apr_hash.h 21 Apr 2004 20:56:31 -0000 1.43
@@ -38,10 +38,10 @@
* passed to indicate a string-valued key, and have apr_hash compute the
* length automatically.
*
- * @remark apr_hash will use strlen(key) for the length. The null-terminator
+ * @remark apr_hash will use strlen(key) for the length. The NUL terminator
* is not included in the hash value (why throw a constant in?).
* Since the hash table merely references the provided key (rather
- * than copying it), apr_hash_this() will return the null-term'd key.
+ * than copying it), apr_hash_this() will return the NUL-term'd key.
*/
#define APR_HASH_KEY_STRING (-1)
@@ -173,7 +173,8 @@
/**
* Merge two hash tables into one new hash table. The values of the overlay
- * hash override the values of the base if both have the same key.
+ * hash override the values of the base if both have the same key. Both
+ * hash tables must use the same hash function.
* @param p The pool to use for the new hash table
* @param overlay The table to add to the initial table
* @param base The table that represents the initial values of the new table
@@ -186,7 +187,8 @@
/**
* Merge two hash tables into one new hash table. If the same key
* is present in both tables, call the supplied merge function to
- * produce a merged value for the key in the new table.
+ * produce a merged value for the key in the new table. Both
+ * hash tables must use the same hash function.
* @param p The pool to use for the new hash table
* @param h1 The first of the tables to merge
* @param h2 The second of the tables to merge