Re: [PATCH] scanner: allow referencing foreign enums

2018-06-07 Thread Pekka Paalanen
On Thu, 7 Jun 2018 10:40:11 +0300
Pekka Paalanen  wrote:

> On Wed, 06 Jun 2018 08:54:16 -0400
> Simon Ser  wrote:
> 
> > On May 29, 2018 9:52 AM, Pekka Paalanen  wrote:  
> > > On Sat, 26 May 2018 09:51:18 +0200
> > > Silvan Jegen  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 
> > > > > ---
> > > > >  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 
> > >
> > > Reviewed-by: Pekka Paalanen 
> > >
> > > If no-one objects, I will push this next week. Do ping me if I forget.
> > 
> > Ping :)  
> 
> Hi,
> 
> thanks for the reminder. I'm waiting for the gitlab-ci patch to land,
> so I can see it in action, when I push this patch. Sorry for the delay.

Hi,

this patch is pushed:
   a060822..8b2ba84  master -> master

https://gitlab.freedesktop.org/wayland/wayland/-/jobs/1254
Whee! \o/


Thanks,
pq


pgpWYaB929sLw.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: allow referencing foreign enums

2018-06-07 Thread Pekka Paalanen
On Wed, 06 Jun 2018 08:54:16 -0400
Simon Ser  wrote:

> On May 29, 2018 9:52 AM, Pekka Paalanen  wrote:
> > On Sat, 26 May 2018 09:51:18 +0200
> > Silvan Jegen  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 
> > > > ---
> > > >  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   
> >
> > Reviewed-by: Pekka Paalanen 
> >
> > If no-one objects, I will push this next week. Do ping me if I forget.  
> 
> Ping :)

Hi,

thanks for the reminder. I'm waiting for the gitlab-ci patch to land,
so I can see it in action, when I push this patch. Sorry for the delay.


Thanks,
pq


pgpeZdPqx7lxV.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: allow referencing foreign enums

2018-06-06 Thread Simon Ser
On May 29, 2018 9:52 AM, Pekka Paalanen  wrote:
> On Sat, 26 May 2018 09:51:18 +0200
> Silvan Jegen  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 
> > > ---
> > >  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 
>
> Reviewed-by: Pekka Paalanen 
>
> If no-one objects, I will push this next week. Do ping me if I forget.

Ping :)

> 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(>loc,
> > > -  "could not find enumeration %s",
> > > -  a->enumeration_name);
> > > -
> > >   switch (a->type) {
> > >   case INT:
> > > - if (e->bitfield)
> > > + if (e && e->bitfield)
> > >   fail(>loc,
> > >"bitfield-style enum must only be 
> > > referenced by uint");
> > >   break;
> > > --
> > > 2.17.0
> > >
> > >
> > > ___
> > > wayland-devel mailing list
> > > wayland-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> > ___
> > wayland-devel mailing list
> > wayland-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: allow referencing foreign enums

2018-05-29 Thread Pekka Paalanen
On Sat, 26 May 2018 09:51:18 +0200
Silvan Jegen  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 
> > ---
> >  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 

Reviewed-by: Pekka Paalanen 

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(>loc,
> > -"could not find enumeration %s",
> > -a->enumeration_name);
> > -
> > switch (a->type) {
> > case INT:
> > -   if (e->bitfield)
> > +   if (e && e->bitfield)
> > fail(>loc,
> >  "bitfield-style enum must only be 
> > referenced by uint");
> > break;
> > -- 
> > 2.17.0
> > 
> > 
> > ___
> > wayland-devel mailing list
> > wayland-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel  
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel



pgp6Cyc9CD4GL.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: allow referencing foreign enums

2018-05-26 Thread Silvan Jegen
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 
> ---
>  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 


Cheers,

Silvan

> 
> 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(>loc,
> -  "could not find enumeration %s",
> -  a->enumeration_name);
> -
>   switch (a->type) {
>   case INT:
> - if (e->bitfield)
> + if (e && e->bitfield)
>   fail(>loc,
>"bitfield-style enum must only be 
> referenced by uint");
>   break;
> -- 
> 2.17.0
> 
> 
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH] scanner: allow referencing foreign enums

2018-05-25 Thread Simon Ser
It's already possible to reference foreign interfaces, so it
should also be possible to reference foreign enums.

Signed-off-by: Simon Ser 
---
 src/scanner.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

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(>loc,
-"could not find enumeration %s",
-a->enumeration_name);
-
switch (a->type) {
case INT:
-   if (e->bitfield)
+   if (e && e->bitfield)
fail(>loc,
 "bitfield-style enum must only be 
referenced by uint");
break;
-- 
2.17.0


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel