From: Dave Love Date: Tue, 20 Jun 2000 13:15:58 +0000 (+0000) Subject: (xmalloc, xrealloc, xfree): Define using POINTER_TYPE. X-Git-Tag: emacs-pretest-21.0.90~3205 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c971ff9a0b224a27d4824f92a288eccacfa21d5c;p=emacs.git (xmalloc, xrealloc, xfree): Define using POINTER_TYPE. --- diff --git a/src/alloc.c b/src/alloc.c index 0c568f5fa70..480a30ace51 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -408,14 +408,14 @@ buffer_memory_full () /* Like malloc but check for no memory and block interrupt input.. */ -long * +POINTER_TYPE * xmalloc (size) int size; { - register long *val; + register POINTER_TYPE *val; BLOCK_INPUT; - val = (long *) malloc (size); + val = (POINTER_TYPE *) malloc (size); UNBLOCK_INPUT; if (!val && size) @@ -426,20 +426,20 @@ xmalloc (size) /* Like realloc but check for no memory and block interrupt input.. */ -long * +POINTER_TYPE * xrealloc (block, size) - long *block; + POINTER_TYPE *block; int size; { - register long *val; + register POINTER_TYPE *val; BLOCK_INPUT; /* We must call malloc explicitly when BLOCK is 0, since some reallocs don't do this. */ if (! block) - val = (long *) malloc (size); + val = (POINTER_TYPE *) malloc (size); else - val = (long *) realloc (block, size); + val = (POINTER_TYPE *) realloc (block, size); UNBLOCK_INPUT; if (!val && size) memory_full (); @@ -451,7 +451,7 @@ xrealloc (block, size) void xfree (block) - long *block; + POINTER_TYPE *block; { BLOCK_INPUT; free (block);