qemu-devel
[Top][All Lists]
Advanced

[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: Tue, 29 Sep 2015 16:10:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]