From: Helmut Eller <eller.helmut@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org
Subject: Re: MPS symbols
Date: Fri, 28 Jun 2024 18:19:23 +0200 [thread overview]
Message-ID: <87jzi9ujjo.fsf@gmail.com> (raw)
In-Reply-To: <86v81tjbl4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 Jun 2024 19:06:47 +0300")
On Fri, Jun 28 2024, Eli Zaretskii wrote:
>> -extern EMACS_INT pure[];
>> +extern EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1)
>> + / sizeof (EMACS_INT)];
>
> I don't understand why you moved the definition of puresize[] from
> alloc.c to puresize.h. If we need the same definition in two source
> files, and you don't want to repeat it more than once, just do the
> arithmetics in puresize.h and leave the definition simple, like this:
>
> EMACS_INT pure[pure_size];
>
> where pure_size is computed in puresize.h.
>
> Having dimension in an extern declaration in a header file is at least
> unusual, if not unportable.
I guess it's a matter of taste. If the array type includes the length,
then the compiler knows the size and sizeof(pure) works. That's all.
next prev parent reply other threads:[~2024-06-28 16:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 7:00 MPS symbols Helmut Eller
2024-06-28 7:42 ` Gerd Möllmann
2024-06-28 7:53 ` Helmut Eller
2024-06-28 8:37 ` Gerd Möllmann
2024-06-28 8:46 ` Gerd Möllmann
2024-06-28 9:19 ` Gerd Möllmann
2024-06-28 11:54 ` Helmut Eller
2024-06-28 12:13 ` Gerd Möllmann
2024-06-28 12:36 ` Gerd Möllmann
2024-06-28 11:16 ` Eli Zaretskii
2024-06-28 11:50 ` Gerd Möllmann
2024-06-28 13:47 ` Helmut Eller
2024-06-28 14:13 ` Gerd Möllmann
2024-06-28 14:46 ` Gerd Möllmann
2024-06-28 15:41 ` Helmut Eller
2024-06-28 16:06 ` Eli Zaretskii
2024-06-28 16:19 ` Helmut Eller [this message]
2024-06-28 17:40 ` Eli Zaretskii
2024-06-28 16:20 ` Gerd Möllmann
2024-06-28 17:59 ` Eli Zaretskii
2024-06-29 3:56 ` Gerd Möllmann
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jzi9ujjo.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=gerd.moellmann@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.