mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-15 05:34:36 -04:00
scanner: allow referencing foreign enums
It's already possible to reference foreign interfaces, so it should also be possible to reference foreign enums. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Silvan Jegen <s.jegen@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
a060822399
commit
8b2ba84bd0
1 changed files with 1 additions and 6 deletions
|
|
@ -894,14 +894,9 @@ verify_arguments(struct parse_context *ctx,
|
||||||
e = find_enumeration(ctx->protocol, interface,
|
e = find_enumeration(ctx->protocol, interface,
|
||||||
a->enumeration_name);
|
a->enumeration_name);
|
||||||
|
|
||||||
if (e == NULL)
|
|
||||||
fail(&ctx->loc,
|
|
||||||
"could not find enumeration %s",
|
|
||||||
a->enumeration_name);
|
|
||||||
|
|
||||||
switch (a->type) {
|
switch (a->type) {
|
||||||
case INT:
|
case INT:
|
||||||
if (e->bitfield)
|
if (e && e->bitfield)
|
||||||
fail(&ctx->loc,
|
fail(&ctx->loc,
|
||||||
"bitfield-style enum must only be referenced by uint");
|
"bitfield-style enum must only be referenced by uint");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue