changeset 29781:4a3b0c2cbcd5

(xmalloc, xrealloc, xfree): Define using POINTER_TYPE.
author Dave Love <fx@gnu.org>
date Tue, 20 Jun 2000 13:15:58 +0000
parents 520e4132439f
children 718b60b51f2e
files src/alloc.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Tue Jun 20 13:11:39 2000 +0000
+++ b/src/alloc.c	Tue Jun 20 13:15:58 2000 +0000
@@ -408,14 +408,14 @@
 
 /* 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 @@
 
 /* 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 @@
 
 void
 xfree (block)
-     long *block;
+     POINTER_TYPE *block;
 {
   BLOCK_INPUT;
   free (block);