]> git.eshelyaron.com Git - emacs.git/commit
Add optional GC marking function to specpdl unwind_ptr record
authorMattias Engdegård <mattiase@acm.org>
Sat, 5 Mar 2022 10:12:54 +0000 (11:12 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sat, 5 Mar 2022 10:31:32 +0000 (11:31 +0100)
commitdaf46703ce83cc652667e89aa50161a36e9a8575
tree973cd19a5a22c437c7dfea90fe60ce1c39d9bab2
parent8969953328a6cb5b7f131c2b7441e9d5d21191aa
Add optional GC marking function to specpdl unwind_ptr record

Add a new `record_unwind_protect_ptr_mark` function for use with C data
structures that use the specpdl for clean-up but also contain possibly
unique references to Lisp objects.

* src/eval.c (record_unwind_protect_ptr_mark): New.
(record_unwind_protect_module, set_unwind_protect_ptr):
Set the mark function to NULL.
(mark_specpdl): Call the mark function if present.
* src/lisp.h (unwind_ptr): Add a mark function pointer to the
SPECPDL_UNWIND_PTR case.
src/eval.c
src/lisp.h