[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 10/50] qapi-introspect: modify to_qlit() to a
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v3 10/50] qapi-introspect: modify to_qlit() to append ', ' on level > 0 |
Date: |
Thu, 07 Dec 2017 15:47:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> The following patch is going to break list entries with #if/#endif, so
> they should have the trailing ',' as suffix.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> scripts/qapi-introspect.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.py
> index 56c1f9d548..b1d08ec97b 100644
> --- a/scripts/qapi-introspect.py
> +++ b/scripts/qapi-introspect.py
> @@ -29,7 +29,7 @@ def to_qlit(obj, level=0, suppress_first_indent=False):
> for elt in obj]
> elts.append(indent(level + 1) + "{}")
> ret += 'QLIT_QLIST(((QLitObject[]) {\n'
> - ret += ',\n'.join(elts) + '\n'
> + ret += '\n'.join(elts) + '\n'
> ret += indent(level) + '}))'
> elif isinstance(obj, dict):
> elts = []
> @@ -42,6 +42,8 @@ def to_qlit(obj, level=0, suppress_first_indent=False):
> ret += indent(level) + '}))'
> else:
> assert False # not implemented
> + if level > 0:
> + ret += ','
> return ret
Reviewed-by: Markus Armbruster <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v3 10/50] qapi-introspect: modify to_qlit() to append ', ' on level > 0,
Markus Armbruster <=