diff options
| author | Stefan Monnier | 2003-04-19 18:58:56 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-04-19 18:58:56 +0000 |
| commit | 96d44c649994bf28e5ddcb8d51515fbebb320960 (patch) | |
| tree | ca62822f2a9f7828f540f76e2ea7f21df4422b46 /src | |
| parent | e31afc09af21bb5314341a86c648c0988d2da3e1 (diff) | |
| download | emacs-96d44c649994bf28e5ddcb8d51515fbebb320960.tar.gz emacs-96d44c649994bf28e5ddcb8d51515fbebb320960.zip | |
(Fapply): Undo last change and add a comment about why.
Diffstat (limited to 'src')
| -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 53272b9bd68..80cc2f79dd7 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2161,7 +2161,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2161 | register Lisp_Object spread_arg; | 2161 | register Lisp_Object spread_arg; |
| 2162 | register Lisp_Object *funcall_args; | 2162 | register Lisp_Object *funcall_args; |
| 2163 | Lisp_Object fun; | 2163 | Lisp_Object fun; |
| 2164 | int nvars; | 2164 | struct gcpro gcpro1; |
| 2165 | 2165 | ||
| 2166 | fun = args [0]; | 2166 | fun = args [0]; |
| 2167 | funcall_args = 0; | 2167 | funcall_args = 0; |
| @@ -2201,7 +2201,8 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2201 | * sizeof (Lisp_Object)); | 2201 | * sizeof (Lisp_Object)); |
| 2202 | for (i = numargs; i < XSUBR (fun)->max_args;) | 2202 | for (i = numargs; i < XSUBR (fun)->max_args;) |
| 2203 | funcall_args[++i] = Qnil; | 2203 | funcall_args[++i] = Qnil; |
| 2204 | nvars = 1 + XSUBR (fun)->max_args; | 2204 | GCPRO1 (*funcall_args); |
| 2205 | gcpro1.nvars = 1 + XSUBR (fun)->max_args; | ||
| 2205 | } | 2206 | } |
| 2206 | } | 2207 | } |
| 2207 | funcall: | 2208 | funcall: |
| @@ -2211,7 +2212,8 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2211 | { | 2212 | { |
| 2212 | funcall_args = (Lisp_Object *) alloca ((1 + numargs) | 2213 | funcall_args = (Lisp_Object *) alloca ((1 + numargs) |
| 2213 | * sizeof (Lisp_Object)); | 2214 | * sizeof (Lisp_Object)); |
| 2214 | nvars = 1 + numargs; | 2215 | GCPRO1 (*funcall_args); |
| 2216 | gcpro1.nvars = 1 + numargs; | ||
| 2215 | } | 2217 | } |
| 2216 | 2218 | ||
| 2217 | bcopy (args, funcall_args, nargs * sizeof (Lisp_Object)); | 2219 | bcopy (args, funcall_args, nargs * sizeof (Lisp_Object)); |
| @@ -2224,7 +2226,8 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2224 | spread_arg = XCDR (spread_arg); | 2226 | spread_arg = XCDR (spread_arg); |
| 2225 | } | 2227 | } |
| 2226 | 2228 | ||
| 2227 | return Ffuncall (nvars, funcall_args); | 2229 | /* By convention, the caller needs to gcpro Ffuncall's args. */ |
| 2230 | RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args)); | ||
| 2228 | } | 2231 | } |
| 2229 | 2232 | ||
| 2230 | /* Run hook variables in various ways. */ | 2233 | /* Run hook variables in various ways. */ |