Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: ecore_hash.c Log Message: Fix rehashing the nodes to a hash of a new size. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_hash.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- ecore_hash.c 17 Nov 2005 06:39:14 -0000 1.20 +++ ecore_hash.c 17 Nov 2005 15:15:37 -0000 1.21 @@ -438,6 +438,7 @@ node->value = NULL; _ecore_hash_node_destroy(node, hash->free_key, NULL); + hash->nodes--; } } @@ -670,13 +671,10 @@ for (i = 0; i < ecore_prime_table[old_size]; i++) { /* Hash into a new list to avoid loops of rehashing the same * nodes */ - old = old_table[i]; - old_table[i] = NULL; - - /* Loop through re-adding each node to the hash table */ while ((old = old_table[i])) { - _ecore_hash_add_node(hash, old); old_table[i] = old->next; + old->next = NULL; + _ecore_hash_add_node(hash, old); } } ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs