Mercurial > emacs
changeset 2507:7ba4316ae840
* alloc.c (__malloc_hook, __realloc_hook, __free_hook): Declare
these extern, not static. (!)
* alloc.c (__malloc_hook, old_malloc_hook, __realloc_hook,
old_realloc_hook): Declare that the functions these point to return
void *, not void.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 10 Apr 1993 07:57:21 +0000 |
parents | aba562e560f0 |
children | 3aa2f3b35353 |
files | src/alloc.c |
diffstat | 1 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alloc.c Sat Apr 10 07:53:50 1993 +0000 +++ b/src/alloc.c Sat Apr 10 07:57:21 1993 +0000 @@ -207,9 +207,12 @@ GNU malloc. */ #ifndef SYSTEM_MALLOC -static void (*__malloc_hook) (), (*old_malloc_hook) (); -static void (*__realloc_hook) (), (*old_realloc_hook) (); -static void (*__free_hook) (), (*old_free_hook) (); +extern void * (*__malloc_hook) (); +static void * (*old_malloc_hook) (); +extern void * (*__realloc_hook) (); +static void * (*old_realloc_hook) (); +extern void (*__free_hook) (); +static void (*old_free_hook) (); static void emacs_blocked_free (ptr) @@ -218,7 +221,7 @@ BLOCK_INPUT; __free_hook = old_free_hook; free (ptr); - __free_hook = &emacs_blocked_free; + __free_hook = emacs_blocked_free; UNBLOCK_INPUT; } @@ -231,7 +234,7 @@ BLOCK_INPUT; __malloc_hook = old_malloc_hook; value = malloc (size); - __malloc_hook = &emacs_blocked_malloc; + __malloc_hook = emacs_blocked_malloc; UNBLOCK_INPUT; return value; @@ -247,7 +250,7 @@ BLOCK_INPUT; __realloc_hook = old_realloc_hook; value = realloc (ptr, size); - __realloc_hook = &emacs_blocked_realloc; + __realloc_hook = emacs_blocked_realloc; UNBLOCK_INPUT; return value; @@ -257,13 +260,13 @@ uninterrupt_malloc () { old_free_hook = __free_hook; - __free_hook = &emacs_blocked_free; + __free_hook = emacs_blocked_free; old_malloc_hook = __malloc_hook; - __malloc_hook = &emacs_blocked_malloc; + __malloc_hook = emacs_blocked_malloc; old_realloc_hook = __realloc_hook; - __realloc_hook = &emacs_blocked_realloc; + __realloc_hook = emacs_blocked_realloc; } #endif @@ -1589,7 +1592,7 @@ ptr = ptr->next; if (ptr) { - ptrx = ptr; /* Use pf ptrx avoids compiler bug on Sun */ + ptrx = ptr; /* Use of ptrx avoids compiler bug on Sun */ XSETSYMBOL (obj, ptrx); goto loop; }