emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 37889523278: Add new `swap` macro and use it


From: Po Lu
Subject: Re: master 37889523278: Add new `swap` macro and use it
Date: Wed, 17 Jan 2024 19:15:32 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Kangas <stefankangas@gmail.com> writes:

> BTW, we already use typeof in Emacs 29.1:
>
> ./src/pgtkselect.c:1158:      ldata = (typeof (ldata)) data;
>
> This was introduced in
>
>     commit be35c92c90d455739a6ff9d4beefa2b35d044852
>     Author: Po Lu <luangruo@yahoo.com>
>     Date:   Tue Jun 21 22:03:42 2022 +0800
>
>         Rewrite PGTK selection code from scratch
>
> I don't see any problem with that, and judging by the lack of bug
> reports, neither do our users.  Maybe it's worth changing it to use
> __typeof__.

I wrote this code aware of the systems on which it would run, and the
systems typeof would affect did not number among them.  As regards
__typeof__, I recall a comment in a GLib header to the effect that it
was unusable under compilers older than GCC 4.8, so we should also avoid
it in the PGTK port.

> It was the C standards committee guys that wrote the above, not
> Gregory.

The C standards committee is not infailable, and this instance is either
one where they have overlooked significant information, or where their
conclusions are being taken out of context and invoked to prove a point
far removed from the context they were drawn in.

> I guess that wasn't a puregtk build.

The PGTK build is designed for systems which run Wayland and GTK 3,
namely GNU/Linux; you'll find that the same code is not present in
xselect.c.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]