Mercurial > emacs
changeset 50644:0c4bf42e6557
(Fapply): Undo last change and add a comment about why.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 19 Apr 2003 18:58:56 +0000 |
parents | da94760ca8cb |
children | 4b6925d144de |
files | src/eval.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c Sat Apr 19 04:23:45 2003 +0000 +++ b/src/eval.c Sat Apr 19 18:58:56 2003 +0000 @@ -2161,7 +2161,7 @@ register Lisp_Object spread_arg; register Lisp_Object *funcall_args; Lisp_Object fun; - int nvars; + struct gcpro gcpro1; fun = args [0]; funcall_args = 0; @@ -2201,7 +2201,8 @@ * sizeof (Lisp_Object)); for (i = numargs; i < XSUBR (fun)->max_args;) funcall_args[++i] = Qnil; - nvars = 1 + XSUBR (fun)->max_args; + GCPRO1 (*funcall_args); + gcpro1.nvars = 1 + XSUBR (fun)->max_args; } } funcall: @@ -2211,7 +2212,8 @@ { funcall_args = (Lisp_Object *) alloca ((1 + numargs) * sizeof (Lisp_Object)); - nvars = 1 + numargs; + GCPRO1 (*funcall_args); + gcpro1.nvars = 1 + numargs; } bcopy (args, funcall_args, nargs * sizeof (Lisp_Object)); @@ -2224,7 +2226,8 @@ spread_arg = XCDR (spread_arg); } - return Ffuncall (nvars, funcall_args); + /* By convention, the caller needs to gcpro Ffuncall's args. */ + RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args)); } /* Run hook variables in various ways. */