Re: [PATCH wayland 4/8] fixup! scanner: use c99 initializers for the request/events arrays
On Tue, 3 Jul 2018 16:19:03 +0100 Emil Velikov wrote: > On 3 July 2018 at 12:28, Pekka Paalanen wrote: > > On Thu, 14 Jun 2018 16:49:41 +0100 > > Emil Velikov 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 = [0] }, > >> + { .name = "rq2", .signature = "nsiufho", .types = [1] }, > >> + { .name = "destroy", .signature = "", .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 '[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 pgpWnno5I0Ril.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland 4/8] fixup! scanner: use c99 initializers for the request/events arrays
On 3 July 2018 at 12:28, Pekka Paalanen wrote: > On Thu, 14 Jun 2018 16:49:41 +0100 > Emil Velikov 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 = [0] }, >> + { .name = "rq2", .signature = "nsiufho", .types = [1] }, >> + { .name = "destroy", .signature = "", .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 '[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. Peace Emil ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland 4/8] fixup! scanner: use c99 initializers for the request/events arrays
On Thu, 14 Jun 2018 16:49:41 +0100 Emil Velikov 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 = [0] }, > + { .name = "rq2", .signature = "nsiufho", .types = [1] }, > + { .name = "destroy", .signature = "", .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 '[i]' seems ok though. Thanks, pq pgphdt0V4eSKm.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel