I'm very excited by the possibilities opened through the new dynamic module interface, "emacs-module.h".
However, I have a concern about the API for creating Lisp functions bound to native functions:
emacs_value (*make_function) (emacs_env *env,
emacs_value (*function) (emacs_env *env,
const char *documentation,
I presume the "data" pointer here is provided to enable native functions to work like closures,
carrying additional, possibly dynamically allocated data. However, this functionality is limited by
the absence of a finalization function pointer, like the "user_ptr" values have:
emacs_value (*make_user_ptr) (emacs_env *env,
void (*fin) (void *) EMACS_NOEXCEPT,
Without the ability to provide a finalizer, a module can only safely make the "data" pointer to
"make_function" point to static memory.