[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minim
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage |
Date: |
Tue, 29 Sep 2015 09:07:18 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/29/2015 08:10 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
>
>> We had some pointless differences in the generated code for visit,
>> command marshalling, and events; unifying them makes it easier for
>> future patches to consolidate to common helper functions.
>>
>> This patch makes no difference to the generated code, but rather
>> focuses on reducing the number of push_indent()/pop_indent() pairs
>> so that generated code is typically already at its natural output
>> indentation in the python files. It is easier to reason about
>> generated code if the reader does not have to track how much
>> spacing will be inserted alongside the code, and moreso when all
>> of the generators use the same patterns (qapi-type and qapi-event
>> were already using in-place indentation).
>>
>> Signed-off-by: Eric Blake <address@hidden>
>
> A few places become slightly less readable because the generated code is
> now indented lile the surrounding Python code. Other places become more
> readable. Having to think less about push_indent() / pop_indent() tips
> the balance, I guess.
>
> Have you diffed the generated code before and after the patch?
Yes; quoting above:
>> This patch makes no difference to the generated code,
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature