aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab2010-08-17 23:07:50 +0200
committerAndreas Schwab2010-08-17 23:07:50 +0200
commitb72e07172e5ce15093094d521b133a6283d5d94c (patch)
tree7469ef32b38f7bd90a9f93ee6851e5d1106950bc /src
parent3a7a912990d6583aabe7e1e807bb9c044f403b30 (diff)
downloademacs-b72e07172e5ce15093094d521b133a6283d5d94c.tar.gz
emacs-b72e07172e5ce15093094d521b133a6283d5d94c.zip
* eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP
instead of SAFE_ALLOCA.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/eval.c14
2 files changed, 10 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ce409d0fbbd..5b4fac632bd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-08-17 Andreas Schwab <schwab@linux-m68k.org>
2
3 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP
4 instead of SAFE_ALLOCA.
5
12010-08-17 Chong Yidong <cyd@stupidchicken.com> 62010-08-17 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA 8 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA
diff --git a/src/eval.c b/src/eval.c
index 7bd27a0f144..6b74f5b884d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1034,7 +1034,7 @@ usage: (let VARLIST BODY...) */)
1034 1034
1035 /* Make space to hold the values to give the bound variables */ 1035 /* Make space to hold the values to give the bound variables */
1036 elt = Flength (varlist); 1036 elt = Flength (varlist);
1037 SAFE_ALLOCA (temps, Lisp_Object *, XFASTINT (elt) * sizeof (Lisp_Object)); 1037 SAFE_ALLOCA_LISP (temps, XFASTINT (elt));
1038 1038
1039 /* Compute the values and store them in `temps' */ 1039 /* Compute the values and store them in `temps' */
1040 1040
@@ -2303,8 +2303,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2303 register int argnum = 0; 2303 register int argnum = 0;
2304 USE_SAFE_ALLOCA; 2304 USE_SAFE_ALLOCA;
2305 2305
2306 SAFE_ALLOCA (vals, Lisp_Object *, 2306 SAFE_ALLOCA_LISP (vals, XINT (numargs));
2307 XINT (numargs) * sizeof (Lisp_Object));
2308 2307
2309 GCPRO3 (args_left, fun, fun); 2308 GCPRO3 (args_left, fun, fun);
2310 gcpro3.var = vals; 2309 gcpro3.var = vals;
@@ -2476,8 +2475,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2476 { 2475 {
2477 /* Avoid making funcall cons up a yet another new vector of arguments 2476 /* Avoid making funcall cons up a yet another new vector of arguments
2478 by explicitly supplying nil's for optional values */ 2477 by explicitly supplying nil's for optional values */
2479 SAFE_ALLOCA (funcall_args, Lisp_Object *, 2478 SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args);
2480 (1 + XSUBR (fun)->max_args) * sizeof (Lisp_Object));
2481 for (i = numargs; i < XSUBR (fun)->max_args;) 2479 for (i = numargs; i < XSUBR (fun)->max_args;)
2482 funcall_args[++i] = Qnil; 2480 funcall_args[++i] = Qnil;
2483 GCPRO1 (*funcall_args); 2481 GCPRO1 (*funcall_args);
@@ -2489,8 +2487,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2489 function itself as well as its arguments. */ 2487 function itself as well as its arguments. */
2490 if (!funcall_args) 2488 if (!funcall_args)
2491 { 2489 {
2492 SAFE_ALLOCA (funcall_args, Lisp_Object *, 2490 SAFE_ALLOCA_LISP (funcall_args, 1 + numargs);
2493 (1 + numargs) * sizeof (Lisp_Object));
2494 GCPRO1 (*funcall_args); 2491 GCPRO1 (*funcall_args);
2495 gcpro1.nvars = 1 + numargs; 2492 gcpro1.nvars = 1 + numargs;
2496 } 2493 }
@@ -3121,8 +3118,7 @@ apply_lambda (fun, args, eval_flag)
3121 USE_SAFE_ALLOCA; 3118 USE_SAFE_ALLOCA;
3122 3119
3123 numargs = Flength (args); 3120 numargs = Flength (args);
3124 SAFE_ALLOCA (arg_vector, Lisp_Object *, 3121 SAFE_ALLOCA_LISP (arg_vector, XINT (numargs));
3125 XINT (numargs) * sizeof (Lisp_Object));
3126 args_left = args; 3122 args_left = args;
3127 3123
3128 GCPRO3 (*arg_vector, args_left, fun); 3124 GCPRO3 (*arg_vector, args_left, fun);