[PATCH wayland 4/8] fixup! scanner: use c99 initializers for the request/events arrays
Emil Velikov
emil.l.velikov at gmail.com
Tue Jul 3 15:19:03 UTC 2018
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.
Peace
Emil
More information about the wayland-devel
mailing list