* lisp/emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix.
[emacs.git] / oldXMenu / XDestAssoc.c
blob94c0454756ad47a10116258620f882ba88f5bd21
1 /* Copyright Massachusetts Institute of Technology 1985 */
3 #include "copyright.h"
5 #include "XMenuInt.h"
7 /*
8 * XDestroyAssocTable - Destroy (free the memory associated with)
9 * an XAssocTable.
11 void
12 XDestroyAssocTable(register XAssocTable *table)
14 register int i;
15 register XAssoc *bucket;
16 register XAssoc *Entry, *entry_next;
18 /* Free the buckets. */
19 for (i = 0; i < table->size; i++) {
20 bucket = &table->buckets[i];
21 for (
22 Entry = bucket->next;
23 Entry != bucket;
24 Entry = entry_next
25 ) {
26 entry_next = Entry->next;
27 free((char *)Entry);
31 /* Free the bucket array. */
32 free((char *)table->buckets);
34 /* Free the table. */
35 free((char *)table);