1 --- hash.c~ Sun Apr 2 23:37:07 2000
2 +++ hash.c Sun Apr 2 23:38:30 2000
6 if (destroy) destroy (ptr->data);
12 @@ -137,15 +137,38 @@ void hash_destroy (HASH **ptr, void (*de
14 struct hash_elem *elem, *tmp;
16 - for (i = 0 ; i < pptr->nelem; i++)
17 + /* We want to keep the test for the optional destroy argument out
18 + * of the loop to get a faster execution. The price we pay is that
19 + * we then have to have two versions of the loop.
22 + /* Nobody use the destroy argument at the moment, so the destroy
23 + * version of the loop is out-commented until somebody needs it.
27 - for (elem = pptr->table[i]; elem; )
28 + for (i = 0 ; i < pptr->nelem; i++)
33 + for (elem = pptr->table[i]; elem; )
38 - safe_free ((void **) &tmp);
46 + for (i = 0 ; i < pptr->nelem; i++)
48 + for (elem = pptr->table[i]; elem; )
56 safe_free ((void **) &pptr->table);
57 --- patchlist.c.orig Sat Sep 19 02:29:51 1998
58 +++ patchlist.c Sat Sep 19 02:54:16 1998
63 + printf("Feature patch: hash_destroy 0.95 by Byrial Jensen\n");
67 /* DO NOT MODIFY AFTER THIS LINE */