Referencing enums in other protocols
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.
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
I can see two possible courses of action: drop the check, or add a way
to provide additional protocol files for "external references".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the wayland-devel