Mercurial > hg > xemacs-beta
diff src/alloc.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 | a72f7bf813c9 |
children | 68ed93de81b7 |
line wrap: on
line diff
--- a/src/alloc.c Mon Sep 29 21:53:04 2003 +0000 +++ b/src/alloc.c Tue Sep 30 15:27:01 2003 +0000 @@ -252,7 +252,7 @@ { void *tmp = breathing_space; breathing_space = 0; - xfree (tmp); + xfree (tmp, void *); } } @@ -383,11 +383,7 @@ } void -#ifdef ERROR_CHECK_MALLOC xfree_1 (void *block) -#else -xfree (void *block) -#endif { #ifdef ERROR_CHECK_MALLOC /* Unbelievably, calling free() on 0xDEADBEEF doesn't cause an @@ -2265,7 +2261,7 @@ XSTRING_LENGTH (s) + 1 - pos); } XSET_STRING_DATA (s, new_data); - xfree (old_data); + xfree (old_data, Ibyte *); } } else /* old string is small */ @@ -3598,7 +3594,7 @@ *prev = next; tick_lcrecord_stats (h, 1); /* used to call finalizer right here. */ - xfree (header); + xfree (header, struct lcrecord_header *); header = next; } } @@ -3722,7 +3718,7 @@ SFTB_current = SFTB_current->prev; \ { \ *SFTB_prev = SFTB_current; \ - xfree (SFTB_victim_block); \ + xfree (SFTB_victim_block, struct typename##_block *); \ /* Restore free list to what it was before victim was swept */ \ typename##_free_list = SFTB_old_free_list; \ num_free -= SFTB_limit; \ @@ -3816,7 +3812,7 @@ { #define UNMARK_compiled_function(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader)) #define ADDITIONAL_FREE_compiled_function(ptr) \ - if (ptr->args_in_array) xfree (ptr->args) + if (ptr->args_in_array) xfree (ptr->args, Lisp_Object *) SWEEP_FIXED_TYPE_BLOCK (compiled_function, Lisp_Compiled_Function); } @@ -4154,7 +4150,7 @@ for (victim = to_sb->next; victim; ) { struct string_chars_block *next = victim->next; - xfree (victim); + xfree (victim, struct string_chars_block *); victim = next; } @@ -4211,7 +4207,7 @@ #define ADDITIONAL_FREE_string(ptr) do { \ Bytecount size = ptr->size_; \ if (BIG_STRING_SIZE_P (size)) \ - xfree (ptr->data_); \ + xfree (ptr->data_, Ibyte *); \ } while (0) SWEEP_FIXED_TYPE_BLOCK_1 (string, Lisp_String, u.lheader);