Referencing enums in other protocols
Pekka Paalanen
ppaalanen at gmail.com
Mon Apr 23 09:08:20 UTC 2018
On Mon, 23 Apr 2018 03:42:31 -0400
Simon Ser <contact at emersion.fr> wrote:
> Hi all,
>
> While writing a protocol, I've been trying to reference symbols from another
> protocol. While it seems to work fine for interfaces, it fails for enums:
>
> error: could not find enumeration wl_output.transform
>
> Is this by design? It seems odd to me that interfaces work but enums don't.
Hi,
I think that's an oversight. It should indeed be possible to reference
enums just like interfaces from other protocol files.
The cause for the failure is that wayland-scanner wants to check that
the enum name is valid, and if it is a bitfield then the type must be
uint. But obviously this is not possible if the enum definition is not
available.
I can see two possible courses of action: drop the check, or add a way
to provide additional protocol files for "external references".
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/20180423/eb2a65b1/attachment.sig>
More information about the wayland-devel
mailing list