[PATCH wayland 4/8] fixup! scanner: use c99 initializers for the request/events arrays

Pekka Paalanen ppaalanen at gmail.com
Wed Jul 4 07:50:41 UTC 2018


On Tue, 3 Jul 2018 16:19:03 +0100
Emil Velikov <emil.l.velikov at gmail.com> wrote:

> On 3 July 2018 at 12:28, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > On Thu, 14 Jun 2018 16:49:41 +0100
> > Emil Velikov <emil.l.velikov at gmail.com> wrote:
> >  
> >> ---
> >>  tests/data/example-code.c       | 238 ++++++++++++++++++++--------------------
> >>  tests/data/small-code-core.c    |   8 +-
> >>  tests/data/small-code.c         |   8 +-
> >>  tests/data/small-private-code.c |   8 +-
> >>  4 files changed, 131 insertions(+), 131 deletions(-)  
> >  
> >> diff --git a/tests/data/small-private-code.c b/tests/data/small-private-code.c
> >> index 35fa653..84f77de 100644
> >> --- a/tests/data/small-private-code.c
> >> +++ b/tests/data/small-private-code.c
> >> @@ -54,13 +54,13 @@ static const struct wl_interface *types[] = {
> >>  };
> >>
> >>  static const struct wl_message intf_A_requests[] = {
> >> -     { "rq1", "sun", types + 0 },
> >> -     { "rq2", "nsiufho", types + 1 },
> >> -     { "destroy", "", types + 0 },
> >> +     { .name = "rq1", .signature = "sun", .types = &types[0] },
> >> +     { .name = "rq2", .signature = "nsiufho", .types = &types[1] },
> >> +     { .name = "destroy", .signature = "", .types = &types[0] },
> >>  };  
> >
> > Hi,
> >
> > this change doesn't look more readable to me than the old version.
> > Adding the field names only clutters things and makes the lines longer
> > for no added information: it is always the exact same fields set in the
> > same order, and there are only three of them.
> >
> > The change from 'types + i' to '&types[i]' seems ok though.
> >  
> Seems like these dead trivial patches are inciting some bike-shedding.
> Proceed as you wish, sadly I'm out of patience.

Ok, let's drop these all these, continue with other matters.


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/20180704/c3b1c6a1/attachment.sig>


More information about the wayland-devel mailing list