Mercurial > hg > xemacs-beta
comparison src/elhash.c @ 1726:a8d8f419b459
[xemacs-hg @ 2003-09-30 15:26:34 by james]
Add type information to xfree to avoid alias creation.
author | james |
---|---|
date | Tue, 30 Sep 2003 15:27:01 +0000 |
parents | ac1be85b4a5f |
children | 04bc9d2f42c7 |
comparison
equal
deleted
inserted
replaced
1725:7ff8f4d70aec | 1726:a8d8f419b459 |
---|---|
416 for (e = hentries, sentinel = e + size; e < sentinel; e++) | 416 for (e = hentries, sentinel = e + size; e < sentinel; e++) |
417 * (unsigned long *) e = 0xdeadbeef; /* -559038737 base 10 */ | 417 * (unsigned long *) e = 0xdeadbeef; /* -559038737 base 10 */ |
418 #endif | 418 #endif |
419 | 419 |
420 if (!DUMPEDP (hentries)) | 420 if (!DUMPEDP (hentries)) |
421 xfree (hentries); | 421 xfree (hentries, htentry *); |
422 } | 422 } |
423 | 423 |
424 static void | 424 static void |
425 finalize_hash_table (void *header, int for_disksave) | 425 finalize_hash_table (void *header, int for_disksave) |
426 { | 426 { |
1031 *probe = *e; | 1031 *probe = *e; |
1032 } | 1032 } |
1033 | 1033 |
1034 memcpy (ht->hentries, new_entries, ht->size * sizeof (htentry)); | 1034 memcpy (ht->hentries, new_entries, ht->size * sizeof (htentry)); |
1035 | 1035 |
1036 xfree (new_entries); | 1036 xfree (new_entries, htentry *); |
1037 } | 1037 } |
1038 | 1038 |
1039 static void | 1039 static void |
1040 enlarge_hash_table (Lisp_Hash_Table *ht) | 1040 enlarge_hash_table (Lisp_Hash_Table *ht) |
1041 { | 1041 { |
1295 | 1295 |
1296 static Lisp_Object | 1296 static Lisp_Object |
1297 maphash_unwind (Lisp_Object unwind_obj) | 1297 maphash_unwind (Lisp_Object unwind_obj) |
1298 { | 1298 { |
1299 void *ptr = (void *) get_opaque_ptr (unwind_obj); | 1299 void *ptr = (void *) get_opaque_ptr (unwind_obj); |
1300 xfree (ptr); | 1300 xfree (ptr, void *); |
1301 free_opaque_ptr (unwind_obj); | 1301 free_opaque_ptr (unwind_obj); |
1302 return Qnil; | 1302 return Qnil; |
1303 } | 1303 } |
1304 | 1304 |
1305 /* Return a malloced array of alternating key/value pairs from HT. */ | 1305 /* Return a malloced array of alternating key/value pairs from HT. */ |