src/lib/hash.c 1.50

1.50 2009/04/30 19:31:50 mikep
I take the comemnts back. It seems some poeple like to store hash elements as the value of other hash elemnets in hashes.
Index: src/lib/hash.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/hash.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -b -B -U 4 -r1.49 -r1.50
--- src/lib/hash.c	30 Apr 2009 18:12:00 -0000	1.49
+++ src/lib/hash.c	30 Apr 2009 19:31:50 -0000	1.50
@@ -210,13 +210,9 @@
 struct hashEl *hashAddSaveName(struct hash *hash, char *name, void *val, char **saveName)
 /* Add new element to hash table.  Save the name of the element, which is now
  * allocated in the hash table, to *saveName.  A typical usage would be:
  *    AllocVar(el);
- *    el->val = someVal;
- *    hashAddSaveName(hash, name, el->val, &el->name);
- * Note this above code gives you a hashEl 'el' which is not in the hash, but
- * whose ->name and ->val pointers are the same as the pionters of 
- * the hashEl in the hash.
+ *    hashAddSaveName(hash, name, el, &el->name);
  */
 {
 struct hashEl *hel = hashAdd(hash, name, val);
 *saveName = hel->name;