[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v2 02/47] qapi: Clean up cgen() and mcgen()
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC v2 02/47] qapi: Clean up cgen() and mcgen() |
Date: |
Mon, 20 Jul 2015 10:45:47 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 07/01/2015 02:21 PM, Markus Armbruster wrote:
> Commit 05dfb26 added eatspace stripping to mcgen(). Move it to
> cgen(), just in case somebody gets tempted to use cgen() directly
> instead of via mcgen().
>
> cgen() indents blank lines. No such lines get generated right now,
> but fix it anyway.
>
> We use triple-quoted strings for program text, like this:
>
> '''
> Program text
> any number of lines
> '''
>
> Keeps the program text relatively readable, but puts an extra newline
> at either end. mcgen() "fixes" that by dropping the first and last
> line outright. Drop only the newlines.
>
> This unmasks a bug in qapi-commands.py: four quotes instead of three.
> Fix it up.
>
> Output doesn't change
Confirmed.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> scripts/qapi-commands.py | 2 +-
> scripts/qapi.py | 19 ++++++++++++-------
> 2 files changed, 13 insertions(+), 8 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH RFC v2 00/47] qapi: QMP introspection, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 03/47] qapi: Simplify guardname(), Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 12/47] tests/qapi-schema: Document events with with base don't work, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 04/47] qapi-event: Clean up how name of enum QAPIEvent is made, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 02/47] qapi: Clean up cgen() and mcgen(), Markus Armbruster, 2015/07/01
- Re: [Qemu-devel] [PATCH RFC v2 02/47] qapi: Clean up cgen() and mcgen(),
Eric Blake <=
- [Qemu-devel] [PATCH RFC v2 09/47] qapi-visit: Replace list implicit_structs by set, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions, Markus Armbruster, 2015/07/01
- Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions, Eric Blake, 2015/07/28