register Lisp_Object spread_arg;
register Lisp_Object *funcall_args;
Lisp_Object fun;
- int nvars;
+ struct gcpro gcpro1;
fun = args [0];
funcall_args = 0;
* 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:
{
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));
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));
}
\f
/* Run hook variables in various ways. */