]> git.eshelyaron.com Git - emacs.git/commit
Fix the subr-arity returned by native compiled functions with lots of args
authorAlan Mackenzie <acm@muc.de>
Sat, 29 Oct 2022 13:21:39 +0000 (13:21 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 29 Oct 2022 13:21:39 +0000 (13:21 +0000)
commit31e7b9c073bd0dddedb90a1ff882dc78ff33315c
tree5a635ab618cd95588d43624e53112fe54202950c
parent174dd064643e9487c0fa1460727d0935a60b3646
Fix the subr-arity returned by native compiled functions with lots of args

This fixes bug #58739.  Make subr-arity return, e.g., (12 . 12) rather than
(12 . many) for a function with a fixed number of arguments more than 8.

* lisp/emacs-lisp/comp.el (comp-prepare-args-for-top-level): Only return a cdr
of 'many when there are &rest arguments.

* src/eval.c (eval_sub): Also check for a fixed number of args over 8 when
using the nargs + *args calling convention.
(funcall_subr): Also check numargs <= 8 before using the fixed args calling
convention.  Include the case numargs > 8 in the aMany calling convention.

* src/lisp.h (DEFUN): Amend the comment about MANY.
lisp/emacs-lisp/comp.el
src/eval.c
src/lisp.h