From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: phst@google.com, emacs-devel@gnu.org
Subject: Re: [PATCH] Reimplement module functions
Date: Sun, 14 May 2017 18:08:34 +0000 [thread overview]
Message-ID: <CAArVCkSJ2xKmQxKHwrMc+qTF4agOfNdfyK965qe_-x7=uEKrcw@mail.gmail.com> (raw)
In-Reply-To: <83fug88z76.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]
Eli Zaretskii <eliz@gnu.org> schrieb am Sa., 13. Mai 2017 um 19:05 Uhr:
> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Sat, 13 May 2017 16:44:08 +0200
> > Cc: Philipp Stephani <phst@google.com>
> >
> > Instead of a lambda, create a new type containing all data required to
> > call the function, and support it in the evaluator. Because this type
> > now also needs to store the function documentation, it is too big for
> > Lisp_Misc; use a pseudovector instead. That also has the nice benefit
> > that we don't have to add special support to the garbage collector.
>
> Thanks.
>
> > +#ifdef HAVE_MODULES
> > + else if (MODULE_FUNCTIONP (fun))
> > + doc = XMODULE_FUNCTION (fun)->documentation;
> > +#endif
>
> I wonder whether it would be cleaner to have MODULE_FUNCTIONP defined
> even when HAVE_MODULES is not: it looks like it could save us quite a
> few #ifdef's.
>
Done.
>
> > -DEFUN ("internal--module-call", Finternal_module_call,
> Sinternal_module_call, 1, MANY, 0,
> > - doc: /* Internal function to call a module function.
> > -ENVOBJ is a save pointer to a module_fun_env structure.
> > -ARGLIST is a list of arguments passed to SUBRPTR.
> > -usage: (module-call ENVOBJ &rest ARGLIST) */)
> > - (ptrdiff_t nargs, Lisp_Object *arglist)
> > +Lisp_Object
> > +funcall_module (const struct Lisp_Module_Function *const envptr,
> > + ptrdiff_t nargs, Lisp_Object *arglist)
> > {
>
> I don't think we can simply remove a function that was already present
> in one or more Emacs releases. We need to provide a backward
> compatibility layer, and definitely also mention this in NEWS.
>
This is purely internal, and we can change implementation details at will.
I've added a NEWS entry, though.
[-- Attachment #2: Type: text/html, Size: 2518 bytes --]
next prev parent reply other threads:[~2017-05-14 18:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 14:44 [PATCH] Reimplement module functions Philipp Stephani
2017-05-13 17:05 ` Eli Zaretskii
2017-05-14 3:07 ` Noam Postavsky
2017-05-14 14:11 ` Eli Zaretskii
2017-05-14 11:40 ` Aurélien Aptel
2017-05-14 14:30 ` Eli Zaretskii
2017-05-14 18:08 ` Philipp Stephani [this message]
2017-05-14 18:09 ` Philipp Stephani
2017-05-20 13:37 ` Philipp Stephani
2017-05-20 20:46 ` Paul Eggert
2017-05-21 20:20 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAArVCkSJ2xKmQxKHwrMc+qTF4agOfNdfyK965qe_-x7=uEKrcw@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=phst@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).