]> git.eshelyaron.com Git - emacs.git/commit
Fix store_function_docstring for native subrs (Bug#74966)
authorPip Cet <pipcet@protonmail.com>
Wed, 8 Jan 2025 12:15:30 +0000 (12:15 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sat, 11 Jan 2025 11:15:35 +0000 (12:15 +0100)
commitc6ca5a6b7a5845ebf11ed06b73e87164b18ce6ca
treebbf843bd65a118780adfa00b45aecd458d0111e9
parent84c7aa3e2a3264f0fc9f5b352e7652f7476cda26
Fix store_function_docstring for native subrs (Bug#74966)

Since native subrs can have either etc/DOC indexes or vector indexes,
we use the sign bit of the 'doc' field to distinguish the two cases.

* src/comp.c (native_function_doc, make_subr): Use one's complement of
doc index for native subrs.
* src/doc.c (store_function_docstring): Add assertion.
* src/lisp.h (struct Lisp_Subr): Document 'doc' sign bit.

(cherry picked from commit ac52993b996927031a6913927e1028de47be4312)
src/comp.c
src/doc.c
src/lisp.h