[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage |
Date: |
Thu, 01 Oct 2015 08:26:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> 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,
Missed it, my apologies.