[PATCH wayland 4/8] fixup! scanner: use c99 initializers for the request/events arrays
Pekka Paalanen
ppaalanen at gmail.com
Tue Jul 3 11:28:12 UTC 2018
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.
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/20180703/4a33d457/attachment.sig>
More information about the wayland-devel
mailing list