src/inc/hash.h 1.49

1.49 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/inc/hash.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/hash.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -b -B -U 4 -r1.48 -r1.49
--- src/inc/hash.h	30 Apr 2009 18:12:00 -0000	1.48
+++ src/inc/hash.h	30 Apr 2009 19:31:50 -0000	1.49
@@ -132,13 +132,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 *hashStore(struct hash *hash, char *name);
 /* If element in hash already return it, otherwise add it