]> git.eshelyaron.com Git - emacs.git/commit
Also print function data when printing module functions.
authorPhilipp Stephani <phst@google.com>
Sun, 5 Jan 2020 15:05:14 +0000 (16:05 +0100)
committerPhilipp Stephani <phst@google.com>
Sun, 5 Jan 2020 15:07:28 +0000 (16:07 +0100)
commitfc92c2d8942cf466aa6dbc422f2e798801b18408
treeddf5bc386ba474733db39de3d23f76c8563ebd4b
parent9d38564cdde8cbe9d4c08a7ffef7f25e9692814a
Also print function data when printing module functions.

This is especially useful in cases where modules only use a single
entry point and use the data to dispatch to the actual function.  Such
a design is common for languages such as Go and C++.

* src/emacs-module.c (module_function_data): New function.

* src/print.c (print_vectorlike): Use it to print module function data
if not NULL.
(print_object): Adapt size of buffer.

* test/data/emacs-module/mod-test.c (emacs_module_init): Pass some
non-NULL data to ‘mod-test-sum’.
(Fmod_test_sum): Check that correct data is passed through.

* test/src/emacs-module-tests.el (mod-test-sum-test)
(module-function-object): Adapt unit tests.
src/emacs-module.c
src/lisp.h
src/print.c
test/data/emacs-module/mod-test.c
test/src/emacs-module-tests.el