changeset 56203:2bb92448ff94

(Fmapconcat, Fmapcar): Use new SAFE_ALLOCA_LISP and SAFE_FREE_LISP macros.
author Kim F. Storm <storm@cua.dk>
date Tue, 22 Jun 2004 13:57:00 +0000
parents db1817b88294
children d79e58a67b48
files src/fns.c
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Tue Jun 22 13:56:34 2004 +0000
+++ b/src/fns.c	Tue Jun 22 13:57:00 2004 +0000
@@ -3000,7 +3000,6 @@
   register Lisp_Object *args;
   register int i;
   struct gcpro gcpro1;
-  int nbytes;
   Lisp_Object ret;
   USE_SAFE_ALLOCA;
 
@@ -3009,8 +3008,7 @@
   nargs = leni + leni - 1;
   if (nargs < 0) return build_string ("");
 
-  nbytes = nargs * sizeof (Lisp_Object);
-  SAFE_ALLOCA_LISP (args, nbytes);
+  SAFE_ALLOCA_LISP (args, nargs);
 
   GCPRO1 (separator);
   mapcar1 (leni, args, function, sequence);
@@ -3023,7 +3021,7 @@
     args[i] = separator;
 
   ret = Fconcat (nargs, args);
-  SAFE_FREE (nbytes);
+  SAFE_FREE_LISP (nargs);
 
   return ret;
 }
@@ -3038,20 +3036,18 @@
   register Lisp_Object len;
   register int leni;
   register Lisp_Object *args;
-  int nbytes;
   Lisp_Object ret;
   USE_SAFE_ALLOCA;
 
   len = Flength (sequence);
   leni = XFASTINT (len);
 
-  nbytes = leni * sizeof (Lisp_Object);
-  SAFE_ALLOCA_LISP (args, nbytes);
+  SAFE_ALLOCA_LISP (args, leni);
 
   mapcar1 (leni, args, function, sequence);
 
   ret = Flist (leni, args);
-  SAFE_FREE(nbytes);
+  SAFE_FREE_LISP (leni);
 
   return ret;
 }