diff options
author | Stefan Monnier <[email protected]> | 2003-04-19 18:58:56 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2003-04-19 18:58:56 +0000 |
commit | 96d44c649994bf28e5ddcb8d51515fbebb320960 (patch) | |
tree | ca62822f2a9f7828f540f76e2ea7f21df4422b46 /src/eval.c | |
parent | e31afc09af21bb5314341a86c648c0988d2da3e1 (diff) |
(Fapply): Undo last change and add a comment about why.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index 53272b9bd6..80cc2f79dd 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2161,7 +2161,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) 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 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) * 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 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) { 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 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) 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. */ |