what are the protocol rules about uniqueness of event and request names?
Pekka Paalanen
ppaalanen at gmail.com
Mon Dec 11 12:19:13 UTC 2023
On Fri, 8 Dec 2023 10:10:28 -0500
jleivent <jleivent at comcast.net> wrote:
> On Fri, 8 Dec 2023 12:54:35 +0100
> Sebastian Wick <sebastian.wick at redhat.com> wrote:
>
> > ...
> > I think a more useful thing to do would be to add this restriction (an
> > interface cannot have an event and a request with the same name) to
> > the documentation and to wayland-scanner.
> >
>
> Also: an event and request with the same name would probably confuse
> anyone using WAYLAND_DEBUG.
The printout includes an arrow for sending, so you can use that to
decipher event from request if you know whether you are looking at
client or server side.
> But: Would changing wayland-scanner to prevent this be backward
> compatible? Can't someone somewhere already have an event/request pair
> with the same name in their own private protocol extension?
One would just have to try with the latest and some old version of
wayland-scanner, would the generated C code and headers ever pass a C
compiler. There are no other obstacles in using the same name for both
event and request in the same interface.
If it always fails to build, then adding the check would be ok. If it
builds fine, then the check would be backward-incompatible.
A completely other question is whether that break would be a good idea
anyway.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20231211/c268e31f/attachment.sig>
More information about the wayland-devel
mailing list