[PATCH] scanner: allow referencing foreign enums

Pekka Paalanen ppaalanen at gmail.com
Tue May 29 08:52:51 UTC 2018


On Sat, 26 May 2018 09:51:18 +0200
Silvan Jegen <s.jegen at gmail.com> wrote:

> Hi
> 
> On Fri, May 25, 2018 at 05:24:41PM -0400, Simon Ser wrote:
> > It's already possible to reference foreign interfaces, so it
> > should also be possible to reference foreign enums.
> > 
> > Signed-off-by: Simon Ser <contact at emersion.fr>
> > ---
> >  src/scanner.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)  
> 
> It looks good to me and I can confirm that this works as intended. If
> no solution allowing for the passing of reference protocols is desired,
> this should be applied.
> 
> Reviewed-by: Silvan Jegen <s.jegen at gmail.com>

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

If no-one objects, I will push this next week. Do ping me if I forget.


Thanks,
pq

> > 
> > diff --git a/src/scanner.c b/src/scanner.c
> > index 1737911..205c28a 100644
> > --- a/src/scanner.c
> > +++ b/src/scanner.c
> > @@ -894,14 +894,9 @@ verify_arguments(struct parse_context *ctx,
> >  			e = find_enumeration(ctx->protocol, interface,
> >  					     a->enumeration_name);
> >  
> > -			if (e == NULL)
> > -				fail(&ctx->loc,
> > -				     "could not find enumeration %s",
> > -				     a->enumeration_name);
> > -
> >  			switch (a->type) {
> >  			case INT:
> > -				if (e->bitfield)
> > +				if (e && e->bitfield)
> >  					fail(&ctx->loc,
> >  					     "bitfield-style enum must only be referenced by uint");
> >  				break;
> > -- 
> > 2.17.0
> > 
> > 
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel  
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel

-------------- 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/20180529/a9f48b4c/attachment.sig>


More information about the wayland-devel mailing list