Received: from eggs.gnu.org ([2001:4830:134:3::10]:60538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhXK7-0004GF-2Y for qemu-devel@nongnu.org; Thu, 01 Oct 2015 02:26:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhXK3-0007xo-Tk for qemu-devel@nongnu.org; Thu, 01 Oct 2015 02:26:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhXK3-0007xg-OS for qemu-devel@nongnu.org; Thu, 01 Oct 2015 02:26:31 -0400 From: Markus Armbruster References: <1443497249-15361-1-git-send-email-eblake@redhat.com> <1443497249-15361-15-git-send-email-eblake@redhat.com> <87612tiads.fsf@blackfin.pond.sub.org> <560AA926.40602@redhat.com> Date: Thu, 01 Oct 2015 08:26:28 +0200 In-Reply-To: <560AA926.40602@redhat.com> (Eric Blake's message of "Tue, 29 Sep 2015 09:07:18 -0600") Message-ID: <87lhbnm7e3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Michael Roth , marcandre.lureau@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com Eric Blake writes: > On 09/29/2015 08:10 AM, Markus Armbruster wrote: >> Eric Blake 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 >> >> 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.